source: EcnlProtoTool/trunk/tcc-0.9.27/tcclib.h

Last change on this file was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 2.5 KB
Line 
1/* Simple libc header for TCC
2 *
3 * Add any function you want from the libc there. This file is here
4 * only for your convenience so that you do not need to put the whole
5 * glibc include files on your floppy disk
6 */
7#ifndef _TCCLIB_H
8#define _TCCLIB_H
9
10#include <stddef.h>
11#include <stdarg.h>
12
13/* stdlib.h */
14void *calloc(size_t nmemb, size_t size);
15void *malloc(size_t size);
16void free(void *ptr);
17void *realloc(void *ptr, size_t size);
18int atoi(const char *nptr);
19long int strtol(const char *nptr, char **endptr, int base);
20unsigned long int strtoul(const char *nptr, char **endptr, int base);
21void exit(int);
22
23/* stdio.h */
24typedef struct __FILE FILE;
25#define EOF (-1)
26extern FILE *stdin;
27extern FILE *stdout;
28extern FILE *stderr;
29FILE *fopen(const char *path, const char *mode);
30FILE *fdopen(int fildes, const char *mode);
31FILE *freopen(const char *path, const char *mode, FILE *stream);
32int fclose(FILE *stream);
33size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
34size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *stream);
35int fgetc(FILE *stream);
36char *fgets(char *s, int size, FILE *stream);
37int getc(FILE *stream);
38int getchar(void);
39char *gets(char *s);
40int ungetc(int c, FILE *stream);
41int fflush(FILE *stream);
42int putchar (int c);
43
44int printf(const char *format, ...);
45int fprintf(FILE *stream, const char *format, ...);
46int sprintf(char *str, const char *format, ...);
47int snprintf(char *str, size_t size, const char *format, ...);
48int asprintf(char **strp, const char *format, ...);
49int dprintf(int fd, const char *format, ...);
50int vprintf(const char *format, va_list ap);
51int vfprintf(FILE *stream, const char *format, va_list ap);
52int vsprintf(char *str, const char *format, va_list ap);
53int vsnprintf(char *str, size_t size, const char *format, va_list ap);
54int vasprintf(char **strp, const char *format, va_list ap);
55int vdprintf(int fd, const char *format, va_list ap);
56
57void perror(const char *s);
58
59/* string.h */
60char *strcat(char *dest, const char *src);
61char *strchr(const char *s, int c);
62char *strrchr(const char *s, int c);
63char *strcpy(char *dest, const char *src);
64void *memcpy(void *dest, const void *src, size_t n);
65void *memmove(void *dest, const void *src, size_t n);
66void *memset(void *s, int c, size_t n);
67char *strdup(const char *s);
68size_t strlen(const char *s);
69
70/* dlfcn.h */
71#define RTLD_LAZY 0x001
72#define RTLD_NOW 0x002
73#define RTLD_GLOBAL 0x100
74
75void *dlopen(const char *filename, int flag);
76const char *dlerror(void);
77void *dlsym(void *handle, char *symbol);
78int dlclose(void *handle);
79
80#endif /* _TCCLIB_H */
Note: See TracBrowser for help on using the repository browser.