[FFmpeg-devel] cmdutils.c

Frank Liu gfrankliu
Sat Mar 1 05:14:17 CET 2008


>> I am compiling today's ffmpeg svn on Solaris 10 Sparc and got the
below errors:
>>
>>  cmdutils.c: In function 'parse_options':
>>  cmdutils.c:131: error: 'INFINITY' undeclared (first use in this function)
>>  cmdutils.c:131: error: (Each undeclared identifier is reported only once
>>  cmdutils.c:131: error: for each function it appears in.)
>>  gmake: *** [cmdutils.o] Error 1
>>
>>
>>  I searched the source tree and cut/paste the below code from ffmpeg.c:
>>  #if !defined(INFINITY) && defined(HUGE_VAL)
>>  #define INFINITY HUGE_VAL
>>  #endif
>>  and now cmdutils.c compiles fine.
>
> FWIW, INFINITY is required by POSIX to be defined by math.h

Solaris does have it defined in math, but it is wrapped :

#if defined(_STDC_C99) || _XOPEN_SOURCE - 0 >= 600 || defined(__C99FEATURES__)
#undef  HUGE_VAL
#define HUGE_VAL        __builtin_huge_val
#undef  HUGE_VALF
#define HUGE_VALF       __builtin_huge_valf
#undef  HUGE_VALL
#define HUGE_VALL       __builtin_huge_vall
#undef  INFINITY
#define INFINITY        __builtin_infinity
....

Since none of those *C99*/*XOPEN* are defined in ffmpeg, I got the
compilation error.

Anyway, since ffmpeg.c uses that block of code, it is probably easier
just to copy/paste into cmdutils.c.

Frank




More information about the ffmpeg-devel mailing list