public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Subject: [patch] PR 30058, inline fixincludes for NetBSD 4.x
@ 2007-07-25  0:50 Krister Walfridsson
  2007-07-25  2:01 ` Bruce Korb
  0 siblings, 1 reply; 2+ messages in thread
From: Krister Walfridsson @ 2007-07-25  0:50 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 419 bytes --]

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?

    /Krister


2007-07-24  Krister Walfridsson  <cato@df.lth.se>

 	PR target/30058
 	* inclhack.def (netbsd_c99_inline_2): New.
 	* fixincl.x: Regenerate.
 	* tests/base/signal.h: Update.

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1256 bytes --]

Index: inclhack.def
===================================================================
--- inclhack.def	(revision 126823)
+++ inclhack.def	(working copy)
@@ -2608,6 +2608,19 @@ fix = {
 };
 
 
+fix = {
+    hackname  = netbsd_c99_inline_2;
+    mach      = *-*-netbsd*;
+    files     = signal.h;
+    select    = "#define _SIGINLINE extern __inline";
+
+    c_fix     = format;
+    c_fix_arg = "#ifdef __GNUC_STDC_INLINE__\n#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline\n#else\n#define _SIGINLINE extern __inline\n#endif";
+
+    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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Subject: [patch] PR 30058, inline fixincludes for NetBSD 4.x
  2007-07-25  0:50 Subject: [patch] PR 30058, inline fixincludes for NetBSD 4.x Krister Walfridsson
@ 2007-07-25  2:01 ` Bruce Korb
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Korb @ 2007-07-25  2:01 UTC (permalink / raw)
  To: Krister Walfridsson; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

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

[-- Attachment #2: fixincl.diff --]
[-- Type: text/x-patch, Size: 1209 bytes --]

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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-25  1:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25  0:50 Subject: [patch] PR 30058, inline fixincludes for NetBSD 4.x Krister Walfridsson
2007-07-25  2:01 ` Bruce Korb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).