aboutsummaryrefslogtreecommitdiff
path: root/misc/sys
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2012-09-26 12:58:36 +0200
committerMarek Polacek <polacek@redhat.com>2012-09-26 12:58:36 +0200
commitb7bfe116e6304da848759b69a6d713da3e93e936 (patch)
tree9f4be6f59cc4b1df14431e5b36a9d3d21fff5049 /misc/sys
parent43c4edba7ee8224134132fb38df5f63895cbb326 (diff)
downloadglibc-b7bfe116e6304da848759b69a6d713da3e93e936.zip
glibc-b7bfe116e6304da848759b69a6d713da3e93e936.tar.gz
glibc-b7bfe116e6304da848759b69a6d713da3e93e936.tar.bz2
Fix up definitions for older compilers.
Diffstat (limited to 'misc/sys')
-rw-r--r--misc/sys/cdefs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index b94147e..fb6c959 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -320,7 +320,7 @@
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics, unless -fgnu89-inline is used. */
-#if !defined __cplusplus || __GNUC_PREREQ (4,3)
+#if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
# define __extern_always_inline \
@@ -329,6 +329,13 @@
# define __extern_inline extern __inline
# define __extern_always_inline extern __always_inline
# endif
+#elif defined __GNUC__ /* C++ and GCC <4.3. */
+# define __extern_inline extern __inline
+# define __extern_always_inline \
+ extern __always_inline
+#else /* Not GCC. */
+# define __extern_inline /* Ignore */
+# define __extern_always_inline /* Ignore */
#endif
/* GCC 4.3 and above allow passing all anonymous arguments of an