[Ffmpeg-devel] Re: [PATCH] MinGW and portability

Frantisek Dvorak valtri
Wed Mar 29 10:14:46 CEST 2006


Thanks for looking the patches.


Comments to Mans Rullard:

>> -CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I
$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_GNU_SOURCE
>> +CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I
$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_GNU_SOURCE -DLIB_CLIENT
> 
> Why?  LIB_CLIENT doesn't have a magic meaning, and you're not using it
elsewhere.

Right, sorry. I forget remove this change from my local tree.

>> +#ifdef AVFORMAT_COMPILE
>> +#  define _DL_IMPORT_AVFORMAT
>> +#else
>> +#  define _DL_IMPORT_AVFORMAT _DL_IMPORT
>> +#endif
> 
> What's this all about?  People are compiling and using ffmpeg on
> windows all the time without any mess like this.
>

With compiling ffmpeg Windoze users are forced to use recent MinGW or
CygWin. It's probably OK, since ffmpeg contains various nifty and
naughty things. :-> Users/developers with ancient compilers (it includes
"ancient" MinGW with gcc 2.95!) need this.

>> Index: qt-faststart.c
>> ===================================================================
>> RCS file: /cvsroot/ffmpeg/ffmpeg/qt-faststart.c,v
>> retrieving revision 1.8
>> diff -u -p -u -r1.8 qt-faststart.c
>> --- qt-faststart.c	27 Mar 2006 16:34:21 -0000	1.8
>> +++ qt-faststart.c	28 Mar 2006 18:02:39 -0000
>> @@ -20,13 +20,24 @@
>>   * presently only operates on uncompressed moov atoms.
>>   */
>>  
>> +#include "config.h"
>>  #include <stdio.h>
>>  #include <stdlib.h>
>> +#ifdef HAVE_INTTYPES_H
>>  #include <inttypes.h>
>> +#endif
>> +#ifdef HAVE_STDINT_H
>> +#include <stdint.h>
>> +#endif
>
> Both inttypes.h and stdint.h are standard C.  If you are missing them
> you should fix your environment.
>

Standard C? I agree good environments should have it, but there already
are some check for inttypes.h in configure to make ffmpeg as portable as
possible.


Comments to Rich Felker:

> This patch was already rejected once before. The solution is to add
> the equivalent of -Dnear=msvc_sucks_near to your build options, not to
> invasively alter valid C code to workaround MS bugs.

Cute trick. I'll use it thanks. (btw. not only M$VC, whole WIN32 sucks
near :-), maybe should be used in ffmpeg configure too...)

> Agree. Totally unacceptable.
> Also, using the name _DL_IMPORT is illegal in a conforming C
> application. This name is reserved for the implementation (__.* and
> _[[:upper:]].* are reserved).

OK, users can use this patch if they will use ancient compilers and
ffmpeg library, but no dirty things in ffmpeg code. :-) I'll just rename
_DL_IMPORT* and hide this patch somewhere to net.

Cheers,
  Frantisek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je digit?ln? podepsan? ??st zpr?vy
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060329/bca0ce89/attachment.pgp>



More information about the ffmpeg-devel mailing list