[Ffmpeg-devel] [PATCH] Correct inttypes.h emulation for Visual Studio

Måns Rullgård mru
Tue Dec 5 13:04:26 CET 2006


Steve Lhomme said:
> M?ns Rullg?rd wrote:
>> Steve Lhomme said:
>>> Diego Biurrun wrote:
>>>> Portable programming is not accumulating special cases for every
>>>> imaginable combination of CPU architecture, operating system and
>>>> development environment.
>>> It is actually the case every time I saw portable code in the hardware
>>> industry. What you're talking about can probably be called compatibility
>>> (with all the flavors of a single OS: UNIX). Doing "portable" code
>>> usually involves having an abstraction layer for all the different
>>> architectures you want to support. And it's often put in "port"
>>> directories (one for each architecture).
>>
>> I don't know where you've seen that "portable" code, but I'm sure I wouldn't
>> want to work there.  Where I work, the exact same code compiles and runs on
>> a dozen different architectures, each with their own compiler and C library.
>> The low-level hardware drivers differ, that's all.
>
> Can you name all these "own" compiler, C library and architecture on
> which the same code is running ?

Architectures, most of them in more than one incarnation:
ARM9
M68k
MIPS4
MIPS5
PPC
ST 5514
ST 5517
ST 5100
ST TP3
x86

Compilers:
ARM ADS
GCC
Microtec (M68k)
MSVC
st20cc
st200cc

C libraries:
ARM ADS
MIPS SDE
Microsoft
Microtec
ST
uClibc

> Anyway, "hello world" should work fine on most platform (with a useful
> stdout) without requiring any OS/compiler specific tricks. It should be
> the case for any piece of code that doesn't need any hardware/low-level
> interaction. And libavcodec and libavformat fall into this category. The
> fact that it fails to be usable on some common compiler just proves that
> the code has some serious limitations.

It is not a "serious limitation" to require a compiler for the language the
code is written in.  In the case of FFmpeg, the language is C99 with some
restrictions.  Apparently, MSVC doesn't compile code in this language.

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




More information about the ffmpeg-devel mailing list