source: EcnlProtoTool/trunk/tcc-0.9.26/include/tcclib.h@ 279

Last change on this file since 279 was 279, checked in by coas-nagasima, 7 years ago

ファイルを追加、更新。

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • 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);
42
43int printf(const char *format, ...);
44int fprintf(FILE *stream, const char *format, ...);
45int sprintf(char *str, const char *format, ...);
46int snprintf(char *str, size_t size, const char *format, ...);
47int asprintf(char **strp, const char *format, ...);
48int dprintf(int fd, const char *format, ...);
49int vprintf(const char *format, va_list ap);
50int vfprintf(FILE *stream, const char *format, va_list ap);
51int vsprintf(char *str, const char *format, va_list ap);
52int vsnprintf(char *str, size_t size, const char *format, va_list ap);
53int vasprintf(char **strp, const char *format, va_list ap);
54int vdprintf(int fd, const char *format, va_list ap);
55
56void perror(const char *s);
57
58/* string.h */
59char *strcat(char *dest, const char *src);
60char *strchr(const char *s, int c);
61char *strrchr(const char *s, int c);
62char *strcpy(char *dest, const char *src);
63void *memcpy(void *dest, const void *src, size_t n);
64void *memmove(void *dest, const void *src, size_t n);
65void *memset(void *s, int c, size_t n);
66char *strdup(const char *s);
67
68/* dlfcn.h */
69#define RTLD_LAZY 0x001
70#define RTLD_NOW 0x002
71#define RTLD_GLOBAL 0x100
72
73void *dlopen(const char *filename, int flag);
74const char *dlerror(void);
75void *dlsym(void *handle, char *symbol);
76int dlclose(void *handle);
77
78#endif /* _TCCLIB_H */
Note: See TracBrowser for help on using the repository browser.