[Ffmpeg-devel] [PATCH] Fix broken compilation on Mac OS X 10.2due to OPT_INT64 support

Diego Biurrun diego
Thu Apr 12 11:14:44 CEST 2007


On Thu, Apr 12, 2007 at 11:08:01AM +0200, Baptiste Coudurier wrote:
> 
> Benoit Fouet wrote:
> > 
> > Patrice Bensoussan wrote:
> >> On 7 Apr 2007, at 13:01, Patrice Bensoussan wrote:
> >>
> >>> On 6 Apr 2007, at 19:41, V?ctor Paesa wrote:
> >>>
> >>>>> On 5 Apr 2007, at 19:28, Baptiste Coudurier wrote:
> >>>>>
> >>>>>> Michael Niedermayer wrote:
> >>>>>>>
> >>>>>>> On Thu, Apr 05, 2007 at 06:56:48PM +0100, Patrice Bensoussan wrote:
> >>>>>>>>
> >>>>>>>> The recent patch to support OPT_INT64 option broke the
> >>>>>>>> compilation on
> >>>>>>>> Mac OS X 10.2. The reason for this is that atoll() is not available
> >>>>>>>> on Mac OS X 10.2 (it's only available on 10.3 and later versions).
> >>>>>>>>
> >>>>>>>> From the man page:
> >>>>>>>>
> >>>>>>>>      The atoll() function converts the initial portion of the
> >>>>>>>> string
> >>>>>>>> pointed
> >>>>>>>>      to by nptr to long long integer representation.
> >>>>>>>>
> >>>>>>>>      It is equivalent to:
> >>>>>>>>
> >>>>>>>>            strtoll(nptr, (char **)NULL, 10);
> >>>>>>>>
> >>>>>>>> Simple patch attached to fix the issue.
> >>>>>>> probably ok
> >>>>>>>
> >>>>>> my man says:
> >>>>>>
> >>>>>> atoll: SVr4, POSIX.1-2001, 4.3BSD, C99.  C89 and POSIX.1-1996 include
> >>>>>> the functions atoi() and atol() only.  atoq(3) is a GNU extension.
> >>>>>>
> >>>>>> strtol() conforms to SVr4, 4.3BSD, C99 and POSIX.1-2001, and
> >>>>>> strtoll()
> >>>>>> to C99 and POSIX.1-2001.
> >>>>>>
> >>>>>> maybe someone can test on *BSD/Mingw ?
> >>>>>>
> >>>>> Looks like it should work fine on FreeBSD too (at least 4.3 and
> >>>>> above):
> >>>>>
> >>>>> http://www.freebsd.org/cgi/man.cgi?
> >>>>> query=strtoll&apropos=0&sektion=0&manpath=FreeBSD+4.3-
> >>>>> RELEASE&format=html
> >>>>>
> >>>> It is defined in the includes for cross-compiling under Cygwin, so most
> >>>> probably it is a MinGW valid function:
> >>>>
> >>>> $ fgrep strtoll /usr/include/mingw/*
> >>>> /usr/include/mingw/stdlib.h:long long  __cdecl strtoll (const char*
> >>>> __restrict__, char** __restrict, int);
> >>> Looks good... anyone willing to apply?
> >>
> >> Has this patch been lost? could someone commit the change please? It
> >> would avoid having to fix it manually when I compile for Mac OS X 10.2...
> > it is not lost ;)
> > has someone tested it on FreeBSD ?
> > is someone against this patch to be applied ?
> > if i get no answer until tomorrow, i'll commit it
> 
> Mans/Diego are maintainers of the build system, and none of them
> approved or said anything yet.

Umm, it's a patch for cmdutils.c and Michael said "probably ok" ...

Diego




More information about the ffmpeg-devel mailing list