summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2010-05-04 09:07:11 +0000
committerplunky <plunky@NetBSD.org>2010-05-04 09:07:11 +0000
commitc76d621dddf53e31cf4d1aba0e4eec81390b6b7c (patch)
treea04590034792352e2ad46f088150b50c0ae4734c /include
parent43f2dd8f20bd02f4cdbc228271feb7d54770eb74 (diff)
handle the difference between C99 and GNUC semantics of inline
functions with external linkage, by using "inline" for STDC and "extern inline" for GNUC (as noted by joerg@, using static inline may be clearer)
Diffstat (limited to 'include')
-rw-r--r--include/signal.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/signal.h b/include/signal.h
index 81651ce9886..47e94607125 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: signal.h,v 1.51 2009/01/11 03:04:12 christos Exp $ */
+/* $NetBSD: signal.h,v 1.52 2010/05/04 09:07:11 plunky Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -101,7 +101,11 @@ int *__errno(void);
#endif
#ifndef _SIGINLINE
+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
#define _SIGINLINE extern __inline
+#else
+#define _SIGINLINE __inline
+#endif
#endif
_SIGINLINE int
@@ -149,7 +153,7 @@ sigfillset(sigset_t *set)
__sigfillset(set);
return (0);
}
-#endif /* (__GNUC__ && __STDC__) || _LIBC */
+#endif /* (__GNUC__ && __STDC__) || _SIGINLINE */
#endif /* !__LIBC12_SOURCE__ */
/*