summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index d3cd863..5d89c9c 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -23,6 +23,7 @@ __extension__
23#include_next <stdlib.h> 23#include_next <stdlib.h>
24 24
25#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 25#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
26
26#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 27#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
27#if !defined(__cplusplus) && !defined(__clang__) 28#if !defined(__cplusplus) && !defined(__clang__)
28__extension__ 29__extension__
@@ -36,6 +37,9 @@ __extension__
36extern "C" { 37extern "C" {
37#endif 38#endif
38 39
40
41/* FIXME clang */
42#if !defined(__clang__)
39#undef malloc 43#undef malloc
40#undef realloc 44#undef realloc
41#undef calloc 45#undef calloc
@@ -84,8 +88,7 @@ _FORTIFY_FN(reallocarray) void* reallocarray(void* __p, size_t __n, size_t __s)
84} 88}
85#endif 89#endif
86 90
87/* FIXME clang */ 91#if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE))
88#if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__)
89#undef realpath 92#undef realpath
90__warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?") 93__warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?")
91#if __has_builtin(__builtin_realpath) 94#if __has_builtin(__builtin_realpath)
@@ -118,6 +121,8 @@ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
118} 121}
119#endif 122#endif
120 123
121#endif 124#endif // clang
125
126#endif // _FORTIFY_SOURCE
122 127
123#endif 128#endif