[Ffmpeg-devel] stdint.h and inttypes.h for non-C99 compilers
Måns Rullgård
mru
Wed Dec 13 12:56:56 CET 2006
Alexander Chemeris said:
> Hello,
>
> On 12/13/06, Steve Lhomme <steve.lhomme at free.fr> wrote:
>> @@ -42,6 +42,10 @@
>>
>> #include <stdint.h>
>>
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> // 7.8 Format conversion of integer types
>>
>> typedef struct {
>> @@ -268,7 +272,7 @@
>>
>> // This is modified version of div() function from Microsoft's div.c found
>> // in %MSVC.NET%\crt\src\div.c
>> -_inline imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
>> +_inline imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom)
>> {
>> imaxdiv_t result;
>>
>> @@ -292,5 +296,8 @@
>> #define wcstoimax _wcstoi64
>> #define wcstoumax _wcstoui64
>>
>> +#ifdef __cplusplus
>> +}
>> +#endif
>>
>> #endif // _MSC_INTTYPES_H_ ]
> Why do you change this?
> Is __cdecl is not enough?
You're both wrong. The __cdecl modifier tells the compiler to use the
standard C calling convention (the alternative being __stdcall for Pascal
calling convention). Specifying extern "C" turns off C++ name mangling.
For an inline function neither of these have any real effect. You should
probably make that function static though.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list