From dc4f0670e5d1c70824d9fede3d485a7320fd49e0 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Tue, 26 Jan 2010 19:24:32 +0000 Subject: config.gcc (mips-sgi-irix[56]*): Set use_gcc_stdint. gcc: * config.gcc (mips-sgi-irix[56]*): Set use_gcc_stdint. * config/mips/iris.h (INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE): Define. (UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE): Define. (INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, INT_LEAST64_TYPE): Define. (UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, UINT_LEAST64_TYPE): Define. (INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE) INT_FAST64_TYPE): Define. (UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, UINT_FAST64_TYPE): Define. (INTMAX_TYPE, UINTMAX_TYPE): Define. (INTPTR_TYPE, UINTPTR_TYPE): Define. (SIG_ATOMIC_TYPE): Define. fixincludes: * inclhack.def (aix_stdint_1): Add stdint-aix.h to files. (aix_stdint_2): Likewise. (aix_stdint_3): Likewise. (aix_stdint_4): Likewise. (aix_stdint_5): Likewise. (darwin_stdint_1): Add stdint-darwin.h to files. (darwin_stdint_2): Likewise. (darwin_stdint_3): Likewise. (darwin_stdint_4): Likewise. (darwin_stdint_5): Likewise. (darwin_stdint_6): Likewise. (darwin_stdint_7): Likewise. (hpux_c99_intptr): Add stdint-hpux11.h to files. (hpux_c99_inttypes): Likewise. (hpux_c99_inttypes2): Likewise. (hpux_stdint_least_fast): Likewise. (irix_stdint_c99): Renamed to irix_stdint_c99_mode. (irix_stdint_c99_types): New fix. (irix_stdint_c99_macros): New fix. (newlib_stdint_1): Add stdint-newlib.h to files. (newlib_stdint_2): Likewise. fixincl.x: Regenerate. tests/base/stdint-aix.h: New file. tests/base/stdint.h [AIX_STDINT_1_CHECK, AIX_STDINT_2_CHECK, AIX_STDINT_3_CHECK, AIX_STDINT_4_CHECK, AIX_STDINT_5_CHECK]: Moved ... tests/base/stdint-aix.h: ... here. [AIX_STDINT_3_CHECK]: Updated to match aix_stdint_3 fix. [AIX_STDINT_4_CHECK]: Updated to match aix_stdint_4 fix. [AIX_STDINT_5_CHECK]: Updated to match aix_stdint_5 fix. tests/base/stdint-darwin.h: New file. tests/base/stdint.h [DARWIN_STDINT_1_CHECK, DARWIN_STDINT_2_CHECK, DARWIN_STDINT_3_CHECK, DARWIN_STDINT_4_CHECK, DARWIN_STDINT_5_CHECK, DARWIN_STDINT_6_CHECK]: Moved ... tests/base/stdint-darwin.h: ... here. [DARWIN_STDINT_1_CHECK]: Updated to match darwin_stdint_1 fix. [DARWIN_STDINT_4_CHECK]: Updated to match darwin_stdint_4 fix. [DARWIN_STDINT_6_CHECK]: Updated to match darwin_stdint_6 fix. tests/base/stdint-hpux11.h: New file. tests/base/stdint.h [HPUX_C99_INTPTR_CHECK, HPUX_C99_INTTYPES2_CHECK, HPUX_STDINT_LEAST_FAST_CHECK]: Moved ... tests/base/stdint-hpux11.h: ... here. [HPUX_C99_INTPTR_CHECK]: Updated to match hpux_c99_intptr fix. [HPUX_C99_INTTYPES2_CHECK]: Updated to match hpux_c99_inttypes2 fix. tests/base/stdint.h [IRIX_STDINT_C99_CHECK]: Renamed guard to IRIX_STDINT_C99_MODE_CHECK. tests/base/stdint-irix65.h: New file. tests/base/stdint-newlib.h: New file. tests/base/stdint.h [NEWLIB_STDINT_1_CHECK, NEWLIB_STDINT_2_CHECK]: Moved ... tests/base/stdint-newlib.h: ... here. From-SVN: r156259 --- fixincludes/ChangeLog | 53 ++++++++++ fixincludes/fixincl.x | 165 +++++++++++++++++++++++-------- fixincludes/inclhack.def | 119 +++++++++++++++++++---- fixincludes/tests/base/stdint-aix.h | 48 +++++++++ fixincludes/tests/base/stdint-darwin.h | 79 +++++++++++++++ fixincludes/tests/base/stdint-hpux11.h | 36 +++++++ fixincludes/tests/base/stdint-irix65.h | 40 ++++++++ fixincludes/tests/base/stdint-newlib.h | 42 ++++++++ fixincludes/tests/base/stdint.h | 173 +-------------------------------- gcc/ChangeLog | 18 ++++ gcc/config.gcc | 13 ++- gcc/config/mips/iris.h | 36 +++++++ 12 files changed, 593 insertions(+), 229 deletions(-) create mode 100644 fixincludes/tests/base/stdint-aix.h create mode 100644 fixincludes/tests/base/stdint-darwin.h create mode 100644 fixincludes/tests/base/stdint-hpux11.h create mode 100644 fixincludes/tests/base/stdint-irix65.h create mode 100644 fixincludes/tests/base/stdint-newlib.h diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index a743862..e1c8d58 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,56 @@ +2010-01-26 Rainer Orth + + * inclhack.def (aix_stdint_1): Add stdint-aix.h to files. + (aix_stdint_2): Likewise. + (aix_stdint_3): Likewise. + (aix_stdint_4): Likewise. + (aix_stdint_5): Likewise. + (darwin_stdint_1): Add stdint-darwin.h to files. + (darwin_stdint_2): Likewise. + (darwin_stdint_3): Likewise. + (darwin_stdint_4): Likewise. + (darwin_stdint_5): Likewise. + (darwin_stdint_6): Likewise. + (darwin_stdint_7): Likewise. + (hpux_c99_intptr): Add stdint-hpux11.h to files. + (hpux_c99_inttypes): Likewise. + (hpux_c99_inttypes2): Likewise. + (hpux_stdint_least_fast): Likewise. + (irix_stdint_c99): Renamed to irix_stdint_c99_mode. + (irix_stdint_c99_types): New fix. + (irix_stdint_c99_macros): New fix. + (newlib_stdint_1): Add stdint-newlib.h to files. + (newlib_stdint_2): Likewise. + fixincl.x: Regenerate. + tests/base/stdint-aix.h: New file. + tests/base/stdint.h [AIX_STDINT_1_CHECK, AIX_STDINT_2_CHECK, + AIX_STDINT_3_CHECK, AIX_STDINT_4_CHECK, AIX_STDINT_5_CHECK]: Moved ... + tests/base/stdint-aix.h: ... here. + [AIX_STDINT_3_CHECK]: Updated to match aix_stdint_3 fix. + [AIX_STDINT_4_CHECK]: Updated to match aix_stdint_4 fix. + [AIX_STDINT_5_CHECK]: Updated to match aix_stdint_5 fix. + tests/base/stdint-darwin.h: New file. + tests/base/stdint.h [DARWIN_STDINT_1_CHECK, DARWIN_STDINT_2_CHECK, + DARWIN_STDINT_3_CHECK, DARWIN_STDINT_4_CHECK, + DARWIN_STDINT_5_CHECK, DARWIN_STDINT_6_CHECK]: Moved ... + tests/base/stdint-darwin.h: ... here. + [DARWIN_STDINT_1_CHECK]: Updated to match darwin_stdint_1 fix. + [DARWIN_STDINT_4_CHECK]: Updated to match darwin_stdint_4 fix. + [DARWIN_STDINT_6_CHECK]: Updated to match darwin_stdint_6 fix. + tests/base/stdint-hpux11.h: New file. + tests/base/stdint.h [HPUX_C99_INTPTR_CHECK, + HPUX_C99_INTTYPES2_CHECK, HPUX_STDINT_LEAST_FAST_CHECK]: Moved ... + tests/base/stdint-hpux11.h: ... here. + [HPUX_C99_INTPTR_CHECK]: Updated to match hpux_c99_intptr fix. + [HPUX_C99_INTTYPES2_CHECK]: Updated to match hpux_c99_inttypes2 fix. + tests/base/stdint.h [IRIX_STDINT_C99_CHECK]: Renamed guard to + IRIX_STDINT_C99_MODE_CHECK. + tests/base/stdint-irix65.h: New file. + tests/base/stdint-newlib.h: New file. + tests/base/stdint.h [NEWLIB_STDINT_1_CHECK, + NEWLIB_STDINT_2_CHECK]: Moved ... + tests/base/stdint-newlib.h: ... here. + 2009-12-05 Ralf Wildenhues * configure: Regenerate. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 2d6e1fc..907df7d 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Tuesday October 20, 2009 at 04:21:49 PM PDT + * It has been AutoGen-ed Tuesday January 26, 2010 at 08:17:12 PM MET * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Oct 20 16:21:49 PDT 2009 +/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jan 26 20:17:12 MET 2010 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 202 fixup descriptions. + * This file contains 204 fixup descriptions. * * See README for more information. * @@ -568,7 +568,7 @@ tSCC zAix_Stdint_1Name[] = * File name selection pattern */ tSCC zAix_Stdint_1List[] = - "stdint.h\0"; + "stdint-aix.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -607,7 +607,7 @@ tSCC zAix_Stdint_2Name[] = * File name selection pattern */ tSCC zAix_Stdint_2List[] = - "stdint.h\0"; + "stdint-aix.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -656,7 +656,7 @@ tSCC zAix_Stdint_3Name[] = * File name selection pattern */ tSCC zAix_Stdint_3List[] = - "stdint.h\0"; + "stdint-aix.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -701,7 +701,7 @@ tSCC zAix_Stdint_4Name[] = * File name selection pattern */ tSCC zAix_Stdint_4List[] = - "stdint.h\0"; + "stdint-aix.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -742,7 +742,7 @@ tSCC zAix_Stdint_5Name[] = * File name selection pattern */ tSCC zAix_Stdint_5List[] = - "stdint.h\0"; + "stdint-aix.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2046,7 +2046,7 @@ tSCC zDarwin_Stdint_1Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_1List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2085,7 +2085,7 @@ tSCC zDarwin_Stdint_2Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_2List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2134,7 +2134,7 @@ tSCC zDarwin_Stdint_3Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_3List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2179,7 +2179,7 @@ tSCC zDarwin_Stdint_4Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_4List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2224,7 +2224,7 @@ tSCC zDarwin_Stdint_5Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_5List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2271,7 +2271,7 @@ tSCC zDarwin_Stdint_6Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_6List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -2320,7 +2320,7 @@ tSCC zDarwin_Stdint_7Name[] = * File name selection pattern */ tSCC zDarwin_Stdint_7List[] = - "stdint.h\0"; + "stdint-darwin.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -3964,7 +3964,7 @@ tSCC zHpux_C99_IntptrName[] = * File name selection pattern */ tSCC zHpux_C99_IntptrList[] = - "stdint.h\0"; + "stdint-hpux11.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -3997,7 +3997,7 @@ tSCC zHpux_C99_InttypesName[] = * File name selection pattern */ tSCC zHpux_C99_InttypesList[] = - "inttypes.h\0stdint.h\0"; + "inttypes.h\0stdint-hpux11.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -4028,7 +4028,7 @@ tSCC zHpux_C99_Inttypes2Name[] = * File name selection pattern */ tSCC zHpux_C99_Inttypes2List[] = - "stdint.h\0"; + "stdint-hpux11.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -4059,7 +4059,7 @@ tSCC zHpux_Stdint_Least_FastName[] = * File name selection pattern */ tSCC zHpux_Stdint_Least_FastList[] = - "stdint.h\0"; + "stdint-hpux11.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -4705,38 +4705,38 @@ typedef int socklen_t;\n\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix_Stdint_C99 fix + * Description of Irix_Stdint_C99_Mode fix */ -tSCC zIrix_Stdint_C99Name[] = - "irix_stdint_c99"; +tSCC zIrix_Stdint_C99_ModeName[] = + "irix_stdint_c99_mode"; /* * File name selection pattern */ -tSCC zIrix_Stdint_C99List[] = +tSCC zIrix_Stdint_C99_ModeList[] = "stdint.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzIrix_Stdint_C99Machs[] = { +tSCC* apzIrix_Stdint_C99_ModeMachs[] = { "mips-sgi-irix6.5", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zIrix_Stdint_C99Select0[] = +tSCC zIrix_Stdint_C99_ModeSelect0[] = "(#ifndef __c99\n\ )(#error This header file is to be used only for c99 mode compilations)"; -#define IRIX_STDINT_C99_TEST_CT 1 -static tTestDesc aIrix_Stdint_C99Tests[] = { - { TT_EGREP, zIrix_Stdint_C99Select0, (regex_t*)NULL }, }; +#define IRIX_STDINT_C99_MODE_TEST_CT 1 +static tTestDesc aIrix_Stdint_C99_ModeTests[] = { + { TT_EGREP, zIrix_Stdint_C99_ModeSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Irix_Stdint_C99 + * Fix Command Arguments for Irix_Stdint_C99_Mode */ -static const char* apzIrix_Stdint_C99Patch[] = { +static const char* apzIrix_Stdint_C99_ModePatch[] = { "format", "#if 0\n\ %2", @@ -4744,6 +4744,83 @@ static const char* apzIrix_Stdint_C99Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Irix_Stdint_C99_Types fix + */ +tSCC zIrix_Stdint_C99_TypesName[] = + "irix_stdint_c99_types"; + +/* + * File name selection pattern + */ +tSCC zIrix_Stdint_C99_TypesList[] = + "stdint-irix65.h\0stdint.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzIrix_Stdint_C99_TypesMachs[] = { + "mips-sgi-irix6.5", + (const char*)NULL }; +#define IRIX_STDINT_C99_TYPES_TEST_CT 0 +#define aIrix_Stdint_C99_TypesTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Irix_Stdint_C99_Types + */ +static const char* apzIrix_Stdint_C99_TypesPatch[] = { sed_cmd_z, + "-e", "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@#define INT64_MIN (-0x7fffffffffffffffLL - 1)@", + "-e", "s@^#define INT64_MAX.*0x7fffffffffffffff$@#define INT64_MAX 0x7fffffffffffffffLL@", + "-e", "s@^#define UINT32_MAX.*0xffffffff$@#define UINT32_MAX 0xffffffffU@", + "-e", "s@^#define UINT64_MAX.*0xffffffffffffffff$@#define UINT64_MAX 0xffffffffffffffffULL@", + "-e", "s@^#define INTPTR_MIN.*INT32_MIN$@#define INTPTR_MIN (-0x7fffffffL - 1)@", + "-e", "s@^#define INTPTR_MAX.*INT32_MAX$@#define INTPTR_MAX 0x7fffffffL@", + "-e", "s@^#define UINTPTR_MAX.*UINT32_MAX$@#define UINTPTR_MAX 0xffffffffUL@", + "-e", "s@^#define INTPTR_MIN.*INT64_MIN@#define INTPTR_MIN (-0x7fffffffffffffffL - 1)@", + "-e", "s@^#define INTPTR_MAX.*INT64_MAX$@#define INTPTR_MAX 0x7fffffffffffffffL@", + "-e", "s@^#define UINTPTR_MAX.*UINT64_MAX$@#define UINTPTR_MAX 0xffffffffffffffffUL@", + "-e", "s@^#define PTRDIFF_MIN.*INT64_MIN$@#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1)@", + "-e", "s@^#define PTRDIFF_MAX.*INT64_MAX$@#define PTRDIFF_MAX 0x7fffffffffffffffL@", + "-e", "s@^#define SIZE_MAX.*UINT64_MAX$@#define SIZE_MAX 0xffffffffffffffffUL@", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Irix_Stdint_C99_Macros fix + */ +tSCC zIrix_Stdint_C99_MacrosName[] = + "irix_stdint_c99_macros"; + +/* + * File name selection pattern + */ +tSCC zIrix_Stdint_C99_MacrosList[] = + "stdint-irix65.h\0stdint.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzIrix_Stdint_C99_MacrosMachs[] = { + "mips-sgi-irix6.5", + (const char*)NULL }; +#define IRIX_STDINT_C99_MACROS_TEST_CT 0 +#define aIrix_Stdint_C99_MacrosTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Irix_Stdint_C99_Macros + */ +static const char* apzIrix_Stdint_C99_MacrosPatch[] = { sed_cmd_z, + "-e", "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x) (x)@", + "-e", "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x) (x)@", + "-e", "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x) (x)@", + "-e", "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x) (x ## LL)@", + "-e", "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x) (x)@", + "-e", "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x) (x)@", + "-e", "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x) (x ## U)@", + "-e", "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x) (x ## ULL)@", + "-e", "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x) (x ## LL)@", + "-e", "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x) (x ## ULL)@", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Irix_Stdio_Va_List fix */ tSCC zIrix_Stdio_Va_ListName[] = @@ -5300,7 +5377,7 @@ tSCC zNewlib_Stdint_1Name[] = * File name selection pattern */ tSCC zNewlib_Stdint_1List[] = - "stdint.h\0"; + "stdint-newlib.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -5347,7 +5424,7 @@ tSCC zNewlib_Stdint_2Name[] = * File name selection pattern */ tSCC zNewlib_Stdint_2List[] = - "stdint.h\0"; + "stdint-newlib.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ @@ -8241,7 +8318,7 @@ static const char* apzX11_SprintfPatch[] = { */ #define REGEX_COUNT 244 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 202 +#define FIX_COUNT 204 /* * Enumerate the fixes @@ -8361,7 +8438,9 @@ typedef enum { IRIX_COMPLEX_FIXIDX, IRIX_LIMITS_CONST_FIXIDX, IRIX_SOCKLEN_T_FIXIDX, - IRIX_STDINT_C99_FIXIDX, + IRIX_STDINT_C99_MODE_FIXIDX, + IRIX_STDINT_C99_TYPES_FIXIDX, + IRIX_STDINT_C99_MACROS_FIXIDX, IRIX_STDIO_VA_LIST_FIXIDX, IRIX_WCSFTIME_FIXIDX, KANDR_CONCAT_FIXIDX, @@ -9022,10 +9101,20 @@ tFixDesc fixDescList[ FIX_COUNT ] = { IRIX_SOCKLEN_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aIrix_Socklen_TTests, apzIrix_Socklen_TPatch, 0 }, - { zIrix_Stdint_C99Name, zIrix_Stdint_C99List, - apzIrix_Stdint_C99Machs, - IRIX_STDINT_C99_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Stdint_C99Tests, apzIrix_Stdint_C99Patch, 0 }, + { zIrix_Stdint_C99_ModeName, zIrix_Stdint_C99_ModeList, + apzIrix_Stdint_C99_ModeMachs, + IRIX_STDINT_C99_MODE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aIrix_Stdint_C99_ModeTests, apzIrix_Stdint_C99_ModePatch, 0 }, + + { zIrix_Stdint_C99_TypesName, zIrix_Stdint_C99_TypesList, + apzIrix_Stdint_C99_TypesMachs, + IRIX_STDINT_C99_TYPES_TEST_CT, FD_MACH_ONLY, + aIrix_Stdint_C99_TypesTests, apzIrix_Stdint_C99_TypesPatch, 0 }, + + { zIrix_Stdint_C99_MacrosName, zIrix_Stdint_C99_MacrosList, + apzIrix_Stdint_C99_MacrosMachs, + IRIX_STDINT_C99_MACROS_TEST_CT, FD_MACH_ONLY, + aIrix_Stdint_C99_MacrosTests, apzIrix_Stdint_C99_MacrosPatch, 0 }, { zIrix_Stdio_Va_ListName, zIrix_Stdio_Va_ListList, apzIrix_Stdio_Va_ListMachs, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index da4a94c..ad19ccd 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -391,7 +391,7 @@ fix = { fix = { hackname = aix_stdint_1; mach = "*-*-aix*"; - files = stdint.h; + files = stdint-aix.h, stdint.h; select = "#define[ \t]UINT8_MAX[ \t]\\(255U\\)\n" "#define[ \t]UINT16_MAX[ \t]\\(65535U\\)"; c_fix = format; @@ -405,7 +405,7 @@ fix = { fix = { hackname = aix_stdint_2; mach = "*-*-aix*"; - files = stdint.h; + files = stdint-aix.h, 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" @@ -434,7 +434,7 @@ fix = { fix = { hackname = aix_stdint_3; mach = "*-*-aix*"; - files = stdint.h; + files = stdint-aix.h, stdint.h; select = "#define[ \t]PTRDIFF_MIN[ \t]INT64_MIN\n" "#define[ \t]PTRDIFF_MAX[ \t]INT64_MAX\n" "#else\n" @@ -457,7 +457,7 @@ fix = { fix = { hackname = aix_stdint_4; mach = "*-*-aix*"; - files = stdint.h; + files = stdint-aix.h, stdint.h; select = "#define[ \t]SIZE_MAX[ \t]UINT64_MAX\n" "#else\n" "#define[ \t]SIZE_MAX[ \t]*UINT32_MAX"; @@ -474,7 +474,7 @@ fix = { fix = { hackname = aix_stdint_5; mach = "*-*-aix*"; - files = stdint.h; + files = stdint-aix.h, 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; @@ -1144,7 +1144,7 @@ fix = { fix = { hackname = darwin_stdint_1; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#define UINT8_C(v)\tv\n#define UINT16_C(v)\tv"; select = "#define UINT8_C\\(v\\)[ \t]+\\(v ## U\\)\n" @@ -1161,7 +1161,7 @@ fix = { fix = { hackname = darwin_stdint_2; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#if __WORDSIZE == 64\n" "#define INTPTR_MAX 9223372036854775807L\n" @@ -1193,7 +1193,7 @@ fix = { fix = { hackname = darwin_stdint_3; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#if __WORDSIZE == 64\n" "#define UINTPTR_MAX 18446744073709551615UL\n" @@ -1219,7 +1219,7 @@ fix = { fix = { hackname = darwin_stdint_4; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#if __WORDSIZE == 64\n" "#define SIZE_MAX 18446744073709551615UL\n" @@ -1246,7 +1246,7 @@ fix = { fix = { hackname = darwin_stdint_5; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#if __WORDSIZE == 64\n" "#define INTMAX_MIN (-9223372036854775807L - 1)\n" @@ -1275,7 +1275,7 @@ fix = { fix = { hackname = darwin_stdint_6; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#if __WORDSIZE == 64\n" "#define PTRDIFF_MIN (-9223372036854775807L - 1)\n" @@ -1308,7 +1308,7 @@ fix = { fix = { hackname = darwin_stdint_7; mach = "*-*-darwin*"; - files = stdint.h; + files = stdint-darwin.h, stdint.h; c_fix = format; c_fix_arg = "#if __WORDSIZE == 64\n" "#define INTMAX_C(v) (v ## L)\n" @@ -2158,7 +2158,7 @@ fix = { fix = { hackname = hpux_c99_intptr; mach = "*-hp-hpux11.3*"; - files = stdint.h; + files = stdint-hpux11.h, stdint.h; sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@"; sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@"; @@ -2181,7 +2181,7 @@ fix = { hackname = hpux_c99_inttypes; mach = "*-hp-hpux11.[23]*"; files = inttypes.h; - files = stdint.h; + files = stdint-hpux11.h, stdint.h; sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@"; sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@"; sed = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@"; @@ -2195,7 +2195,7 @@ fix = { fix = { hackname = hpux_c99_inttypes2; mach = "*-hp-hpux11.2*"; - files = stdint.h; + files = stdint-hpux11.h, stdint.h; sed = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@"; sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@"; sed = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@"; @@ -2209,7 +2209,7 @@ fix = { fix = { hackname = hpux_stdint_least_fast; mach = "*-hp-hpux11.2*"; - files = stdint.h; + files = stdint-hpux11.h, stdint.h; select = "^[ \t]*#[ \t]*define[ \t]+UINT_(LEAST|FAST)64_MAX[ \t]+ULLONG_MAX"; c_fix = format; @@ -2511,7 +2511,7 @@ fix = { * otherwise. */ fix = { - hackname = irix_stdint_c99; + hackname = irix_stdint_c99_mode; files = stdint.h; select = "(#ifndef __c99\n)(#error This header file is to be used only for c99 mode compilations)"; @@ -2525,6 +2525,87 @@ fix = { /* + * IRIX 6.5 has some *_MIN/MAX constants whose types don't + * match the corresponding types, as required by ISO C99. + */ +fix = { + hackname = irix_stdint_c99_types; + files = stdint-irix65.h, stdint.h; + mach = "mips-sgi-irix6.5"; + sed = "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@" + "#define INT64_MIN (-0x7fffffffffffffffLL - 1)@"; + sed = "s@^#define INT64_MAX.*0x7fffffffffffffff$@" + "#define INT64_MAX 0x7fffffffffffffffLL@"; + sed = "s@^#define UINT32_MAX.*0xffffffff$@" + "#define UINT32_MAX 0xffffffffU@"; + sed = "s@^#define UINT64_MAX.*0xffffffffffffffff$@" + "#define UINT64_MAX 0xffffffffffffffffULL@"; + sed = "s@^#define INTPTR_MIN.*INT32_MIN$@" + "#define INTPTR_MIN (-0x7fffffffL - 1)@"; + sed = "s@^#define INTPTR_MAX.*INT32_MAX$@" + "#define INTPTR_MAX 0x7fffffffL@"; + sed = "s@^#define UINTPTR_MAX.*UINT32_MAX$@" + "#define UINTPTR_MAX 0xffffffffUL@"; + sed = "s@^#define INTPTR_MIN.*INT64_MIN@" + "#define INTPTR_MIN (-0x7fffffffffffffffL - 1)@"; + sed = "s@^#define INTPTR_MAX.*INT64_MAX$@" + "#define INTPTR_MAX 0x7fffffffffffffffL@"; + sed = "s@^#define UINTPTR_MAX.*UINT64_MAX$@" + "#define UINTPTR_MAX 0xffffffffffffffffUL@"; + sed = "s@^#define PTRDIFF_MIN.*INT64_MIN$@" + "#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1)@"; + sed = "s@^#define PTRDIFF_MAX.*INT64_MAX$@" + "#define PTRDIFF_MAX 0x7fffffffffffffffL@"; + sed = "s@^#define SIZE_MAX.*UINT64_MAX$@" + "#define SIZE_MAX 0xffffffffffffffffUL@"; + test_text = "#define INT64_MIN (-0x7fffffffffffffff - 1)\n" + "#define INT64_MAX 0x7fffffffffffffff\n" + "#define UINT32_MAX 0xffffffff\n" + "#define UINT64_MAX 0xffffffffffffffff\n" + "#define INTPTR_MIN INT32_MIN\n" + "#define INTPTR_MAX INT32_MAX\n" + "#define UINTPTR_MAX UINT32_MAX\n" + "#define INTPTR_MIN INT64_MIN\n" + "#define INTPTR_MAX INT64_MAX\n" + "#define UINTPTR_MAX UINT64_MAX\n" + "#define PTRDIFF_MIN INT64_MIN\n" + "#define PTRDIFF_MAX INT64_MAX\n" + "#define SIZE_MAX UINT64_MAX"; +}; + + +/* + * IRIX 6.5 uses casts in some macros which cannot thus be used + * in preprocessor tests, although ISO C99 requires this. + */ +fix = { + hackname = irix_stdint_c99_macros; + files = stdint-irix65.h, stdint.h; + mach = "mips-sgi-irix6.5"; + sed = "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x) (x)@"; + sed = "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x) (x)@"; + sed = "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x) (x)@"; + sed = "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x) (x ## LL)@"; + sed = "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x) (x)@"; + sed = "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x) (x)@"; + sed = "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x) (x ## U)@"; + sed = "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x) (x ## ULL)@"; + sed = "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x) (x ## LL)@"; + sed = "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x) (x ## ULL)@"; + test_text = "#define INT8_C(x) (int_least8_t)(x)\n" + "#define INT16_C(x) (int_least16_t)(x)\n" + "#define INT32_C(x) (int_least32_t)(x)\n" + "#define INT64_C(x) (int_least64_t)(x)\n" + "#define UINT8_C(x) (uint_least8_t)(x)\n" + "#define UINT16_C(x) (uint_least16_t)(x)\n" + "#define UINT32_C(x) (uint_least32_t)(x)\n" + "#define UINT64_C(x) (uint_least64_t)(x)\n" + "#define INTMAX_C(x) (intmax_t)(x)\n" + "#define UINTMAX_C(x) (uintmax_t)(x)"; +}; + + +/* * IRIX 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare * some functions that take a va_list as * taking char *. However, GCC uses void * for va_list, so @@ -2813,7 +2894,7 @@ fix = { versions. */ fix = { hackname = newlib_stdint_1; - files = stdint.h; + files = stdint-newlib.h, stdint.h; select = "@todo - Add support for wint_t types"; sed = "s@#define INT32_MIN.*@#define INT32_MIN (-INT32_MAX - 1)@"; sed = "s@#define INT32_MAX.*@#define INT32_MAX __INT32_MAX__@"; @@ -2849,7 +2930,7 @@ fix = { fix = { hackname = newlib_stdint_2; - files = stdint.h; + files = stdint-newlib.h, stdint.h; select = "@todo - Add support for wint_t types"; c_fix = format; c_fix_arg = "#define INTMAX_MAX __INTMAX_MAX__\n" diff --git a/fixincludes/tests/base/stdint-aix.h b/fixincludes/tests/base/stdint-aix.h new file mode 100644 index 0000000..1560e75 --- /dev/null +++ b/fixincludes/tests/base/stdint-aix.h @@ -0,0 +1,48 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/stdint-aix.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( AIX_STDINT_1_CHECK ) +#define UINT8_MAX (255) +#define UINT16_MAX (65535) +#endif /* AIX_STDINT_1_CHECK */ + + +#if defined( AIX_STDINT_2_CHECK ) +#define INTPTR_MIN (-INTPTR_MAX-1) +#define INTPTR_MAX 9223372036854775807L +#define UINTPTR_MAX 18446744073709551615UL +#else +#define INTPTR_MIN (-INTPTR_MAX-1) +#define INTPTR_MAX 2147483647L +#define UINTPTR_MAX 4294967295UL +#endif /* AIX_STDINT_2_CHECK */ + + +#if defined( AIX_STDINT_3_CHECK ) +#define PTRDIFF_MIN (-9223372036854775807L - 1) +#define PTRDIFF_MAX 9223372036854775807L +#else +#define PTRDIFF_MIN (-2147483647L - 1) +#define PTRDIFF_MAX 2147483647L +#endif /* AIX_STDINT_3_CHECK */ + + +#if defined( AIX_STDINT_4_CHECK ) +#define SIZE_MAX 18446744073709551615UL +#else +#define SIZE_MAX 4294967295UL +#endif /* AIX_STDINT_4_CHECK */ + + +#if defined( AIX_STDINT_5_CHECK ) +#define UINT8_C(c) c +#define UINT16_C(c) c +#endif /* AIX_STDINT_5_CHECK */ diff --git a/fixincludes/tests/base/stdint-darwin.h b/fixincludes/tests/base/stdint-darwin.h new file mode 100644 index 0000000..7a5d6da --- /dev/null +++ b/fixincludes/tests/base/stdint-darwin.h @@ -0,0 +1,79 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/stdint-darwin.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( DARWIN_STDINT_1_CHECK ) +#define UINT8_C(v) v +#define UINT16_C(v) v +#endif /* DARWIN_STDINT_1_CHECK */ + + +#if defined( DARWIN_STDINT_2_CHECK ) +#if __WORDSIZE == 64 +#define INTPTR_MAX 9223372036854775807L +#define INTPTR_MIN (-INTPTR_MAX-1) +#else +#define INTPTR_MAX 2147483647L +#define INTPTR_MIN (-INTPTR_MAX-1) +#endif +#endif /* DARWIN_STDINT_2_CHECK */ + + +#if defined( DARWIN_STDINT_3_CHECK ) +#if __WORDSIZE == 64 +#define UINTPTR_MAX 18446744073709551615UL +#else +#define UINTPTR_MAX 4294967295UL +#endif +#endif /* DARWIN_STDINT_3_CHECK */ + + +#if defined( DARWIN_STDINT_4_CHECK ) +#if __WORDSIZE == 64 +#define SIZE_MAX 18446744073709551615UL +#else +#define SIZE_MAX 4294967295UL +#endif +#endif /* DARWIN_STDINT_4_CHECK */ + + +#if defined( DARWIN_STDINT_5_CHECK ) +#if __WORDSIZE == 64 +#define INTMAX_MIN (-9223372036854775807L - 1) +#define INTMAX_MAX 9223372036854775807L +#define UINTMAX_MAX 18446744073709551615UL +#else +#define INTMAX_MIN (-9223372036854775807LL - 1) +#define INTMAX_MAX 9223372036854775807LL +#define UINTMAX_MAX 18446744073709551615ULL +#endif +#endif /* DARWIN_STDINT_5_CHECK */ + + +#if defined( DARWIN_STDINT_6_CHECK ) +#if __WORDSIZE == 64 +#define PTRDIFF_MIN (-9223372036854775807L - 1) +#define PTRDIFF_MAX 9223372036854775807L +#else +#define PTRDIFF_MIN (-2147483647 - 1) +#define PTRDIFF_MAX 2147483647 +#endif +#endif /* DARWIN_STDINT_6_CHECK */ + + +#if defined( DARWIN_STDINT_7_CHECK ) +#if __WORDSIZE == 64 +#define INTMAX_C(v) (v ## L) +#define UINTMAX_C(v) (v ## UL) +#else +#define INTMAX_C(v) (v ## LL) +#define UINTMAX_C(v) (v ## ULL) +#endif +#endif /* DARWIN_STDINT_7_CHECK */ diff --git a/fixincludes/tests/base/stdint-hpux11.h b/fixincludes/tests/base/stdint-hpux11.h new file mode 100644 index 0000000..6e8ea13 --- /dev/null +++ b/fixincludes/tests/base/stdint-hpux11.h @@ -0,0 +1,36 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/stdint-hpux11.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( HPUX_C99_INTPTR_CHECK ) +#define PTRDIFF_MAX (2147483647l) +#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) +#define INTPTR_MAX (2147483647l) +#define INTPTR_MIN (-INTPTR_MAX - 1) +#define UINTPTR_MAX (4294967295ul) +#define SIZE_MAX (4294967295ul) + +#endif /* HPUX_C99_INTPTR_CHECK */ + + +#if defined( HPUX_C99_INTTYPES2_CHECK ) +#define INT8_C(__c) (__c) +#define UINT8_C(__c) (__c) +#define INT16_C(__c) (__c) +#define UINT16_C(__c) (__c) + +#endif /* HPUX_C99_INTTYPES2_CHECK */ + + +#if defined( HPUX_STDINT_LEAST_FAST_CHECK ) +# define UINT_FAST64_MAX __UINT64_MAX__ +# define UINT_LEAST64_MAX __UINT64_MAX__ + +#endif /* HPUX_STDINT_LEAST_FAST_CHECK */ diff --git a/fixincludes/tests/base/stdint-irix65.h b/fixincludes/tests/base/stdint-irix65.h new file mode 100644 index 0000000..d1757fb --- /dev/null +++ b/fixincludes/tests/base/stdint-irix65.h @@ -0,0 +1,40 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/stdint-irix65.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( IRIX_STDINT_C99_TYPES_CHECK ) +#define INT64_MIN (-0x7fffffffffffffffLL - 1) +#define INT64_MAX 0x7fffffffffffffffLL +#define UINT32_MAX 0xffffffffU +#define UINT64_MAX 0xffffffffffffffffULL +#define INTPTR_MIN (-0x7fffffffL - 1) +#define INTPTR_MAX 0x7fffffffL +#define UINTPTR_MAX 0xffffffffUL +#define INTPTR_MIN (-0x7fffffffffffffffL - 1) +#define INTPTR_MAX 0x7fffffffffffffffL +#define UINTPTR_MAX 0xffffffffffffffffUL +#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1) +#define PTRDIFF_MAX 0x7fffffffffffffffL +#define SIZE_MAX 0xffffffffffffffffUL +#endif /* IRIX_STDINT_C99_TYPES_CHECK */ + + +#if defined( IRIX_STDINT_C99_MACROS_CHECK ) +#define INT8_C(x) (x) +#define INT16_C(x) (x) +#define INT32_C(x) (x) +#define INT64_C(x) (x ## LL) +#define UINT8_C(x) (x) +#define UINT16_C(x) (x) +#define UINT32_C(x) (x ## U) +#define UINT64_C(x) (x ## ULL) +#define INTMAX_C(x) (x ## LL) +#define UINTMAX_C(x) (x ## ULL) +#endif /* IRIX_STDINT_C99_MACROS_CHECK */ diff --git a/fixincludes/tests/base/stdint-newlib.h b/fixincludes/tests/base/stdint-newlib.h new file mode 100644 index 0000000..451a475 --- /dev/null +++ b/fixincludes/tests/base/stdint-newlib.h @@ -0,0 +1,42 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/stdint-newlib.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( NEWLIB_STDINT_1_CHECK ) +/* @todo - Add support for wint_t types. */ +#define INT32_MIN (-INT32_MAX - 1) +#define INT32_MAX __INT32_MAX__ +#define UINT32_MAX __UINT32_MAX__ +#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1) +#define INT_LEAST32_MAX __INT_LEAST32_MAX__ +#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__ +#define INT_FAST8_MIN (-INT_FAST8_MAX - 1) +#define INT_FAST8_MAX __INT_FAST8_MAX__ +#define UINT_FAST8_MAX __UINT_FAST8_MAX__ +#define SIZE_MAX __SIZE_MAX__ +#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) +#define PTRDIFF_MAX __PTRDIFF_MAX__ +#define UINT8_C(c) __UINT8_C(c) +#define UINT16_C(c) __UINT16_C(c) +#endif /* NEWLIB_STDINT_1_CHECK */ + + +#if defined( NEWLIB_STDINT_2_CHECK ) +/* @todo - Add support for wint_t types. */ +#define INTMAX_MAX __INTMAX_MAX__ +#define INTMAX_MIN (-INTMAX_MAX - 1) +#define UINTMAX_MAX __UINTMAX_MAX__ +#define WCHAR_MAX __WCHAR_MAX__ +#define WCHAR_MIN __WCHAR_MIN__ +#define WINT_MAX __WINT_MAX__ +#define WINT_MIN __WINT_MIN__ + +/** Macros for minimum-width integer constant expressions */ +#endif /* NEWLIB_STDINT_2_CHECK */ diff --git a/fixincludes/tests/base/stdint.h b/fixincludes/tests/base/stdint.h index 3159505..3d897f8 100644 --- a/fixincludes/tests/base/stdint.h +++ b/fixincludes/tests/base/stdint.h @@ -9,115 +9,6 @@ -#if defined( AIX_STDINT_1_CHECK ) -#define UINT8_MAX (255) -#define UINT16_MAX (65535) -#endif /* AIX_STDINT_1_CHECK */ - - -#if defined( AIX_STDINT_2_CHECK ) -#define INTPTR_MIN (-INTPTR_MAX-1) -#define INTPTR_MAX 9223372036854775807L -#define UINTPTR_MAX 18446744073709551615UL -#else -#define INTPTR_MIN (-INTPTR_MAX-1) -#define INTPTR_MAX 2147483647L -#define UINTPTR_MAX 4294967295UL -#endif /* AIX_STDINT_2_CHECK */ - - -#if defined( AIX_STDINT_3_CHECK ) -#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) -#define PTRDIFF_MAX __PTRDIFF_MAX__ -#else -#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) -#define PTRDIFF_MAX __PTRDIFF_MAX__ -#endif /* AIX_STDINT_3_CHECK */ - - -#if defined( AIX_STDINT_4_CHECK ) -#define SIZE_MAX __SIZE_MAX__ -#else -#define SIZE_MAX __SIZE_MAX__ -#endif /* AIX_STDINT_4_CHECK */ - - -#if defined( AIX_STDINT_5_CHECK ) -#define UINT8_C(c) __UINT8_C(c) -#define UINT16_C(c) __UINT16_C(c) -#endif /* AIX_STDINT_5_CHECK */ - - -#if defined( DARWIN_STDINT_1_CHECK ) -#define UINT8_C(c) __UINT8_C(c) -#define UINT16_C(c) __UINT16_C(c) -#endif /* DARWIN_STDINT_1_CHECK */ - - -#if defined( DARWIN_STDINT_2_CHECK ) -#if __WORDSIZE == 64 -#define INTPTR_MAX 9223372036854775807L -#define INTPTR_MIN (-INTPTR_MAX-1) -#else -#define INTPTR_MAX 2147483647L -#define INTPTR_MIN (-INTPTR_MAX-1) -#endif -#endif /* DARWIN_STDINT_2_CHECK */ - - -#if defined( DARWIN_STDINT_3_CHECK ) -#if __WORDSIZE == 64 -#define UINTPTR_MAX 18446744073709551615UL -#else -#define UINTPTR_MAX 4294967295UL -#endif -#endif /* DARWIN_STDINT_3_CHECK */ - - -#if defined( DARWIN_STDINT_4_CHECK ) -#if __WORDSIZE == 64 -#define SIZE_MAX __SIZE_MAX__ -#else -#define SIZE_MAX __SIZE_MAX__ -#endif -#endif /* DARWIN_STDINT_4_CHECK */ - - -#if defined( DARWIN_STDINT_5_CHECK ) -#if __WORDSIZE == 64 -#define INTMAX_MIN (-9223372036854775807L - 1) -#define INTMAX_MAX 9223372036854775807L -#define UINTMAX_MAX 18446744073709551615UL -#else -#define INTMAX_MIN (-9223372036854775807LL - 1) -#define INTMAX_MAX 9223372036854775807LL -#define UINTMAX_MAX 18446744073709551615ULL -#endif -#endif /* DARWIN_STDINT_5_CHECK */ - - -#if defined( DARWIN_STDINT_6_CHECK ) -#if __WORDSIZE == 64 -#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) -#define PTRDIFF_MAX __PTRDIFF_MAX__ -#else -#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) -#define PTRDIFF_MAX __PTRDIFF_MAX__ -#endif -#endif /* DARWIN_STDINT_6_CHECK */ - - -#if defined( DARWIN_STDINT_7_CHECK ) -#if __WORDSIZE == 64 -#define INTMAX_C(v) (v ## L) -#define UINTMAX_C(v) (v ## UL) -#else -#define INTMAX_C(v) (v ## LL) -#define UINTMAX_C(v) (v ## ULL) -#endif -#endif /* DARWIN_STDINT_7_CHECK */ - - #if defined( GLIBC_STDINT_CHECK ) /* This file is part of the GNU C Library. */ # define UINT8_C(c) c @@ -125,68 +16,8 @@ #endif /* GLIBC_STDINT_CHECK */ -#if defined( HPUX_C99_INTPTR_CHECK ) -#define PTRDIFF_MAX __PTRDIFF_MAX__ -#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) -#define INTPTR_MAX (2147483647l) -#define INTPTR_MIN (-INTPTR_MAX - 1) -#define UINTPTR_MAX (4294967295ul) -#define SIZE_MAX __SIZE_MAX__ - -#endif /* HPUX_C99_INTPTR_CHECK */ - - -#if defined( HPUX_C99_INTTYPES2_CHECK ) -#define INT8_C(__c) (__c) -#define UINT8_C(c) __UINT8_C(c) -#define INT16_C(__c) (__c) -#define UINT16_C(c) __UINT16_C(c) - -#endif /* HPUX_C99_INTTYPES2_CHECK */ - - -#if defined( HPUX_STDINT_LEAST_FAST_CHECK ) -# define UINT_FAST64_MAX __UINT64_MAX__ -# define UINT_LEAST64_MAX __UINT64_MAX__ - -#endif /* HPUX_STDINT_LEAST_FAST_CHECK */ - - -#if defined( IRIX_STDINT_C99_CHECK ) +#if defined( IRIX_STDINT_C99_MODE_CHECK ) #if 0 #error This header file is to be used only for c99 mode compilations #else -#endif /* IRIX_STDINT_C99_CHECK */ - - -#if defined( NEWLIB_STDINT_1_CHECK ) -/* @todo - Add support for wint_t types. */ -#define INT32_MIN (-INT32_MAX - 1) -#define INT32_MAX __INT32_MAX__ -#define UINT32_MAX __UINT32_MAX__ -#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1) -#define INT_LEAST32_MAX __INT_LEAST32_MAX__ -#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__ -#define INT_FAST8_MIN (-INT_FAST8_MAX - 1) -#define INT_FAST8_MAX __INT_FAST8_MAX__ -#define UINT_FAST8_MAX __UINT_FAST8_MAX__ -#define SIZE_MAX __SIZE_MAX__ -#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) -#define PTRDIFF_MAX __PTRDIFF_MAX__ -#define UINT8_C(c) __UINT8_C(c) -#define UINT16_C(c) __UINT16_C(c) -#endif /* NEWLIB_STDINT_1_CHECK */ - - -#if defined( NEWLIB_STDINT_2_CHECK ) -/* @todo - Add support for wint_t types. */ -#define INTMAX_MAX __INTMAX_MAX__ -#define INTMAX_MIN (-INTMAX_MAX - 1) -#define UINTMAX_MAX __UINTMAX_MAX__ -#define WCHAR_MAX __WCHAR_MAX__ -#define WCHAR_MIN __WCHAR_MIN__ -#define WINT_MAX __WINT_MAX__ -#define WINT_MIN __WINT_MIN__ - -/** Macros for minimum-width integer constant expressions */ -#endif /* NEWLIB_STDINT_2_CHECK */ +#endif /* IRIX_STDINT_C99_MODE_CHECK */ diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5bb9066..d5ce27a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,21 @@ +2010-01-26 Rainer Orth + + * config.gcc (mips-sgi-irix[56]*): Set use_gcc_stdint. + * config/mips/iris.h (INT8_TYPE, INT16_TYPE, INT32_TYPE, + INT64_TYPE): Define. + (UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE): Define. + (INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE, + INT_LEAST64_TYPE): Define. + (UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE, + UINT_LEAST64_TYPE): Define. + (INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE) + INT_FAST64_TYPE): Define. + (UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE, + UINT_FAST64_TYPE): Define. + (INTMAX_TYPE, UINTMAX_TYPE): Define. + (INTPTR_TYPE, UINTPTR_TYPE): Define. + (SIG_ATOMIC_TYPE): Define. + 2010-01-26 Richard Guenther * df-scan.c (df_scan_set_bb_info): Remove assert. diff --git a/gcc/config.gcc b/gcc/config.gcc index 1c7cb37f..3b61af4 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1,6 +1,6 @@ # GCC target-specific configuration file. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010 Free Software Foundation, Inc. #This file is part of GCC. @@ -1655,12 +1655,23 @@ mips-sgi-irix[56]*) case ${target} in *-*-irix5*) tm_file="${tm_file} mips/iris5.h" + use_gcc_stdint=provide ;; *-*-irix6*) tm_file="${tm_file} mips/iris6.h" tmake_file="${tmake_file} mips/t-iris6" tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" + case ${target} in + *-*-irix6.[0-4]*) + use_gcc_stdint=provide + ;; + *-*-irix6.5*) + # Only IRIX Development Foundation 1.3 for IRIX 6.5 + # provides stdint.h. + use_gcc_stdint=wrap + ;; + esac ;; esac if test "x$stabs" = xyes diff --git a/gcc/config/mips/iris.h b/gcc/config/mips/iris.h index 2443193..f22f3cd 100644 --- a/gcc/config/mips/iris.h +++ b/gcc/config/mips/iris.h @@ -78,6 +78,42 @@ along with GCC; see the file COPYING3. If not see #undef WINT_TYPE_SIZE #define WINT_TYPE_SIZE 32 +/* C99 stdint.h types. */ +#define INT8_TYPE "signed char" +#define INT16_TYPE "short int" +#define INT32_TYPE "int" +#define INT64_TYPE "long long int" +#define UINT8_TYPE "unsigned char" +#define UINT16_TYPE "short unsigned int" +#define UINT32_TYPE "unsigned int" +#define UINT64_TYPE "long long unsigned int" + +#define INT_LEAST8_TYPE "signed char" +#define INT_LEAST16_TYPE "short int" +#define INT_LEAST32_TYPE "int" +#define INT_LEAST64_TYPE "long long int" +#define UINT_LEAST8_TYPE "unsigned char" +#define UINT_LEAST16_TYPE "short unsigned int" +#define UINT_LEAST32_TYPE "unsigned int" +#define UINT_LEAST64_TYPE "long long unsigned int" + +#define INT_FAST8_TYPE "signed char" +#define INT_FAST16_TYPE "short int" +#define INT_FAST32_TYPE "int" +#define INT_FAST64_TYPE "long long int" +#define UINT_FAST8_TYPE "unsigned char" +#define UINT_FAST16_TYPE "short unsigned int" +#define UINT_FAST32_TYPE "unsigned int" +#define UINT_FAST64_TYPE "long long unsigned int" + +#define INTMAX_TYPE "long long int" +#define UINTMAX_TYPE "long long unsigned int" + +#define INTPTR_TYPE "long int" +#define UINTPTR_TYPE "long unsigned int" + +#define SIG_ATOMIC_TYPE "int" + /* Plain char is unsigned in the SGI compiler. */ #undef DEFAULT_SIGNED_CHAR #define DEFAULT_SIGNED_CHAR 0 -- cgit v1.1