diff options
Diffstat (limited to 'include/stdlib.h')
| -rw-r--r-- | include/stdlib.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index 1a92bff..734f0e6 100644 --- a/include/stdlib.h +++ b/include/stdlib.h | |||
| @@ -43,7 +43,6 @@ extern "C" { | |||
| 43 | __malloc(malloc (free, 1)) | 43 | __malloc(malloc (free, 1)) |
| 44 | __alloc_size(1) | 44 | __alloc_size(1) |
| 45 | __warn_unused_result | 45 | __warn_unused_result |
| 46 | __diagnose_as_builtin(__builtin_malloc, 1) | ||
| 47 | _FORTIFY_FN(malloc) void *malloc(size_t __s) | 46 | _FORTIFY_FN(malloc) void *malloc(size_t __s) |
| 48 | { | 47 | { |
| 49 | return __orig_malloc(__s); | 48 | return __orig_malloc(__s); |
| @@ -51,7 +50,6 @@ _FORTIFY_FN(malloc) void *malloc(size_t __s) | |||
| 51 | 50 | ||
| 52 | __alloc_size(2) | 51 | __alloc_size(2) |
| 53 | __warn_unused_result | 52 | __warn_unused_result |
| 54 | __diagnose_as_builtin(__builtin_realloc, 1, 2) | ||
| 55 | _FORTIFY_FN(realloc) void *realloc(void *__p, size_t __s) | 53 | _FORTIFY_FN(realloc) void *realloc(void *__p, size_t __s) |
| 56 | { | 54 | { |
| 57 | return __orig_realloc(__p, __s); | 55 | return __orig_realloc(__p, __s); |
| @@ -59,7 +57,6 @@ _FORTIFY_FN(realloc) void *realloc(void *__p, size_t __s) | |||
| 59 | 57 | ||
| 60 | __alloc_size(1, 2) | 58 | __alloc_size(1, 2) |
| 61 | __warn_unused_result | 59 | __warn_unused_result |
| 62 | __diagnose_as_builtin(__builtin_calloc, 1, 2) | ||
| 63 | _FORTIFY_FN(calloc) void *calloc(size_t __n, size_t __s) | 60 | _FORTIFY_FN(calloc) void *calloc(size_t __n, size_t __s) |
| 64 | { | 61 | { |
| 65 | return __orig_calloc(__n, __s); | 62 | return __orig_calloc(__n, __s); |
| @@ -69,7 +66,6 @@ _FORTIFY_FN(calloc) void *calloc(size_t __n, size_t __s) | |||
| 69 | #undef reallocarray | 66 | #undef reallocarray |
| 70 | __alloc_size (2, 3) | 67 | __alloc_size (2, 3) |
| 71 | __warn_unused_result | 68 | __warn_unused_result |
| 72 | __diagnose_as_builtin(__builtin_reallocarray, 1, 2, 3) | ||
| 73 | _FORTIFY_FN(reallocarray) void* reallocarray(void* __p, size_t __n, size_t __s) | 69 | _FORTIFY_FN(reallocarray) void* reallocarray(void* __p, size_t __n, size_t __s) |
| 74 | { | 70 | { |
| 75 | return __orig_reallocarray(__p, __n, __s); | 71 | return __orig_reallocarray(__p, __n, __s); |
| @@ -79,7 +75,6 @@ _FORTIFY_FN(reallocarray) void* reallocarray(void* __p, size_t __n, size_t __s) | |||
| 79 | /* FIXME clang */ | 75 | /* FIXME clang */ |
| 80 | #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__) | 76 | #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__) |
| 81 | #undef realpath | 77 | #undef realpath |
| 82 | __diagnose_as_builtin(__builtin_realpath, 1, 2) | ||
| 83 | __warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?") | 78 | __warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?") |
| 84 | _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) | 79 | _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) |
| 85 | { | 80 | { |
