aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fixincludes/ChangeLog17
-rw-r--r--fixincludes/fixincl.x32
-rw-r--r--fixincludes/inclhack.def16
-rw-r--r--fixincludes/tests/base/bits/string2.h2
-rw-r--r--fixincludes/tests/base/sys/stat.h4
-rw-r--r--fixincludes/tests/base/sys/sysmacros.h4
6 files changed, 51 insertions, 24 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index a5317c4..69acbf4 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,20 @@
+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
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index ca007c2..5239cbf 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 Sunday March 18, 2007 at 05:06:12 PM CET
+ * 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 Sun Mar 18 17:06:12 CET 2007
+/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Mar 21 17:39:23 CET 2007
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -8466,7 +8474,7 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 252
+#define REGEX_COUNT 253
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 208
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 2cc9583..b8a4458 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
diff --git a/fixincludes/tests/base/bits/string2.h b/fixincludes/tests/base/bits/string2.h
index 0d37faa..1da54fd 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/sys/stat.h b/fixincludes/tests/base/sys/stat.h
index 51fe835..d677a13 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 34d0ed5..6fc1942 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