Re: [PATCH 3/3] Define _GNU_SOURCE so that <fcntl.h> gives O_CLOEXEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 08.11.09 17:23, Rémi Denis-Courmont (remi@xxxxxxxxxx) wrote:

> 
> Le dimanche 8 novembre 2009 16:49:37 Lennart Poettering, vous avez écrit :
> > On Thu, 05.11.09 21:17, Rémi Denis-Courmont (remi@xxxxxxxxxx) wrote:
> > > Signed-off-by: Rémi Denis-Courmont <remi@xxxxxxxxxx>
> > > ---
> > >  configure.in |    2 ++
> > >  1 files changed, 2 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/configure.in b/configure.in
> > > index a455de1..cc8950f 100644
> > > --- a/configure.in
> > > +++ b/configure.in
> > > @@ -38,6 +38,8 @@ then
> > >    AC_MSG_RESULT($CC)
> > >  fi
> > >
> > > +CFLAGS="$CFLAGS -D_GNU_SOURCE"
> > 
> > There's acually an autoconf macro for this. AC_GNU_SOURCE. And even
> > better than that is usually AC_SYSTEM_EXTENSIONS.
> 
> AC_SYSTEM_EXTENSIONS is not much extra help from AC_GNU_SOURCE in a Linux-only 
> library. 

In the past there was some work to port it to some BSD iirc, using the
OSS backend that is currently in alsa-plugins. Not that I cared a tiny
bit about BSD but I generally think that if there are two otherwise
equal options one should pick the portable one. But then again, this
certainly doesn't matter much.

> alsa-lib does not systematically include <config.h> first, so neither 
> of them will work anyway.

A nice fix for that could be simply adding -include
$(top_builddir)/config.h to AM_CPPFLAGS. A couple of packages do that
now, e.g. udev.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux