[MPlayer-dev-eng] [PATCH] Get rid of -D_GNU_SOURCE
Rich Felker
dalias at aerifal.cx
Fri Dec 8 20:01:19 CET 2006
On Fri, Dec 08, 2006 at 07:47:03PM +0100, Diego Biurrun wrote:
> On Fri, Dec 08, 2006 at 10:07:34AM -0500, Rich Felker wrote:
> > On Fri, Dec 08, 2006 at 02:35:19PM +0100, Diego Biurrun wrote:
> > > > -CFLAGS= -D__USE_UNIX98 -D_GNU_SOURCE \
> > > > +CFLAGS= -D__USE_UNIX98 \
> > > > -DHAVE_LIMITS_H -DHAVE_ERRNO_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H \
> > > > -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"1.2.9\"
> > >
> > > ... for external libraries I'm not so sure. If they are compiled with
> > > _GNU_SOURCE upstream then I think we should use the same configuration.
> >
> > Why? -D_GNU_SOURCE is always wrong.. If there really are GNU
> > dependencies they should be found and removed.
>
> Modifications to external libraries should be as minimal as possible
> IMO and when we do modifications we should try to send them upstream.
>
> For libdvdcss and libdvdread I'm afraid the change might introduce
> subtle breakage and/or a library that behaves slightly different than
> the upstream version. This is not good.
If the code depends on GNU functions, then we'll get warnings and fix
it once -D_GNU_SOURCE is removed.
If the code depends on incorrect GNU semantics in standardized
functions (which conflict with POSIX) then the code is already
_BROKEN_ on non-GNU implementations, and -D_GNU_SOURCE just works
around the problem on GNU systems. If this is the case it's better to
let it break then find the problems and fix it rather than having
subtle bugs. But I doubt it's the case anyway.
Either way, using -D_GNU_SOURCE is a very bad idea IMO.
If you're worried about differing from upstream we should complain to
upstream and ask them to remove the -D_GNU_SOURCE.
Rich
More information about the MPlayer-dev-eng
mailing list