From: Loren J. Rittle Date: Tue, 14 Sep 2004 02:45:08 +0000 (+0000) Subject: inclhack.def (freebsd_gcc4_breakage): Add. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28785ddedf751036ef556f8387f3eaf823afe9c8;p=gcc.git inclhack.def (freebsd_gcc4_breakage): Add. * inclhack.def (freebsd_gcc4_breakage): Add. * fixincl.x: Regenerate. From-SVN: r87478 --- diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 0119a597bec..0b2f8f473ed 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,8 @@ +2004-09-13 Loren J. Rittle + + * inclhack.def (freebsd_gcc4_breakage): Add. + * fixincl.x: Regenerate. + 2004-09-10 Adam Nemet * inclhack.def (lynx_void_int): Remove. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 2089ac36824..7faa61ec9b1 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 Thursday September 9, 2004 at 08:07:32 PM PDT + * It has been AutoGen-ed Monday September 13, 2004 at 09:38:32 PM CDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Sep 9 20:07:32 PDT 2004 +/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Sep 13 21:38:32 CDT 2004 * * 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 177 fixup descriptions. + * This file contains 178 fixup descriptions. * * See README for more information. * @@ -1871,6 +1871,43 @@ static const char* apzFreebsd_Gcc3_BreakagePatch[] = { "%0 || __GNUC__ >= 3", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Freebsd_Gcc4_Breakage fix + */ +tSCC zFreebsd_Gcc4_BreakageName[] = + "freebsd_gcc4_breakage"; + +/* + * File name selection pattern + */ +tSCC zFreebsd_Gcc4_BreakageList[] = + "|sys/cdefs.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzFreebsd_Gcc4_BreakageMachs[] = { + "*-*-freebsd*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zFreebsd_Gcc4_BreakageSelect0[] = + "^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 \\|\\| __GNUC__ == 3$"; + +#define FREEBSD_GCC4_BREAKAGE_TEST_CT 1 +static tTestDesc aFreebsd_Gcc4_BreakageTests[] = { + { TT_EGREP, zFreebsd_Gcc4_BreakageSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Freebsd_Gcc4_Breakage + */ +static const char* apzFreebsd_Gcc4_BreakagePatch[] = { + "format", + "#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Gnu_Types fix @@ -7028,9 +7065,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 200 +#define REGEX_COUNT 201 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 177 +#define FIX_COUNT 178 /* * Enumerate the fixes @@ -7080,6 +7117,7 @@ typedef enum { ECD_CURSOR_FIXIDX, EXCEPTION_STRUCTURE_FIXIDX, FREEBSD_GCC3_BREAKAGE_FIXIDX, + FREEBSD_GCC4_BREAKAGE_FIXIDX, GNU_TYPES_FIXIDX, HP_INLINE_FIXIDX, HP_SYSFILE_FIXIDX, @@ -7436,6 +7474,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aFreebsd_Gcc3_BreakageTests, apzFreebsd_Gcc3_BreakagePatch, 0 }, + { zFreebsd_Gcc4_BreakageName, zFreebsd_Gcc4_BreakageList, + apzFreebsd_Gcc4_BreakageMachs, + FREEBSD_GCC4_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aFreebsd_Gcc4_BreakageTests, apzFreebsd_Gcc4_BreakagePatch, 0 }, + { zGnu_TypesName, zGnu_TypesList, apzGnu_TypesMachs, GNU_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index ef32025438a..9a72c0b6b25 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1081,6 +1081,22 @@ fix = { }; +/* + * Some releases of FreeBSD 4 and FreeBSD 5.0 and 5.1 system headers presume + * neither the existence of GCC 4 nor its exact feature set yet break + * (by design?) when __GNUC__ is set beyond 3. + */ +fix = { + hackname = freebsd_gcc4_breakage; + mach = *-*-freebsd*; + files = sys/cdefs.h; + select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 \|\| __GNUC__ == 3$'; + c_fix = format; + c_fix_arg = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3'; + test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3'; +}; + + /* * Fix these files to use the types we think they should for * ptrdiff_t, size_t, and wchar_t.