Commit 3edc4b23 by Krister Walfridsson Committed by Krister Walfridsson

inclhack.def (netbsd_bogus_semicolon): New fix.

2003-02-18  Krister Walfridsson  <cato@df.lth.se>

	* inclhack.def (netbsd_bogus_semicolon): New fix.
	* fixincl.x: Rebuilt.
	* tests/base/ctype.h: Update.

From-SVN: r63061
parent 080ea642
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> 2003-02-18 Roger Sayle <roger@eyesopen.com>
* fold-const.c (negate_expr_p): New function to determine whether * fold-const.c (negate_expr_p): New function to determine whether
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a * files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search. * directory that GNU C will search.
* *
* This file contains 142 fixup descriptions. * This file contains 143 fixup descriptions.
* *
* See README for more information. * See README for more information.
* *
...@@ -3017,6 +3017,43 @@ static const char* apzNested_Sys_LimitsPatch[] = { "sed", ...@@ -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 * Description of Next_Math_Prefix fix
*/ */
tSCC zNext_Math_PrefixName[] = tSCC zNext_Math_PrefixName[] =
...@@ -5608,9 +5645,9 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -5608,9 +5645,9 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 154 #define REGEX_COUNT 155
#define MACH_LIST_SIZE_LIMIT 261 #define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 142 #define FIX_COUNT 143
/* /*
* Enumerate the fixes * Enumerate the fixes
...@@ -5690,6 +5727,7 @@ typedef enum { ...@@ -5690,6 +5727,7 @@ typedef enum {
NESTED_AUTH_DES_FIXIDX, NESTED_AUTH_DES_FIXIDX,
NESTED_MOTOROLA_FIXIDX, NESTED_MOTOROLA_FIXIDX,
NESTED_SYS_LIMITS_FIXIDX, NESTED_SYS_LIMITS_FIXIDX,
NETBSD_EXTRA_SEMICOLON_FIXIDX,
NEXT_MATH_PREFIX_FIXIDX, NEXT_MATH_PREFIX_FIXIDX,
NEXT_TEMPLATE_FIXIDX, NEXT_TEMPLATE_FIXIDX,
NEXT_VOLITILE_FIXIDX, NEXT_VOLITILE_FIXIDX,
...@@ -6131,6 +6169,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -6131,6 +6169,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
NESTED_SYS_LIMITS_TEST_CT, FD_MACH_ONLY, NESTED_SYS_LIMITS_TEST_CT, FD_MACH_ONLY,
aNested_Sys_LimitsTests, apzNested_Sys_LimitsPatch, 0 }, 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, { zNext_Math_PrefixName, zNext_Math_PrefixList,
apzNext_Math_PrefixMachs, apzNext_Math_PrefixMachs,
NEXT_MATH_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, NEXT_MATH_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
......
...@@ -1710,6 +1710,22 @@ fix = { ...@@ -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. * NeXT 3.2 adds const prefix to some math functions.
* These conflict with the built-in functions. * These conflict with the built-in functions.
*/ */
......
...@@ -12,3 +12,8 @@ ...@@ -12,3 +12,8 @@
#if defined( FREEBSD_GCC3_BREAKAGE_CHECK ) #if defined( FREEBSD_GCC3_BREAKAGE_CHECK )
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3 #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3
#endif /* FREEBSD_GCC3_BREAKAGE_CHECK */ #endif /* FREEBSD_GCC3_BREAKAGE_CHECK */
#if defined( NETBSD_EXTRA_SEMICOLON_CHECK )
#define __END_DECLS }
#endif /* NETBSD_EXTRA_SEMICOLON_CHECK */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment