diff options
author | kristerw <kristerw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-18 20:05:02 +0000 |
---|---|---|
committer | kristerw <kristerw@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-18 20:05:02 +0000 |
commit | 81a897fb72efe3e29849b738731349509ea09f83 (patch) | |
tree | af53f665d9264693cfed9e8943f4c0e68100da0f /gcc | |
parent | 223316432a64192dbd31e793e0fb4412f53240b0 (diff) | |
download | gcc-81a897fb72efe3e29849b738731349509ea09f83.tar.gz |
2003-02-18 Krister Walfridsson <cato@df.lth.se>
* inclhack.def (netbsd_bogus_semicolon): New fix.
* fixincl.x: Rebuilt.
* tests/base/ctype.h: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.x | 49 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 16 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/sys/cdefs.h | 5 |
4 files changed, 73 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 42b21cf4d32..c69a4d4bda5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-02-18 Krister Walfridsson <cato@df.lth.se> + + * inclhack.def (netbsd_bogus_semicolon): New fix. + * fixincl.x: Rebuilt. + * tests/base/ctype.h: Update. + 2003-02-18 Roger Sayle <roger@eyesopen.com> * fold-const.c (negate_expr_p): New function to determine whether diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 7d3861f82b3..7a8c5c6326b 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -5,7 +5,7 @@ * files which are fixed to work correctly with ANSI C and placed in a * directory that GNU C will search. * - * This file contains 142 fixup descriptions. + * This file contains 143 fixup descriptions. * * See README for more information. * @@ -3017,6 +3017,43 @@ static const char* apzNested_Sys_LimitsPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Netbsd_Extra_Semicolon fix + */ +tSCC zNetbsd_Extra_SemicolonName[] = + "netbsd_extra_semicolon"; + +/* + * File name selection pattern + */ +tSCC zNetbsd_Extra_SemicolonList[] = + "|sys/cdefs.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzNetbsd_Extra_SemicolonMachs[] = { + "*-*-netbsd*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zNetbsd_Extra_SemicolonSelect0[] = + "#define[ \t]*__END_DECLS[ \t]*};"; + +#define NETBSD_EXTRA_SEMICOLON_TEST_CT 1 +static tTestDesc aNetbsd_Extra_SemicolonTests[] = { + { TT_EGREP, zNetbsd_Extra_SemicolonSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Netbsd_Extra_Semicolon + */ +static const char* apzNetbsd_Extra_SemicolonPatch[] = { + "format", + "#define __END_DECLS }", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Next_Math_Prefix fix */ tSCC zNext_Math_PrefixName[] = @@ -5608,9 +5645,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 154 +#define REGEX_COUNT 155 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 142 +#define FIX_COUNT 143 /* * Enumerate the fixes @@ -5690,6 +5727,7 @@ typedef enum { NESTED_AUTH_DES_FIXIDX, NESTED_MOTOROLA_FIXIDX, NESTED_SYS_LIMITS_FIXIDX, + NETBSD_EXTRA_SEMICOLON_FIXIDX, NEXT_MATH_PREFIX_FIXIDX, NEXT_TEMPLATE_FIXIDX, NEXT_VOLITILE_FIXIDX, @@ -6131,6 +6169,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { NESTED_SYS_LIMITS_TEST_CT, FD_MACH_ONLY, aNested_Sys_LimitsTests, apzNested_Sys_LimitsPatch, 0 }, + { zNetbsd_Extra_SemicolonName, zNetbsd_Extra_SemicolonList, + apzNetbsd_Extra_SemicolonMachs, + NETBSD_EXTRA_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aNetbsd_Extra_SemicolonTests, apzNetbsd_Extra_SemicolonPatch, 0 }, + { zNext_Math_PrefixName, zNext_Math_PrefixList, apzNext_Math_PrefixMachs, NEXT_MATH_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 4381fb59486..8ebfe1a5765 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1710,6 +1710,22 @@ fix = { /* + * NetBSD has a semicolon after the ending '}' for some extern "C". + */ +fix = { + hackname = netbsd_extra_semicolon; + mach = *-*-netbsd*; + files = sys/cdefs.h; + select = "#define[ \t]*__END_DECLS[ \t]*};"; + + c_fix = format; + c_fix_arg = "#define __END_DECLS }"; + + test_text = "#define __END_DECLS };"; +}; + + +/* * NeXT 3.2 adds const prefix to some math functions. * These conflict with the built-in functions. */ diff --git a/gcc/fixinc/tests/base/sys/cdefs.h b/gcc/fixinc/tests/base/sys/cdefs.h index 0b345a48ee4..8d95282d272 100644 --- a/gcc/fixinc/tests/base/sys/cdefs.h +++ b/gcc/fixinc/tests/base/sys/cdefs.h @@ -12,3 +12,8 @@ #if defined( FREEBSD_GCC3_BREAKAGE_CHECK ) #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3 #endif /* FREEBSD_GCC3_BREAKAGE_CHECK */ + + +#if defined( NETBSD_EXTRA_SEMICOLON_CHECK ) +#define __END_DECLS } +#endif /* NETBSD_EXTRA_SEMICOLON_CHECK */ |