This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Subject: [patch] PR 30058, inline fixincludes for NetBSD 4.x
- From: Bruce Korb <Bruce dot Korb at gmail dot com>
- To: Krister Walfridsson <cato at df dot lth dot se>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Jul 2007 18:39:15 -0700
- Subject: Re: Subject: [patch] PR 30058, inline fixincludes for NetBSD 4.x
- References: <Pine.GSO.4.60.0707250034310.26612@igloo.df.lth.se>
Krister Walfridsson wrote:
> The attached patch fix the remaining C99 inline lossage for NetBSD
> (This applies to NetBSD 4.x; a similar fix for NetBSD 2.x and 3.x was
> committed in March).
>
> Bootstrapped and tested on i386-unknown-netbsdelf4.0.
>
> OK to commit?
With a formatting change. All computer screens are the width of a
hollerith card (80 characters).
Thanks. - Bruce
Index: inclhack.def
===================================================================
--- inclhack.def (revision 126823)
+++ inclhack.def (working copy)
@@ -2608,6 +2608,25 @@ fix = {
};
+fix = {
+ hackname = netbsd_c99_inline_2;
+ mach = *-*-netbsd*;
+ files = signal.h;
+ select = "#define _SIGINLINE extern __inline";
+
+ c_fix = format;
+ c_fix_arg = <<- _EOArg_
+ #ifdef __GNUC_STDC_INLINE__
+ #define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline
+ #else
+ %0
+ #endif
+ _EOArg_;
+
+ test_text = "#define _SIGINLINE extern __inline";
+};
+
+
/*
* NetBSD has a semicolon after the ending '}' for some extern "C".
*/
Index: tests/base/signal.h
===================================================================
--- tests/base/signal.h (revision 126823)
+++ tests/base/signal.h (working copy)
@@ -18,3 +18,12 @@ __inline int
sigaddset(sigset_t *set, int signo)
{}
#endif /* NETBSD_C99_INLINE_1_CHECK */
+
+
+#if defined( NETBSD_C99_INLINE_2_CHECK )
+#ifdef __GNUC_STDC_INLINE__
+#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline
+#else
+#define _SIGINLINE extern __inline
+#endif
+#endif /* NETBSD_C99_INLINE_2_CHECK */