[FFmpeg-devel] [PATCH][RFC] -std=c99

Michael Niedermayer michaelni
Fri Aug 15 00:14:13 CEST 2008


On Thu, Aug 14, 2008 at 11:08:00PM +0200, Diego Biurrun wrote:
> On Wed, Aug 13, 2008 at 02:21:56AM +0200, Michael Niedermayer wrote:
> > On Wed, Aug 13, 2008 at 12:43:04AM +0100, M?ns Rullg?rd wrote:
> > > Michael Niedermayer <michaelni at gmx.at> writes:
> > > 
> > > > On Tue, Aug 12, 2008 at 11:22:41PM +0100, M?ns Rullg?rd wrote:
> > > >> Michael Niedermayer <michaelni at gmx.at> writes:
> > > >> 
> > > >> > On Tue, Aug 12, 2008 at 10:47:54PM +0200, Michael Niedermayer wrote:
> > > >> >> On Tue, Aug 12, 2008 at 08:56:12PM +0100, M?ns Rullg?rd wrote:
> > > >> > [...]
> > > >> >> > 
> > > >> >> > Most (all?) of the above-mentioned functions are POSIX standard, so
> > > >> >> > there should be no need for _BSD_SOURCE.  If anything does require
> > > >> >> > this, we should look for a POSIX alternative.
> > > >> >> 
> > > >> >> Ill try again with xopen and posix and without bsd
> > > >> >
> > > >> > done, the following works for me too
> > > >> >
> > > >> > lower values of _XOPEN_SOURCE fail with:
> > > >> > ffserver.c:4474: error: ?SA_RESTART? undeclared (first use in this function)
> > > >> >
> > > >> > lower values of _POSIX_C_SOURCE fail with:
> > > >> > libavdevice/v4l.c:294: error: storage size of ?ts? isn?t known
> > > >> >
> > > >> > Index: configure
> > > >> > ===================================================================
> > > >> > --- configure	(revision 14508)
> > > >> > +++ configure	(working copy)
> > > >> > @@ -1827,6 +1827,7 @@
> > > >> >  check_cflags -Wwrite-strings
> > > >> >  check_cflags -Wtype-limits
> > > >> >  enabled extra_warnings && check_cflags -Winline
> > > >> > +check_cflags -std=c99 -fasm -D_POSIX_C_SOURCE=199309 -D_XOPEN_SOURCE=500
> > > >> 
> > > >> The -std=c99 and -fasm should be separate tests, since compilers might
> > > >> support only one.  The -D flags can be set unconditionally.
> > > >
> > > > which compiler are you thinking about here?
> > > 
> > > None in particular.
> > > 
> > > > -std=c99 and -fasm are not independant, as the first depends on the second
> > > > -std=c99 alone will cause compilation to fail with gcc at least.
> > > 
> > > GCC isn't the only compiler around.
> > 
> > well iam fine with spliting them, but where should i put them in configure?
> > if one assumes -fasm is supported and does something and -std=c99 is not
> > then -fasm should be before any asm checks ...
> > 
> > If you tell me what should be where i can post a patch ...
> 
> line 1112

doesnt work

Index: configure
===================================================================
--- configure	(revision 14765)
+++ configure	(working copy)
@@ -1109,6 +1109,9 @@
 ranlib="${cross_prefix}${ranlib}"
 strip="${cross_prefix}${strip}"
 
+check_cflags -fasm
+check_cflags -std=c99
+
 # set temporary file name
 if test ! -z "$TMPDIR" ; then
     TMPDIR1="${TMPDIR}"

results in:

./configure: line 426: $TMPC: ambiguous redirect
./configure: line 426: $TMPC: ambiguous redirect

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080815/8f3d2dcf/attachment.pgp>



More information about the ffmpeg-devel mailing list