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
This commit is contained in:
Krister Walfridsson 2003-02-18 21:05:02 +01:00 committed by Krister Walfridsson
parent 080ea642c0
commit 3edc4b23d8
4 changed files with 73 additions and 3 deletions

View File

@ -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

View File

@ -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.
*
@ -3015,6 +3015,43 @@ static const char* apzNested_Sys_LimitsPatch[] = { "sed",
"-e", "/OPEN_MAX/s,/\\* Max, Max,",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* 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
@ -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,

View File

@ -1709,6 +1709,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.

View File

@ -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 */