diff options
author | David Edelsohn <edelsohn@gnu.org> | 2009-08-17 15:22:04 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2009-08-17 11:22:04 -0400 |
commit | be274b21f72fc0ecf9dde15b0969ae505d2abb67 (patch) | |
tree | 0f825b6f47a6fbd9218bb64e478cf4fb40d4c615 /fixincludes/inclhack.def | |
parent | 2d8980b01e74e526485afb826c925d1139517f50 (diff) | |
download | gcc-be274b21f72fc0ecf9dde15b0969ae505d2abb67.tar.gz |
inclhack.def (aix_complex): Redefine _Complex_I.
* inclhack.def (aix_complex): Redefine _Complex_I. Do not
redefine I.
* (aix_stdint_[12345]): New fixes.
* fixincl.x: Regenerate.
* tests/base/complex.h: Update check.
* tests/base/stdint.h: Add AIX stdint.h checks.
From-SVN: r150846
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 112 |
1 files changed, 105 insertions, 7 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index ba3048661eb..96ed41c7337 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -361,14 +361,12 @@ fix = { */ fix = { hackname = aix_complex; + mach = "*-*-aix*"; files = complex.h; - select = "AIX xlc C99"; - - sed = "s/^#define[ \t]_Complex_I[ \t]__I//"; - sed = "s/^#define[ \t]I[ \t]_Complex_I//"; - - test_text = "#define _Complex_I __I\n" - "#define I _Complex_I"; + select = "#define[ \t]_Complex_I[ \t]__I"; + c_fix = format; + c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)"; + test_text = "#define _Complex_I __I\n"; }; @@ -388,6 +386,106 @@ fix = { /* + * AIX stdint.h fixes. + */ +fix = { + hackname = aix_stdint_1; + mach = "*-*-aix*"; + files = stdint.h; + select = "#define[ \t]UINT8_MAX[ \t]\\(255U\\)\n" + "#define[ \t]UINT16_MAX[ \t]\\(65535U\\)"; + c_fix = format; + c_fix_arg = "#define UINT8_MAX (255)\n" + "#define UINT16_MAX (65535)"; + test_text = "#define UINT8_MAX (255U)\n" + "#define UINT16_MAX (65535U)"; +}; + + +fix = { + hackname = aix_stdint_2; + mach = "*-*-aix*"; + files = stdint.h; + select = "#define[ \t]INTPTR_MIN[ \t]INT64_MIN\n" + "#define[ \t]INTPTR_MAX[ \t]INT64_MAX\n" + "#define[ \t]UINTPTR_MAX[ \t]UINT64_MAX\n" + "#else\n" + "#define[ \t]INTPTR_MIN[ \t]INT32_MIN\n" + "#define[ \t]INTPTR_MAX[ \t]INT32_MAX\n" + "#define[ \t]UINTPTR_MAX[ \t]UINT32_MAX"; + c_fix = format; + c_fix_arg = "#define INTPTR_MIN (-INTPTR_MAX-1)\n" + "#define INTPTR_MAX 9223372036854775807L\n" + "#define UINTPTR_MAX 18446744073709551615UL\n" + "#else\n" + "#define INTPTR_MIN (-INTPTR_MAX-1)\n" + "#define INTPTR_MAX 2147483647L\n" + "#define UINTPTR_MAX 4294967295UL"; + test_text = "#define INTPTR_MIN INT64_MIN\n" + "#define INTPTR_MAX INT64_MAX\n" + "#define UINTPTR_MAX UINT64_MAX\n" + "#else\n" + "#define INTPTR_MIN INT32_MIN\n" + "#define INTPTR_MAX INT32_MAX\n" + "#define UINTPTR_MAX UINT32_MAX"; +}; + + +fix = { + hackname = aix_stdint_3; + mach = "*-*-aix*"; + files = stdint.h; + select = "#define[ \t]PTRDIFF_MIN[ \t]INT64_MIN\n" + "#define[ \t]PTRDIFF_MAX[ \t]INT64_MAX\n" + "#else\n" + "#define[ \t]PTRDIFF_MIN[ \t]*INT32_MIN\n" + "#define[ \t]PTRDIFF_MAX[ \t]*INT32_MAX"; + c_fix = format; + c_fix_arg = "#define PTRDIFF_MIN (-9223372036854775807L - 1)\n" + "#define PTRDIFF_MAX 9223372036854775807L\n" + "#else\n" + "#define PTRDIFF_MIN (-2147483647L - 1)\n" + "#define PTRDIFF_MAX 2147483647L"; + test_text = "#define PTRDIFF_MIN INT64_MIN\n" + "#define PTRDIFF_MAX INT64_MAX\n" + "#else\n" + "#define PTRDIFF_MIN INT32_MIN\n" + "#define PTRDIFF_MAX INT32_MAX"; +}; + + +fix = { + hackname = aix_stdint_4; + mach = "*-*-aix*"; + files = stdint.h; + select = "#define[ \t]SIZE_MAX[ \t]UINT64_MAX\n" + "#else\n" + "#define[ \t]SIZE_MAX[ \t]*UINT32_MAX"; + c_fix = format; + c_fix_arg = "#define SIZE_MAX 18446744073709551615UL\n" + "#else\n" + "#define SIZE_MAX 4294967295UL"; + test_text = "#define SIZE_MAX UINT64_MAX\n" + "#else\n" + "#define SIZE_MAX UINT32_MAX"; +}; + + +fix = { + hackname = aix_stdint_5; + mach = "*-*-aix*"; + files = stdint.h; + select = "#define[ \t]UINT8_C\\(c\\)[ \t]__CONCAT__\\(c,U\\)\n" + "#define[ \t]UINT16_C\\(c\\)[ \t]__CONCAT__\\(c,U\\)"; + c_fix = format; + c_fix_arg = "#define UINT8_C(c) c\n" + "#define UINT16_C(c) c"; + test_text = "#define UINT8_C(c) __CONCAT__(c,U)\n" + "#define UINT16_C(c) __CONCAT__(c,U)"; +}; + + +/* * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline * in an otherwise harmless (and #ifed out) macro definition */ |