[Ffmpeg-devel] network include files for MinGW

Måns Rullgård mru
Thu Jan 25 00:07:43 CET 2007


Ramiro Polla <angustia at arrozcru.no-ip.org> writes:

> M?ns Rullg?rd wrote:
>> "Fran?ois Revol" <revol at free.fr> writes:
>>
>>
>>>> ramiro at lisha.ufsc.br writes:
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> MinGW doesn't have some include files used in networking such as
>>>>> arpa/inet.h.
>>>>>
>>>>> What's the preferable way of going around this?
>>>>> - #ifdef in each file with these includes
>>>>> - make a network.h file with the #ifdefs inside it, and every
>>>>> network file
>>>>> should include it
>>>>> - make configure generate dummy include files for MinGW builds
>>>>>
>>>> I prefer option #2.  The fewer #ifdefs, the better.
>>>>
>>> I actually removed the #ifdefs __BEOS__ for arpa/inet.h just a week
>>> ago :D
>>> What I thought about instead was to have fake headers instead. For
>>> BeOS only arpa/inet.h is missing (and only for R5 actually), so it
>>> wouldn't be too hard.
>>> How many are missing for MinGW ?
>>>
>>> What we could do is have a platform/ folder (or support/ or compat/
>>> or whatever) with folders for platforms needing headers.
>>> For ex:
>>>
>>> platform/beosr5/arpa/inet.h
>>> platform/mingw/arpa/inet.h
>>> platform/mingw/whatever.h
>>>
>>> and configure would just add -Iplatform/$platform/ to CFLAGS.
>>>
>>
>> Having header files with names intentionally the same as system header
>> files is a bad idea.  It will only lead to trouble sooner or later.
>>
>>
>>> We could also just use a single header like os_support.h for the
>>> network.
>>>
>>
>> The proper solution is for the configure script to check which headers
>> are present.  Workarounds can then  be provided for the specific
>> features that are missing from the target system.
>
> Would something like this be acceptable?

No.  That's exactly what I said not to do.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list