[FFmpeg-cvslog] r14484 - in trunk/libavcodec: audioconvert.c audioconvert.h

Michael Niedermayer michaelni
Sun Aug 3 17:13:18 CEST 2008


On Sun, Aug 03, 2008 at 01:45:06PM +0200, Diego Biurrun wrote:
> On Sun, Aug 03, 2008 at 01:17:06PM +0200, Michael Niedermayer wrote:
> > .On Sat, Aug 02, 2008 at 07:00:02PM +0200, Diego Biurrun wrote:
> > > On Sat, Aug 02, 2008 at 06:47:06PM +0200, Michael Niedermayer wrote:
> > > > On Sat, Aug 02, 2008 at 06:46:08PM +0200, Diego Biurrun wrote:
> > > > > On Sat, Aug 02, 2008 at 06:32:36PM +0200, Michael Niedermayer wrote:
> > > > > > On Sat, Aug 02, 2008 at 06:15:20PM +0200, Diego Biurrun wrote:
> > > > > > > On Sat, Aug 02, 2008 at 05:54:56PM +0200, Michael Niedermayer wrote:
> > > > > > > > On Sat, Aug 02, 2008 at 06:40:13PM +0300, Uoti Urpala wrote:
> > > > > > > > > On Sat, 2008-08-02 at 17:23 +0200, Michael Niedermayer wrote:
> > > > > > > > > > On Sat, Aug 02, 2008 at 02:50:40PM +0200, Diego Biurrun wrote:
> > > > > > > > > > > On Sat, Aug 02, 2008 at 04:25:52AM +0200, Michael Niedermayer wrote:
> > > > > > > > > > > > it also uses lrintf & snprintf thus also needs one way or another
> > > > > > > > > > > > stdio.h and math.h with  _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE defined before
> > > > > > > > > > > > inclusion of math.h
> > > > > > > > > 
> > > > > > > > > Those are standard C, so any special defines are only required if the
> > > > > > > > > default is to use old versions.
> > > > > > > > 
> > > > > > > > no
> > > > > > > > -------
> > > > > > > > Linux Programmer?s Manual                                                             LRINT(3)
> > > > > > > > 
> > > > > > > > NAME
> > > > > > > >        lrint, lrintf, lrintl, llrint, llrintf, llrintl - round to nearest integer
> > > > > > > > 
> > > > > > > > SYNOPSIS
> > > > > > > > [...]
> > > > > > > >        Link with -lm.
> > > > > > > > 
> > > > > > > >    Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
> > > > > > > > 
> > > > > > > >        All functions shown above: _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE; or cc -std=c99
> > > > > > > >        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > > > > > > -------
> > > > > > > > > > > These definitions are part of the global CFLAGS, no need to duplicate
> > > > > > > > > > > them.
> > > > > > > > > > 
> > > > > > > > > > until it causes you an hour of work when you try to compile it
> > > > > > > > > > in mplayer that happenes not to set them.
> > > > > > > > > 
> > > > > > > > > MPlayer uses -std=gnu99 with GCC, so no extra defines are needed for
> > > > > > > > > standard C functions. So even if such defines are not set any problems
> > > > > > > > > could only occur if you're using some compiler which MPlayer does not
> > > > > > > > > recognize and which does not support C99 functions by default.
> > > > > > > > 
> > > > > > > > see above, the manual page of lrintf explain it rather clearly, what is
> > > > > > > > needed on linux. I do not know if you propose to drop linux support or
> > > > > > > > if you propose to depend on undocumented options.
> > > > > > > 
> > > > > > > -std=gnu99 is a superset of -std=c99, so no problem.
> > > > > > 
> > > > > > The manual disagrees with you, it lists _XOPEN_SOURCE, _ISOC99_SOURCE and 
> > > > > > -std=c99 it does not list gnu99
> > > > > 
> > > > > You are reading the wrong manual.  The gcc manual clearly states that
> > > > > gnu99 is a superset of c99.
> > > > 
> > > > gcc is a c library?
> > > 
> > > I have no idea what silly game you are trying to play here, but you
> > > quoted above (linebreak mine):
> > > 
> > >   All functions shown above: _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE;
> > >   or cc -std=c99
> > >      ^^^^^^^^^^^
> > > 
> > > Since -std=gnu99 is a superset of -std=c99, we are safe.
> > 
> >     tcc gnu99test.c -o gnu99test -std=gnu99
> > tcc: invalid option -- '-std=gnu99'
> 
> Does tcc understand -std=c99?

not the version i have, but it does understand -D_ISOC99_SOURCE


> 
> > now, i know you will tell me that you check for gnu99 support in mplayer
> > and omit "-std=gnu99" if the compiler fails to compile with it.
> 
> Yes, of course the option is checked for, though only in the gcc case.
> 
> What exactly was the point you were trying to make here?

That mplayer depends on C99 functions but does not #define _ISOC99_SOURCE as
glibc requires.

This is not an argument for or against -std=gnu99 just that no matter if it is
there, -D_ISOC99_SOURCE still has to be there. And i think even uoti will
agree about this.

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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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-cvslog/attachments/20080803/8cc38c81/attachment.pgp>



More information about the ffmpeg-cvslog mailing list