summaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-26 13:25:26 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-26 13:25:26 +0000
commit7e4d47f0f9c19a5d495592749610a399f42834c4 (patch)
tree3feb17c59e9b13054c14d08bc1654ae951120a7d /fixincludes/inclhack.def
parent211d5b9a30550be7905229da85e7bbbf20801e12 (diff)
downloadgcc-7e4d47f0f9c19a5d495592749610a399f42834c4.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def16
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