[FFmpeg-devel] [RFC][PATCH] move _ISOC9X_SOURCE

Michael Niedermayer michaelni
Thu Aug 14 02:50:35 CEST 2008


On Wed, Aug 13, 2008 at 05:25:08PM -0700, Baptiste Coudurier wrote:
> Hi,
> 
> Michael Niedermayer wrote:
> > On Thu, Aug 14, 2008 at 12:38:55AM +0100, M?ns Rullg?rd wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >>
> >>> On Wed, Aug 13, 2008 at 08:20:55PM +0200, Michael Niedermayer wrote:
> >>>> On Wed, Aug 13, 2008 at 06:04:10PM +0100, M?ns Rullg?rd wrote:
> >>>>> Michael Niedermayer wrote:
> >>>>>> Hi
> >>>>>>
> >>>>>> Currently -D_ISOC9X_SOURCE is in common.mak which makes it unavailable
> >>>>>> to tests in configure patch below moves it into configure.
> >>>>>> If this is approved then ill also post one that adds the -Dposix there.
> >>>>>>
> >>>>>> Index: common.mak
> >>>>>> ===================================================================
> >>>>>> --- common.mak	(revision 14508)
> >>>>>> +++ common.mak	(working copy)
> >>>>>> @@ -18,7 +18,7 @@
> >>>>>>  ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
> >>>>>>
> >>>>>>  CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
> >>>>>> -          -D_ISOC9X_SOURCE -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
> >>>>>> +          -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
> >>>>>>
> >>>>>>  %.o: %.c
> >>>>>>  	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> >>>>> OK
> >>>>>
> >>>>>> Index: configure
> >>>>>> ===================================================================
> >>>>>> --- configure	(revision 14508)
> >>>>>> +++ configure	(working copy)
> >>>>>> @@ -963,6 +963,7 @@
> >>>>>>  vhook="default"
> >>>>>>
> >>>>>>  # build settings
> >>>>>> +CFLAGS='-D_ISOC9X_SOURCE'
> >>>>> Unless I am mistaken, this will override with CFLAGS from the
> >>>>> environment.
> >>>> ok, ive applied it with add_cflags
> >>> Heres a patch that adds POSIX_C_SOURCE
> >>> compiles & passes make test
> >>>
> >>> Index: configure
> >>> ===================================================================
> >>> --- configure	(revision 14739)
> >>> +++ configure	(working copy)
> >>> @@ -974,7 +974,7 @@
> >>>  vhook="default"
> >>>
> >>>  # build settings
> >>> -add_cflags '-D_ISOC99_SOURCE '
> >>> +add_cflags '-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=199309'
> >> Still no need for quotes.
> > 
> > 2nd try:
> > 
> > Index: configure
> > ===================================================================
> > --- configure	(revision 14745)
> > +++ configure	(working copy)
> > @@ -974,7 +974,7 @@
> >  vhook="default"
> >  
> >  # build settings
> > -add_cflags -D_ISOC99_SOURCE
> > +add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=199309
> >  SHFLAGS='-shared -Wl,-soname,$$(@F)'
> >  VHOOKSHFLAGS='$(SHFLAGS)'
> >  FFSERVERLDFLAGS=-Wl,-E
> > 
> 
> Im pretty sure we are using functions defined in POSIX 2001, but not in
> earliers revisions.
> 
> 'strcasecmp' is an example:
> CONFORMING TO
>        4.4BSD, POSIX.1-2001.

well it passed compilation and make test and i didnt spot any large amounts
of implicit declaration warnings ...
also strcasecmp is not under any POSIX_C_SOURCE #ifdef in the gnu headers
so i do not think simply compiling and looking for implicit declaration
warnings would be reliable

iam fine with someone adding -D_POSIX_C_SOURCE=200112 ...
(though ive sent enough patches for that today, i rather should try to
 fix the remaining conformance streams for h.264 between the soc patches)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20080814/30a29609/attachment.pgp>



More information about the ffmpeg-devel mailing list