Browse Source

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.
OPENBSD_4_2
espie 18 years ago
parent
commit
c6805c8e99
2 changed files with 14 additions and 5 deletions
  1. +5
    -1
      src/include/ctype.h
  2. +9
    -4
      src/include/signal.h

+ 5
- 1
src/include/ctype.h View File

@ -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


+ 9
- 4
src/include/signal.h View File

@ -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) {


Loading…
Cancel
Save