diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-06-10 10:46:05 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-06-10 10:46:05 +0200 |
commit | 2ba3cfa1607c36613f3b30fb1ae4ec530245ce64 (patch) | |
tree | 4c215fe75ef1c016943e36821137257480097e01 /include | |
parent | f00faa4a43706d85ad8d4d2c970d3f52f0f63bfb (diff) | |
download | glibc-2ba3cfa1607c36613f3b30fb1ae4ec530245ce64.zip glibc-2ba3cfa1607c36613f3b30fb1ae4ec530245ce64.tar.gz glibc-2ba3cfa1607c36613f3b30fb1ae4ec530245ce64.tar.bz2 |
malloc: Remove __malloc_initialize_hook from the API [BZ #19564]
__malloc_initialize_hook is interposed by application code, so
the usual approach to define a compatibility symbol does not work.
This commit adds a new mechanism based on #pragma GCC poison in
<stdc-predef.h>.
Diffstat (limited to 'include')
-rw-r--r-- | include/stdc-predef.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/stdc-predef.h b/include/stdc-predef.h index f9f7f73..52cf8d1 100644 --- a/include/stdc-predef.h +++ b/include/stdc-predef.h @@ -57,4 +57,11 @@ /* We do not support C11 <threads.h>. */ #define __STDC_NO_THREADS__ 1 +/* Remove symbols from the API which can be interposed. */ +#if defined (__GNUC__) +# if __GNUC__ >= 4 +# pragma GCC poison __malloc_initialize_hook +# endif /* __GNUC__ >= 4 */ +#endif /* __GNUC__ */ + #endif |