public inbox for rda@sourceware.org
 help / color / mirror / Atom feed
* RFA: #define _GNU_SOURCE to get strsignal prototoype
@ 2004-10-07 16:08 Jim Blandy
  2004-10-07 16:11 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2004-10-07 16:08 UTC (permalink / raw)
  To: rda


This removes some compilation warnings on older Red Hat systems.
#defining _GNU_SOURCE is the documented way to get these declarations
from GNU C Library header files.  From "(libc) Feature Test Macros":

       You should define these macros by using `#define' preprocessor
    directives at the top of your source code files.  These directives
    _must_ come before any `#include' of a system header file.  It is best
    to make them the very first thing in the file, preceded only by
    comments.  You could also use the `-D' option to GCC, but it's better
    if you make the source files indicate their own meaning in a
    self-contained way.

    ...

     - Macro: _GNU_SOURCE
         If you define this macro, everything is included: ISO C89,
         ISO C99, POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU
         extensions.  In the cases where POSIX.1 conflicts with BSD, the
         POSIX definitions take precedence.

2004-09-24  Jim Blandy  <jimb@redhat.com>

	* samples/async.c: #define _GNU_SOURCE before #including any
	files, to get prototypes for GNU-specific functions like
	strsignal.

Index: rda/samples/async.c
===================================================================
RCS file: /cvs/src/src/rda/samples/async.c,v
retrieving revision 1.1
diff -c -p -r1.1 async.c
*** rda/samples/async.c	28 Aug 2002 01:22:28 -0000	1.1
--- rda/samples/async.c	7 Oct 2004 16:03:08 -0000
***************
*** 22,27 ****
--- 22,29 ----
     Alternative licenses for RDA may be arranged by contacting Red Hat,
     Inc.  */
  
+ #define _GNU_SOURCE             /* enables strsignal prototype in <string.h> */
+ 
  #include "config.h"
  
  #include <stdio.h>

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

* Re: RFA: #define _GNU_SOURCE to get strsignal prototoype
  2004-10-07 16:08 RFA: #define _GNU_SOURCE to get strsignal prototoype Jim Blandy
@ 2004-10-07 16:11 ` Kevin Buettner
  2004-10-07 19:11   ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2004-10-07 16:11 UTC (permalink / raw)
  To: Jim Blandy; +Cc: rda

On 07 Oct 2004 11:08:01 -0500
Jim Blandy <jimb@redhat.com> wrote:

> This removes some compilation warnings on older Red Hat systems.
> #defining _GNU_SOURCE is the documented way to get these declarations
> from GNU C Library header files.  From "(libc) Feature Test Macros":
> 
>        You should define these macros by using `#define' preprocessor
>     directives at the top of your source code files.  These directives
>     _must_ come before any `#include' of a system header file.  It is best
>     to make them the very first thing in the file, preceded only by
>     comments.  You could also use the `-D' option to GCC, but it's better
>     if you make the source files indicate their own meaning in a
>     self-contained way.
> 
>     ...
> 
>      - Macro: _GNU_SOURCE
>          If you define this macro, everything is included: ISO C89,
>          ISO C99, POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU
>          extensions.  In the cases where POSIX.1 conflicts with BSD, the
>          POSIX definitions take precedence.
> 
> 2004-09-24  Jim Blandy  <jimb@redhat.com>
> 
> 	* samples/async.c: #define _GNU_SOURCE before #including any
> 	files, to get prototypes for GNU-specific functions like
> 	strsignal.

Okay.

Kevin

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

* Re: RFA: #define _GNU_SOURCE to get strsignal prototoype
  2004-10-07 16:11 ` Kevin Buettner
@ 2004-10-07 19:11   ` Jim Blandy
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2004-10-07 19:11 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: rda

Kevin Buettner <kevinb@redhat.com> writes:

> On 07 Oct 2004 11:08:01 -0500
> Jim Blandy <jimb@redhat.com> wrote:
> 
> > This removes some compilation warnings on older Red Hat systems.
> > #defining _GNU_SOURCE is the documented way to get these declarations
> > from GNU C Library header files.  From "(libc) Feature Test Macros":
> > 
> >        You should define these macros by using `#define' preprocessor
> >     directives at the top of your source code files.  These directives
> >     _must_ come before any `#include' of a system header file.  It is best
> >     to make them the very first thing in the file, preceded only by
> >     comments.  You could also use the `-D' option to GCC, but it's better
> >     if you make the source files indicate their own meaning in a
> >     self-contained way.
> > 
> >     ...
> > 
> >      - Macro: _GNU_SOURCE
> >          If you define this macro, everything is included: ISO C89,
> >          ISO C99, POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU
> >          extensions.  In the cases where POSIX.1 conflicts with BSD, the
> >          POSIX definitions take precedence.
> > 
> > 2004-09-24  Jim Blandy  <jimb@redhat.com>
> > 
> > 	* samples/async.c: #define _GNU_SOURCE before #including any
> > 	files, to get prototypes for GNU-specific functions like
> > 	strsignal.
> 
> Okay.

Committed, thanks.

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

end of thread, other threads:[~2004-10-07 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 16:08 RFA: #define _GNU_SOURCE to get strsignal prototoype Jim Blandy
2004-10-07 16:11 ` Kevin Buettner
2004-10-07 19:11   ` Jim Blandy

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).