OSDN Git Service

2007-07-24 Krister Walfridsson <cato@df.lth.se>
authorkristerw <kristerw@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Jul 2007 23:51:47 +0000 (23:51 +0000)
committerkristerw <kristerw@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Jul 2007 23:51:47 +0000 (23:51 +0000)
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

fixincludes/ChangeLog
fixincludes/fixincl.x
fixincludes/inclhack.def
fixincludes/tests/base/signal.h

index eb1e719..c9ad1a7 100644 (file)
@@ -1,3 +1,10 @@
+2007-07-24  Krister Walfridsson  <cato@df.lth.se>
+
+       PR target/30058
+       * inclhack.def (netbsd_c99_inline_2): New.
+       * fixincl.x: Regenerate.
+       * tests/base/signal.h: Update.
+
 2007-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        PR target/32641
 2007-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        PR target/32641
index 41818d5..a330dfe 100644 (file)
@@ -2,11 +2,11 @@
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
  * 
  * 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
  */
  * 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.
  *
  *
  * 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.
  *
  * 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.
  *
  *
  * 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
  *  
  *  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
  *  
  *  inclhack is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  See the GNU General Public License for more details.
  *  
  *  You should have received a copy of the GNU General Public License
  *  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[] =
  *  Description of Netbsd_Extra_Semicolon fix
  */
 tSCC zNetbsd_Extra_SemicolonName[] =
@@ -8563,9 +8605,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          255
+#define REGEX_COUNT          256
 #define MACH_LIST_SIZE_LIMIT 261
 #define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT            210
+#define FIX_COUNT            211
 
 /*
  *  Enumerate the fixes
 
 /*
  *  Enumerate the fixes
@@ -8683,6 +8725,7 @@ typedef enum {
     NESTED_MOTOROLA_FIXIDX,
     NESTED_SYS_LIMITS_FIXIDX,
     NETBSD_C99_INLINE_1_FIXIDX,
     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,
     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 },
 
      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,
   {  zNetbsd_Extra_SemicolonName,    zNetbsd_Extra_SemicolonList,
      apzNetbsd_Extra_SemicolonMachs,
      NETBSD_EXTRA_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index fbc1b2a..f7fbd8c 100644 (file)
@@ -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".
  */
 /*
  * NetBSD has a semicolon after the ending '}' for some extern "C".
  */
index 91afbed..1c4517e 100644 (file)
@@ -18,3 +18,12 @@ __inline int
 sigaddset(sigset_t *set, int signo)
 {}
 #endif  /* NETBSD_C99_INLINE_1_CHECK */
 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 */