From: kristerw Date: Wed, 25 Jul 2007 23:51:47 +0000 (+0000) Subject: 2007-07-24 Krister Walfridsson X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=759bfb144806f9fe3aa475ff00b44b52350a45eb;ds=sidebyside 2007-07-24 Krister Walfridsson PR target/30058 * inclhack.def (netbsd_c99_inline_2): New. * fixincl.x: Regenerate. * tests/base/signal.h: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126937 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index eb1e719baf2..c9ad1a795ee 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2007-07-24 Krister Walfridsson + + PR target/30058 + * inclhack.def (netbsd_c99_inline_2): New. + * fixincl.x: Regenerate. + * tests/base/signal.h: Update. + 2007-07-18 Kaveh R. Ghazi PR target/32641 diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 41818d5605a..a330dfe9417 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 July 7, 2007 at 11:23:30 PM EDT + * It has been AutoGen-ed Wednesday July 25, 2007 at 12:50:31 PM CEST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 7 23:23:30 EDT 2007 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Jul 25 12:50:31 CEST 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 210 fixup descriptions. + * This file contains 211 fixup descriptions. * * See README for more information. * @@ -26,7 +26,8 @@ * * You may redistribute it and/or modify it under the terms of the * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. + * Foundation; either version 2 of the License, or (at your option) + * any later version. * * inclhack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,10 +35,10 @@ * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with inclhack. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4654,6 +4655,47 @@ __inline int", /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Netbsd_C99_Inline_2 fix + */ +tSCC zNetbsd_C99_Inline_2Name[] = + "netbsd_c99_inline_2"; + +/* + * File name selection pattern + */ +tSCC zNetbsd_C99_Inline_2List[] = + "signal.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzNetbsd_C99_Inline_2Machs[] = { + "*-*-netbsd*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zNetbsd_C99_Inline_2Select0[] = + "#define _SIGINLINE extern __inline"; + +#define NETBSD_C99_INLINE_2_TEST_CT 1 +static tTestDesc aNetbsd_C99_Inline_2Tests[] = { + { TT_EGREP, zNetbsd_C99_Inline_2Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Netbsd_C99_Inline_2 + */ +static const char* apzNetbsd_C99_Inline_2Patch[] = { + "format", + "#ifdef __GNUC_STDC_INLINE__\n\ +#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline\n\ +#else\n\ +%0\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Netbsd_Extra_Semicolon fix */ tSCC zNetbsd_Extra_SemicolonName[] = @@ -8563,9 +8605,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 255 +#define REGEX_COUNT 256 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 210 +#define FIX_COUNT 211 /* * Enumerate the fixes @@ -8683,6 +8725,7 @@ typedef enum { NESTED_MOTOROLA_FIXIDX, NESTED_SYS_LIMITS_FIXIDX, NETBSD_C99_INLINE_1_FIXIDX, + NETBSD_C99_INLINE_2_FIXIDX, NETBSD_EXTRA_SEMICOLON_FIXIDX, NEXT_MATH_PREFIX_FIXIDX, NEXT_TEMPLATE_FIXIDX, @@ -9344,6 +9387,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { NETBSD_C99_INLINE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aNetbsd_C99_Inline_1Tests, apzNetbsd_C99_Inline_1Patch, 0 }, + { zNetbsd_C99_Inline_2Name, zNetbsd_C99_Inline_2List, + apzNetbsd_C99_Inline_2Machs, + NETBSD_C99_INLINE_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aNetbsd_C99_Inline_2Tests, apzNetbsd_C99_Inline_2Patch, 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 fbc1b2a62d4..f7fbd8ce8aa 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2608,6 +2608,25 @@ fix = { }; +fix = { + hackname = netbsd_c99_inline_2; + mach = *-*-netbsd*; + files = signal.h; + select = "#define _SIGINLINE extern __inline"; + + c_fix = format; + c_fix_arg = <<- _EOArg_ + #ifdef __GNUC_STDC_INLINE__ + #define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline + #else + %0 + #endif + _EOArg_; + + test_text = "#define _SIGINLINE extern __inline"; +}; + + /* * 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 index 91afbedb01c..1c4517e2c4b 100644 --- a/fixincludes/tests/base/signal.h +++ b/fixincludes/tests/base/signal.h @@ -18,3 +18,12 @@ __inline int sigaddset(sigset_t *set, int signo) {} #endif /* NETBSD_C99_INLINE_1_CHECK */ + + +#if defined( NETBSD_C99_INLINE_2_CHECK ) +#ifdef __GNUC_STDC_INLINE__ +#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline +#else +#define _SIGINLINE extern __inline +#endif +#endif /* NETBSD_C99_INLINE_2_CHECK */