diff options
-rw-r--r-- | fixincludes/ChangeLog | 6 | ||||
-rw-r--r-- | fixincludes/fixincl.x | 60 | ||||
-rw-r--r-- | fixincludes/inclhack.def | 11 |
3 files changed, 72 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 9ccdf18693b..cfd7f4aceff 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,9 @@ +2006-06-23 Steve Ellcey <sje@cup.hp.com> + + PR target/28084 + * inclhack.def (hpux_extern_errno): New. + * fixincl.x: Regenerate. + 2006-05-23 Carlos O'Donell <carlos@codesourcery.com> * Makefile.in: Add dvi info html and install-html to .PHONY diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 7e6c5a65c8b..9b2a10c9b5c 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 Saturday February 18, 2006 at 07:55:23 AM PST + * It has been AutoGen-ed Thursday June 22, 2006 at 03:07:03 PM PDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Feb 18 07:55:23 PST 2006 +/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jun 22 15:07:03 PDT 2006 * * 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 195 fixup descriptions. + * This file contains 196 fixup descriptions. * * See README for more information. * @@ -2998,6 +2998,50 @@ static const char* apzHpux_Spu_InfoPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Hpux_Extern_Errno fix + */ +tSCC zHpux_Extern_ErrnoName[] = + "hpux_extern_errno"; + +/* + * File name selection pattern + */ +tSCC zHpux_Extern_ErrnoList[] = + "|errno.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_Extern_ErrnoMachs[] = { + "*-hp-hpux10.*", + "*-hp-hpux11.[0-2]*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux_Extern_ErrnoSelect0[] = + "^[ \t]*extern int errno;$"; + +#define HPUX_EXTERN_ERRNO_TEST_CT 1 +static tTestDesc aHpux_Extern_ErrnoTests[] = { + { TT_EGREP, zHpux_Extern_ErrnoSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux_Extern_Errno + */ +static const char* apzHpux_Extern_ErrnoPatch[] = { + "format", + "#ifdef __cplusplus\n\ +extern \"C\" {\n\ +#endif\n\ +%0\n\ +#ifdef __cplusplus\n\ +}\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Huge_Val_Hex fix */ tSCC zHuge_Val_HexName[] = @@ -7933,9 +7977,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 238 +#define REGEX_COUNT 239 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 195 +#define FIX_COUNT 196 /* * Enumerate the fixes @@ -8011,6 +8055,7 @@ typedef enum { HPUX_LONG_DOUBLE_FIXIDX, HPUX_SYSTIME_FIXIDX, HPUX_SPU_INFO_FIXIDX, + HPUX_EXTERN_ERRNO_FIXIDX, HUGE_VAL_HEX_FIXIDX, HUGE_VALF_HEX_FIXIDX, HUGE_VALL_HEX_FIXIDX, @@ -8489,6 +8534,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX_SPU_INFO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux_Spu_InfoTests, apzHpux_Spu_InfoPatch, 0 }, + { zHpux_Extern_ErrnoName, zHpux_Extern_ErrnoList, + apzHpux_Extern_ErrnoMachs, + HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 }, + { zHuge_Val_HexName, zHuge_Val_HexList, apzHuge_Val_HexMachs, HUGE_VAL_HEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 5a5c42343b5..c4a689301b8 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1716,6 +1716,17 @@ fix = { test_text = "extern union mpinfou spu_info[];"; }; +fix = { + hackname = hpux_extern_errno; + mach = "*-hp-hpux10.*"; + mach = "*-hp-hpux11.[0-2]*"; + files = errno.h; + select = "^[ \t]*extern int errno;$"; + c_fix = format; + c_fix_arg = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n%0\n#ifdef __cplusplus\n}\n#endif"; + test_text = " extern int errno;\n"; +}; + /* * Fix glibc definition of HUGE_VAL in terms of hex floating point constant |