summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-03-17 21:38:15 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-03-17 21:38:15 +0000
commit4aa1b31cb7bce6b7e9e60e8302cb13f800273cfc (patch)
tree4286da7ca9e0311998e4294dd40d3cd8c8838f96
parent2e97aa83de464c49f1c9863e9ebf4099c3888984 (diff)
allow extern inline stuff to proceed unchanged thru the mess that the
combined GCC and ISO committees managed to make out of it. With this, gcc >= 4.3 can grok its way through it correctly. okay kettenis@, with some help figuring stuff out.
-rw-r--r--include/ctype.h6
-rw-r--r--include/signal.h13
2 files changed, 14 insertions, 5 deletions
diff --git a/include/ctype.h b/include/ctype.h
index c43774d6ef5..781ccdb05f5 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctype.h,v 1.19 2005/12/13 00:35:22 millert Exp $ */
+/* $OpenBSD: ctype.h,v 1.20 2007/03/17 21:38:14 espie Exp $ */
/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */
/*
@@ -59,7 +59,11 @@ extern const short *_toupper_tab_;
/* extern __inline is a GNU C extension */
#ifdef __GNUC__
+# if defined(__GNUC_STDC_INLINE__)
+#define __CTYPE_INLINE extern __inline __attribute__((__gnu_inline__))
+# else
#define __CTYPE_INLINE extern __inline
+# endif
#else
#define __CTYPE_INLINE static __inline
#endif
diff --git a/include/signal.h b/include/signal.h
index d1e2db23fbb..982933d8157 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.10 2005/12/21 19:09:01 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.11 2007/03/17 21:38:14 espie Exp $ */
/* $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $ */
/*-
@@ -63,7 +63,12 @@ int sigprocmask(int, const sigset_t *, sigset_t *);
int sigsuspend(const sigset_t *);
#if defined(__GNUC__)
-extern __inline int sigaddset(sigset_t *set, int signo) {
+# if defined(__GNUC_STDC_INLINE__)
+#define __SIGNAL_INLINE extern __inline __attribute((__gnu_inline__))
+# else
+#define __SIGNAL_INLINE extern __inline
+# endif
+__SIGNAL_INLINE int sigaddset(sigset_t *set, int signo) {
int *__errno(void);
if (signo <= 0 || signo >= _NSIG) {
@@ -74,7 +79,7 @@ extern __inline int sigaddset(sigset_t *set, int signo) {
return (0);
}
-extern __inline int sigdelset(sigset_t *set, int signo) {
+__SIGNAL_INLINE int sigdelset(sigset_t *set, int signo) {
int *__errno(void);
if (signo <= 0 || signo >= _NSIG) {
@@ -85,7 +90,7 @@ extern __inline int sigdelset(sigset_t *set, int signo) {
return (0);
}
-extern __inline int sigismember(const sigset_t *set, int signo) {
+__SIGNAL_INLINE int sigismember(const sigset_t *set, int signo) {
int *__errno(void);
if (signo <= 0 || signo >= _NSIG) {