diff options
Diffstat (limited to 'include/stdio.h')
| -rw-r--r-- | include/stdio.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/stdio.h b/include/stdio.h index 8cdd826..b31299b 100644 --- a/include/stdio.h +++ b/include/stdio.h | |||
| @@ -36,15 +36,13 @@ extern "C" { | |||
| 36 | #undef fread | 36 | #undef fread |
| 37 | #undef fwrite | 37 | #undef fwrite |
| 38 | #undef popen | 38 | #undef popen |
| 39 | #undef tmpfile | ||
| 40 | #undef snprintf | 39 | #undef snprintf |
| 41 | #undef sprintf | 40 | #undef sprintf |
| 42 | #undef vsnprintf | 41 | #undef vsnprintf |
| 43 | #undef vsprintf | 42 | #undef vsprintf |
| 44 | 43 | ||
| 45 | __access(read_only, 2) | 44 | __access(read_only, 2) |
| 46 | __malloc(malloc (fclose, 1)) | 45 | _FORTIFY_FN(fdopen) FILE *fdopen(int __f, const char* _FORTIFY_POS0 __m) |
| 47 | _FORTIFY_FN(fdopen) FILE *fdopen(int __f, const char* __m) | ||
| 48 | { | 46 | { |
| 49 | return __orig_fdopen(__f, __m); | 47 | return __orig_fdopen(__f, __m); |
| 50 | } | 48 | } |
| @@ -60,7 +58,7 @@ _FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f) | |||
| 60 | } | 58 | } |
| 61 | 59 | ||
| 62 | __malloc(malloc (fclose, 1)) | 60 | __malloc(malloc (fclose, 1)) |
| 63 | _FORTIFY_FN(fmemopen) FILE *fmemopen(void* __b, size_t __s, const char* __m) | 61 | _FORTIFY_FN(fmemopen) FILE *fmemopen(void* _FORTIFY_POS0 __b, size_t __s, const char* _FORTIFY_POS0 __m) |
| 64 | { | 62 | { |
| 65 | return __orig_fmemopen(__b, __s, __m); | 63 | return __orig_fmemopen(__b, __s, __m); |
| 66 | } | 64 | } |
| @@ -68,7 +66,7 @@ _FORTIFY_FN(fmemopen) FILE *fmemopen(void* __b, size_t __s, const char* __m) | |||
| 68 | __access(read_only, 1) | 66 | __access(read_only, 1) |
| 69 | __access(read_only, 2) | 67 | __access(read_only, 2) |
| 70 | __malloc(malloc (fclose, 1)) | 68 | __malloc(malloc (fclose, 1)) |
| 71 | _FORTIFY_FN(fopen) FILE *fopen(const char* __p, const char* __m) | 69 | _FORTIFY_FN(fopen) FILE *fopen(const char* _FORTIFY_POS0 __p, const char* _FORTIFY_POS0 __m) |
| 72 | { | 70 | { |
| 73 | return __orig_fopen(__p, __m); | 71 | return __orig_fopen(__p, __m); |
| 74 | } | 72 | } |
| @@ -100,16 +98,19 @@ _FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n, | |||
| 100 | } | 98 | } |
| 101 | 99 | ||
| 102 | __malloc(malloc (pclose, 1)) | 100 | __malloc(malloc (pclose, 1)) |
| 103 | _FORTIFY_FN(popen) FILE *popen(const char* __c, const char* __t) | 101 | _FORTIFY_FN(popen) FILE *popen(const char* _FORTIFY_POS0 __c, const char* _FORTIFY_POS0 __t) |
| 104 | { | 102 | { |
| 105 | return __orig_popen(__c, __t); | 103 | return __orig_popen(__c, __t); |
| 106 | } | 104 | } |
| 107 | 105 | ||
| 106 | #ifndef __clang__ /* FIXME */ | ||
| 107 | #undef tmpfile | ||
| 108 | __malloc(malloc (fclose, 1)) | 108 | __malloc(malloc (fclose, 1)) |
| 109 | _FORTIFY_FN(tmpfile) FILE *tmpfile(void) | 109 | _FORTIFY_FN(tmpfile) FILE *tmpfile(void) |
| 110 | { | 110 | { |
| 111 | return __orig_tmpfile(); | 111 | return __orig_tmpfile(); |
| 112 | } | 112 | } |
| 113 | #endif | ||
| 113 | 114 | ||
| 114 | __access(read_write, 1, 2) | 115 | __access(read_write, 1, 2) |
| 115 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, | 116 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, |
