From 4cbf73b4bf1d81e7983204180f9c3d2a65a068e6 Mon Sep 17 00:00:00 2001 From: kristerw Date: Mon, 19 Mar 2007 17:08:14 +0000 Subject: [PATCH] 2007-03-18 Krister Walfridsson PR target/30058 * inclhack.def (netbsd_c99_inline_1): New. * fixincl.x: Regenerate. * tests/base/signal.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123065 138bc75d-0d04-0410-961f-82ee72b054a4 --- fixincludes/ChangeLog | 7 ++++ fixincludes/fixincl.x | 57 ++++++++++++++++++++++++++++++--- fixincludes/inclhack.def | 16 +++++++++ fixincludes/tests/base/signal.h | 20 ++++++++++++ 4 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 fixincludes/tests/base/signal.h diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index ac647e5fd586..a5317c46d694 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2007-03-18 Krister Walfridsson + + PR target/30058 + * inclhack.def (netbsd_c99_inline_1): New. + * fixincl.x: Regenerate. + * tests/base/signal.h: New. + 2007-03-12 Brooks Moses * Makefile.in: Add dummy "install-info" target. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index a9e27d8990bb..ca007c290e49 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 Monday February 5, 2007 at 05:19:14 PM PST + * It has been AutoGen-ed Sunday March 18, 2007 at 05:06:12 PM CET * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Feb 5 17:19:14 PST 2007 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Mar 18 17:06:12 CET 2007 * * 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 207 fixup descriptions. + * This file contains 208 fixup descriptions. * * See README for more information. * @@ -4521,6 +4521,47 @@ static const char* apzNested_Sys_LimitsPatch[] = { "sed", "-e", "/OPEN_MAX/s,/\\* Max, Max,", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Netbsd_C99_Inline_1 fix + */ +tSCC zNetbsd_C99_Inline_1Name[] = + "netbsd_c99_inline_1"; + +/* + * File name selection pattern + */ +tSCC zNetbsd_C99_Inline_1List[] = + "signal.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzNetbsd_C99_Inline_1Machs[] = { + "*-*-netbsd*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zNetbsd_C99_Inline_1Select0[] = + "extern __inline int"; + +#define NETBSD_C99_INLINE_1_TEST_CT 1 +static tTestDesc aNetbsd_C99_Inline_1Tests[] = { + { TT_EGREP, zNetbsd_C99_Inline_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Netbsd_C99_Inline_1 + */ +static const char* apzNetbsd_C99_Inline_1Patch[] = { + "format", + "extern\n\ +#ifdef __GNUC_STDC_INLINE__\n\ +__attribute__((__gnu_inline__))\n\ +#endif\n\ +__inline int", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Netbsd_Extra_Semicolon fix @@ -8425,9 +8466,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 251 +#define REGEX_COUNT 252 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 207 +#define FIX_COUNT 208 /* * Enumerate the fixes @@ -8542,6 +8583,7 @@ typedef enum { NESTED_AUTH_DES_FIXIDX, NESTED_MOTOROLA_FIXIDX, NESTED_SYS_LIMITS_FIXIDX, + NETBSD_C99_INLINE_1_FIXIDX, NETBSD_EXTRA_SEMICOLON_FIXIDX, NEXT_MATH_PREFIX_FIXIDX, NEXT_TEMPLATE_FIXIDX, @@ -9188,6 +9230,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { NESTED_SYS_LIMITS_TEST_CT, FD_MACH_ONLY, aNested_Sys_LimitsTests, apzNested_Sys_LimitsPatch, 0 }, + { zNetbsd_C99_Inline_1Name, zNetbsd_C99_Inline_1List, + apzNetbsd_C99_Inline_1Machs, + NETBSD_C99_INLINE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aNetbsd_C99_Inline_1Tests, apzNetbsd_C99_Inline_1Patch, 0 }, + { zNetbsd_Extra_SemicolonName, zNetbsd_Extra_SemicolonList, apzNetbsd_Extra_SemicolonMachs, NETBSD_EXTRA_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index e2ac55c2aa4d..2cc9583b50dc 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2551,6 +2551,22 @@ fix = { }; +/* + * Some versions of NetBSD don't expect the C99 inline semantics. + */ +fix = { + hackname = netbsd_c99_inline_1; + mach = *-*-netbsd*; + files = signal.h; + select = "extern __inline int"; + + c_fix = format; + c_fix_arg = "extern\n#ifdef __GNUC_STDC_INLINE__\n__attribute__((__gnu_inline__))\n#endif\n__inline int"; + + test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}"; +}; + + /* * NetBSD has a semicolon after the ending '}' for some extern "C". */ diff --git a/fixincludes/tests/base/signal.h b/fixincludes/tests/base/signal.h new file mode 100644 index 000000000000..91afbedb01c4 --- /dev/null +++ b/fixincludes/tests/base/signal.h @@ -0,0 +1,20 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/signal.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( NETBSD_C99_INLINE_1_CHECK ) +extern +#ifdef __GNUC_STDC_INLINE__ +__attribute__((__gnu_inline__)) +#endif +__inline int +sigaddset(sigset_t *set, int signo) +{} +#endif /* NETBSD_C99_INLINE_1_CHECK */ -- 2.47.2