Daniel Dunbar | 86f9994 | 2011-12-08 02:39:23 +0000 | [diff] [blame] | 1 | /* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== |
| 2 | * |
| 3 | * The LLVM Compiler Infrastructure |
| 4 | * |
| 5 | * This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | * Source Licenses. See LICENSE.TXT for details. |
| 7 | * |
| 8 | * ===-----------------------------------------------------------------------=== |
| 9 | * |
| 10 | * This is a stub SDK header file. This file is not part of the interface of |
| 11 | * this library nor an official version of the appropriate SDK header. It is |
| 12 | * intended only to stub the features of this header required by compiler-rt. |
| 13 | * |
| 14 | * ===-----------------------------------------------------------------------=== |
| 15 | */ |
| 16 | |
| 17 | #ifndef __STDIO_H__ |
| 18 | #define __STDIO_H__ |
| 19 | |
| 20 | typedef __SIZE_TYPE__ size_t; |
| 21 | |
| 22 | struct _IO_FILE; |
| 23 | typedef struct _IO_FILE FILE; |
| 24 | |
| 25 | extern struct _IO_FILE *stdin; |
| 26 | extern struct _IO_FILE *stdout; |
| 27 | extern struct _IO_FILE *stderr; |
| 28 | |
Benjamin Kramer | 7ad8ae2 | 2012-09-17 10:23:05 +0000 | [diff] [blame] | 29 | #define SEEK_SET 0 /* set file offset to offset */ |
| 30 | #define SEEK_CUR 1 /* set file offset to current plus offset */ |
| 31 | #define SEEK_END 2 /* set file offset to EOF plus offset */ |
| 32 | |
Daniel Dunbar | 86f9994 | 2011-12-08 02:39:23 +0000 | [diff] [blame] | 33 | extern int fclose(FILE *); |
| 34 | extern int fflush(FILE *); |
| 35 | extern FILE *fopen(const char * restrict, const char * restrict); |
| 36 | extern int fprintf(FILE * restrict, const char * restrict, ...); |
| 37 | extern size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict); |
Benjamin Kramer | 7ad8ae2 | 2012-09-17 10:23:05 +0000 | [diff] [blame] | 38 | extern size_t fread(void * restrict, size_t, size_t, FILE * restrict); |
| 39 | extern long ftell(FILE *); |
| 40 | extern int fseek(FILE *, long, int); |
Bill Wendling | 2a46a60 | 2013-05-15 21:31:22 +0000 | [diff] [blame] | 41 | extern void setbuf(FILE * restrict, char * restrict); |
Daniel Dunbar | 86f9994 | 2011-12-08 02:39:23 +0000 | [diff] [blame] | 42 | |
| 43 | #endif /* __STDIO_H__ */ |