diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2016-06-13 18:59:43 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2016-06-13 14:59:43 -0400 |
commit | d4f076c9b8f4288d748c871b5849146a518dee7b (patch) | |
tree | 5b6e2d235f4cd3fd8e7fc9fd9a59a720172cb3d1 /fixincludes/inclhack.def | |
parent | 0ac249bf93d84c213d8bdf40bf3f310d5df0b238 (diff) | |
download | gcc-d4f076c9b8f4288d748c871b5849146a518dee7b.zip gcc-d4f076c9b8f4288d748c871b5849146a518dee7b.tar.gz gcc-d4f076c9b8f4288d748c871b5849146a518dee7b.tar.bz2 |
inclhack.def (aix_stdlib_malloc): New fix.
* inclhack.def (aix_stdlib_malloc): New fix.
(aix_stdlib_realloc): New fix.
(aix_stdlib_calloc): New fix.
(aix_stdlib_valloc): New fix.
* fixincl.x: Regenerate.
* test/base/stdlib.h [AIX_STDLIB_MALLOC]: New test.
[AIX_STDLIB_REALLOC]: New test.
[AIX_STDLIB_CALLOC]: New test.
[AIX_STDLIB_VALLOC]: New test.
From-SVN: r237394
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 8b6d1fe..8adb076 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -911,6 +911,48 @@ fix = { test_text = "#ifdef __cplusplus\n}\n\n#ifdef ferror"; }; +/* + * stdlib.h on AIX uses #define on malloc and friends. + */ +fix = { + hackname = aix_stdlib_malloc; + mach = "*-*-aix*"; + files = stdlib.h; + select = "#define[ \t]+malloc[ \t]+__linux_malloc"; + c_fix = format; + c_fix_arg = "extern void *malloc(size_t) __asm__(\"__linux_malloc\");"; + test_text = "#define malloc __linux_malloc"; +}; + +fix = { + hackname = aix_stdlib_realloc; + mach = "*-*-aix*"; + files = stdlib.h; + select = "#define[ \t]+realloc[ \t]+__linux_realloc"; + c_fix = format; + c_fix_arg = "extern void *realloc(void *, size_t) __asm__(\"__linux_realloc\");"; + test_text = "#define realloc __linux_realloc"; +}; + +fix = { + hackname = aix_stdlib_calloc; + mach = "*-*-aix*"; + files = stdlib.h; + select = "#define[ \t]+calloc[ \t]+__linux_calloc"; + c_fix = format; + c_fix_arg = "extern void *calloc(size_t, size_t) __asm__(\"__linux_calloc\");"; + test_text = "#define calloc __linux_calloc"; +}; + +fix = { + hackname = aix_stdlib_valloc; + mach = "*-*-aix*"; + files = stdlib.h; + select = "#define[ \t]+valloc[ \t]+__linux_valloc"; + c_fix = format; + c_fix_arg = "extern void *valloc(size_t) __asm__(\"__linux_valloc\");"; + test_text = "#define valloc __linux_valloc"; +}; /* * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument. |