diff options
author | Clément Chigot <clement.chigot@atos.net> | 2020-09-25 09:48:22 +0200 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 2020-10-03 23:48:40 +0000 |
commit | 5af2a2d30d7f3a472d77af4540ab38169d307e83 (patch) | |
tree | 4ecae142e2e33586b329fa378caa081d3f4a53d7 /fixincludes/inclhack.def | |
parent | ce531b14126bf5f1dcd70224a1131198ddf58875 (diff) | |
download | gcc-5af2a2d30d7f3a472d77af4540ab38169d307e83.zip gcc-5af2a2d30d7f3a472d77af4540ab38169d307e83.tar.gz gcc-5af2a2d30d7f3a472d77af4540ab38169d307e83.tar.bz2 |
aix: apply aix_malloc more narrowly.
In recent Technology Levels of AIX 7.2, new "#ifdef __cplusplus" have been
added. Thus, the aix_malloc fix was applied in wrong locations. This patch
increases the context to avoid this.
fixincludes/ChangeLog:
2020-10-03 Clément Chigot <clement.chigot@atos.net>
* inclhack.def (aix_malloc): Add more context to select.
* fixincl.x: Regenerate.
* tests/base/malloc.h: Update expected results.
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 6e59be9..47eb236 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -597,10 +597,16 @@ fix = { hackname = aix_malloc; mach = "*-*-aix*"; files = "malloc.h"; - select = "#ifdef __cplusplus"; + select = "#ifdef __cplusplus\n" + "extern \"C\" \\{\n" + "[ \t]extern \"builtin\" char \\*__alloca \\(size_t\\);"; c_fix = format; - c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))"; - test_text = "#ifdef __cplusplus"; + c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))\n" + "extern \"C\" {\n" + "\textern \"builtin\" char *__alloca (size_t);"; + test_text = "#ifdef __cplusplus\n" + "extern \"C\" {\n" + "\textern \"builtin\" char *__alloca (size_t);"; }; /* |