aboutsummaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dbrelin.org>2007-04-08 00:16:51 +0000
committerDaniel Berlin <dberlin@dbrelin.org>2007-04-08 00:16:51 +0000
commit903a1b3d358eb02f6809e9a03ed960c86e11902e (patch)
tree4826c1efa665f8b6a73623250a447ba303d2e7a6 /fixincludes
parenteebfa77c775f8badb6755d20a678c83cb3cde80f (diff)
Merge from mainline
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/dataflow-branch@123656 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog24
-rw-r--r--fixincludes/fixincl.x83
-rw-r--r--fixincludes/inclhack.def32
-rw-r--r--fixincludes/tests/base/bits/string2.h2
-rw-r--r--fixincludes/tests/base/signal.h20
-rw-r--r--fixincludes/tests/base/sys/stat.h4
-rw-r--r--fixincludes/tests/base/sys/sysmacros.h4
7 files changed, 143 insertions, 26 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index ac647e5fd58..69acbf49a7a 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,27 @@
+2007-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ * inclhack.def (glibc_c99_inline_1): Define __USE_EXTERN_INLINES
+ if __extern_inline or __GNUC_GNU_INLINE__ is defined rather than
+ __STDC_VERSION__ < 199901L.
+ (glibc_c99_inline_2): Replace #if __STDC_VERSION__ < 199901L
+ with #ifdef __GNUC_GNU_INLINE__.
+ (glibc_c99_inline_3): Add select. Replace __STDC_VERSION__ >= 199901L
+ with defined(__GNUC_STDC_INLINE__).
+ (glibc_c99_inline_4): Change select, add second c_fix_arg.
+ Replace #if __STDC_VERSION__ < 199901L with
+ #ifdef __GNUC_GNU_INLINE__.
+ * fixincl.x: Regenerated.
+ * tests/base/bits/string2.h: Update.
+ * tests/base/sys/sysmacros.h: Update.
+ * tests/base/sys/stat.h: Update.
+
+2007-03-18 Krister Walfridsson <cato@df.lth.se>
+
+ PR target/30058
+ * inclhack.def (netbsd_c99_inline_1): New.
+ * fixincl.x: Regenerate.
+ * tests/base/signal.h: New.
+
2007-03-12 Brooks Moses <brooks.moses@codesourcery.com>
* Makefile.in: Add dummy "install-info" target.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index a9e27d8990b..5239cbf05cb 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 Wednesday March 21, 2007 at 05:39:23 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 Wed Mar 21 17:39:23 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.
*
@@ -2215,7 +2215,7 @@ static tTestDesc aGlibc_C99_Inline_1Tests[] = {
*/
static const char* apzGlibc_C99_Inline_1Patch[] = {
"format",
- "%0 && __STDC_VERSION__ < 199901L",
+ "%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2249,15 +2249,15 @@ static tTestDesc aGlibc_C99_Inline_2Tests[] = {
* Fix Command Arguments for Glibc_C99_Inline_2
*/
static const char* apzGlibc_C99_Inline_2Patch[] = { "sed",
- "-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#if __STDC_VERSION__ < 199901L\\\n\
+ "-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int \\1/",
- "-e", "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/#if __STDC_VERSION__ < 199901L\\\n\
+ "-e", "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int __REDIRECT\\1 (\\2/",
- "-e", "s/^extern __inline__ int/#if __STDC_VERSION__ < 199901L\\\n\
+ "-e", "s/^extern __inline__ int/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int/",
@@ -2281,21 +2281,28 @@ tSCC zGlibc_C99_Inline_3List[] =
#define apzGlibc_C99_Inline_3Machs (const char**)NULL
/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zGlibc_C99_Inline_3Select0[] =
+ "extern __inline";
+
+/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zGlibc_C99_Inline_3Bypass0[] =
"__STDC_VERSION__";
-#define GLIBC_C99_INLINE_3_TEST_CT 1
+#define GLIBC_C99_INLINE_3_TEST_CT 2
static tTestDesc aGlibc_C99_Inline_3Tests[] = {
- { TT_NEGREP, zGlibc_C99_Inline_3Bypass0, (regex_t*)NULL }, };
+ { TT_NEGREP, zGlibc_C99_Inline_3Bypass0, (regex_t*)NULL },
+ { TT_EGREP, zGlibc_C99_Inline_3Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Glibc_C99_Inline_3
*/
static const char* apzGlibc_C99_Inline_3Patch[] = {
"format",
- "# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L",
+ "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)",
"^# ifdef __cplusplus$",
(char*)NULL };
@@ -2320,7 +2327,7 @@ tSCC zGlibc_C99_Inline_4List[] =
* content selection pattern - do fix if pattern found
*/
tSCC zGlibc_C99_Inline_4Select0[] =
- "(^| )extern ";
+ "extern __inline";
/*
* content bypass pattern - skip fix if pattern found
@@ -2339,9 +2346,10 @@ static tTestDesc aGlibc_C99_Inline_4Tests[] = {
static const char* apzGlibc_C99_Inline_4Patch[] = {
"format",
"\n\
-#if __STDC_VERSION__ < 199901L\n\
+#ifdef __GNUC_GNU_INLINE__\n\
extern\n\
#endif\n",
+ "(^| )extern ",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -4523,6 +4531,47 @@ static const char* apzNested_Sys_LimitsPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * 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
*/
tSCC zNetbsd_Extra_SemicolonName[] =
@@ -8425,9 +8474,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 251
+#define REGEX_COUNT 253
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 207
+#define FIX_COUNT 208
/*
* Enumerate the fixes
@@ -8542,6 +8591,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 +9238,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 e2ac55c2aa4..b8a44589e74 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -1311,7 +1311,7 @@ fix = {
files = features.h, '*/features.h';
select = "^ *&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__$";
c_fix = format;
- c_fix_arg = "%0 && __STDC_VERSION__ < 199901L";
+ c_fix_arg = "%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)";
test_text = <<-EOT
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
@@ -1331,13 +1331,13 @@ fix = {
files = sys/stat.h, '*/sys/stat.h';
select = "extern __inline__ int";
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
- "#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int \\1/";
sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
- "#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int __REDIRECT\\1 (\\2/";
sed = "s/^extern __inline__ int/"
- "#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int/";
test_text = <<-EOT
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
@@ -1351,9 +1351,10 @@ fix = {
fix = {
hackname = glibc_c99_inline_3;
files = bits/string2.h, '*/bits/string2.h';
+ select = "extern __inline";
bypass = "__STDC_VERSION__";
c_fix = format;
- c_fix_arg = "# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L";
+ c_fix_arg = "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)";
c_fix_arg = "^# ifdef __cplusplus$";
test_text = <<-EOT
# ifdef __cplusplus
@@ -1369,9 +1370,10 @@ fix = {
hackname = glibc_c99_inline_4;
files = sys/sysmacros.h, '*/sys/sysmacros.h';
bypass = "__STDC_VERSION__";
- select = '(^| )extern ';
+ select = "extern __inline";
c_fix = format;
- c_fix_arg = "\n#if __STDC_VERSION__ < 199901L\nextern\n#endif\n";
+ c_fix_arg = "\n#ifdef __GNUC_GNU_INLINE__\nextern\n#endif\n";
+ c_fix_arg = '(^| )extern ';
test_text = <<-EOT
__extension__ extern __inline unsigned int
__extension__ __extern_inline unsigned int
@@ -2552,6 +2554,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".
*/
fix = {
diff --git a/fixincludes/tests/base/bits/string2.h b/fixincludes/tests/base/bits/string2.h
index 0d37faaad69..1da54fdec70 100644
--- a/fixincludes/tests/base/bits/string2.h
+++ b/fixincludes/tests/base/bits/string2.h
@@ -10,7 +10,7 @@
#if defined( GLIBC_C99_INLINE_3_CHECK )
-# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L
+# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
# define __STRING_INLINE inline
# else
# define __STRING_INLINE extern __inline
diff --git a/fixincludes/tests/base/signal.h b/fixincludes/tests/base/signal.h
new file mode 100644
index 00000000000..91afbedb01c
--- /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 */
diff --git a/fixincludes/tests/base/sys/stat.h b/fixincludes/tests/base/sys/stat.h
index 51fe835d3a6..d677a13292f 100644
--- a/fixincludes/tests/base/sys/stat.h
+++ b/fixincludes/tests/base/sys/stat.h
@@ -15,11 +15,11 @@
#if defined( GLIBC_C99_INLINE_2_CHECK )
-#if __STDC_VERSION__ < 199901L
+#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline__ int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
-#if __STDC_VERSION__ < 199901L
+#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline__ int
diff --git a/fixincludes/tests/base/sys/sysmacros.h b/fixincludes/tests/base/sys/sysmacros.h
index 34d0ed51a3d..6fc19425e84 100644
--- a/fixincludes/tests/base/sys/sysmacros.h
+++ b/fixincludes/tests/base/sys/sysmacros.h
@@ -11,13 +11,13 @@
#if defined( GLIBC_C99_INLINE_4_CHECK )
__extension__
-#if __STDC_VERSION__ < 199901L
+#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline unsigned int
__extension__ __extern_inline unsigned int
-#if __STDC_VERSION__ < 199901L
+#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline unsigned int