[MPlayer-cvslog] r36022 - trunk/configure

Diego Biurrun diego at biurrun.de
Wed Mar 20 15:18:09 CET 2013


On Wed, Mar 20, 2013 at 01:44:22PM +0100, Reimar Döffinger wrote:
> diego <subversion at mplayerhq.hu> wrote:
> >
> >Log:
> >configure: Only add _POSIX_C_SOURCE and _XOPEN_SOURCE to CFLAGS for
> >glibc.
> 
> Could you please explain that a bit an add comments?

Oops, I wanted to amend the commit and add a small comment to this yesterday,
but I forgot before pushing today when I saw the Cygwin/MinGW tests had
run successfully.

> Because I am rather inclined to agree with Ivan that this is a silly,
> messy hack. To my knowledge _POSIX_C_SOURCE is in no way specific
> to glibc and should be used to indicate that we want to use POSIX
> features. To me it seems that with this change it would be reasonable
> to expect compilation to fail on all non-glibc systems with pedantic
> headers (which probably is an empty set though).

The way different libcs handle CPPFLAGS is not compatible, so trying to
reuse flags is bound to fail.  FreeBSD for example enables everything by
default and POSIX (or whatever) flags trigger limitations in the APIs
that are exposed.  For glibc it is the other way around.

I tried for a very long time to find a set of common flags to satisfy
all system libcs, but that is just a fool's errand.  There will always
be one system that chokes on a flag that another requires.

What we did before my set of commits - setting libc-specific flags
depending on the compiler that is detected is just completely wrong.

Diego


More information about the MPlayer-cvslog mailing list