[Ffmpeg-devel] [PATCH] Correct inttypes.hemulation for VisualStudio

Steve Lhomme slhomme
Tue Dec 5 21:45:23 CET 2006


Diego Biurrun wrote:
> On Tue, Dec 05, 2006 at 01:39:51PM +0100, Michel Bardiaux wrote:
>> Luca Abeni wrote:
>>> What's the problem with copying some "stdint.h" approximation somewhere
>>> in the include path? (some windows users are saying that the typedefs
>>> proposed in the patch that originated this thread work ok... So why not
>>> putting them in the include path, but _outside_ ffmpeg's libraries?)
>>> I think something like this has been proposed in this tread, but I am
>>> failing to see why this solution would not fix the problem.
>>>
>>> I am serious: I understand that there are people that want to use libav*
>>> in msvc projects, and I think this is not an unreasonable expectation
>>> (of course, it is unreasonable to expect that other people will do the
>>> work).
>> The whole point of the thread is whether it is reasonable or not to wish 
>> for this work to be integrated in the main tree.
> 
> It will not be done.
> 
> So will somebody step forward and create an inttypes emulation for MSVC
> that can be used by more than just FFmpeg or will the MS crowd just
> continue lobbying for the easy way out in vain?
> 
> I'm serious, will somebody provide a constructive solution or will there
> be just more complaints?
> 
> We had a similar situation with Intel Mac support.  Michael stood firm and
> rejected the hacky solutions until finally somebody came up with an
> acceptable patch.  The inttypes issue will be no different.

The problem is: what is considered not a hack when attempting to support 
a compiler that is actively rejected ?

IMO libavcodec, libavformat and libavutil are libraries, and therefore 
should be usable when you get a binary (DLL in this case) and the 
headers. In this case the headers are not sufficient and you have to 
look around on the net for the file you need or create the missing file 
from scratch. If these libs were ever to be distributed on windows that 
would be a problem as the lib is not standalone.

I think having a msvc/inttypes.h would be nice. You can call it 
c89/inttypes.h too. Then you can add something like this in the code:

#if __STDC_VERSION__ < 199901L
#include "c89/inttypes.h"
#endif

BTW, Intel's compiler doesn't have a inttypes.h in its windows version. 
And it claims there's a C99 mode (/Qc99 flag). Although it could build 
FFMPEG with the ASM code is it supports the GNU format (and produce 
faster code than gcc).

Steve




More information about the ffmpeg-devel mailing list