diff options
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 2cc9583b50d..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 |