[Ffmpeg-devel] stdint.h and inttypes.h for non-C99 compilers
Steve Lhomme
steve.lhomme
Tue Dec 12 15:50:23 CET 2006
Steve Lhomme wrote:
> Alexander Chemeris wrote:
>> Hello,
>>
>> I wrote inttypes.h and stdint.h that should conform to C99 Standard.
>> They depends on internal Visual Studio headers, thus does not portable
>> to any other compilers. But for Visual Studio they work well. Check them
>> here:
>> http://msinttypes.googlecode.com/svn/trunk/stdint.h
>> http://msinttypes.googlecode.com/svn/trunk/inttypes.h
>> Any constructive notes on this implementation are welcome.
>>
>> Also I found portable version of stdint.h on the net:
>> http://www.azillionmonkeys.com/qed/pstdint.h
>> However it does not implement inttypes.h.
>>
>> Please, add this links to FAQ, may be under Windows section.
>
> When using it with VC++ Express I get the following warning:
> adler32.c
> c:\Perso\Programmes\DivX\DrDivXOSS\work\drffmpeg\platform\msvc\stdint.h(154)
> : warning C4005: 'SIZE_MAX' : macro redefinition
> C:\Program Files\Program\Microsoft Visual Studio
> 8\VC\include\limits.h(92) : see previous definition of 'SIZE_MAX'
>
> And also:
> allcodecs.c
> C:\Program Files\Program\Microsoft Visual Studio
> 8\VC\include\wchar.h(44) : warning C4005: 'WCHAR_MAX' : macro redefinition
>
> c:\Perso\Programmes\DivX\DrDivXOSS\work\drffmpeg\platform\msvc\stdint.h(162)
> : see previous definition of 'WCHAR_MAX'
>
> They can be fixed with #ifndef SIZE_MAX and #ifndef WCHAR_MAX
OK scrap that. Noone's going to modify MS headers. But it happens
because you assume wchar.h is included which is not the case. So the
solution is to include wchar.h in your file.
> I'll give it a try in VC6 too.
Much worse. It doesn't know INT8, INT16, UINT8, UINT16, int8_t, int16_t,
uint8_t, uint16_t. So I think it's better to use char and short for these.
I attach a version working with VC++ Express (also VS2005) and VC6.
Steve
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stdint.h
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061212/c3b4fb8f/attachment.asc>
More information about the ffmpeg-devel
mailing list