[flac-dev] [PATCH] Remove even more CPP hackery

JonY jon_y at users.sourceforge.net
Thu Feb 9 15:08:44 PST 2012


On 2/10/2012 02:14, LRN wrote:
> On 09.02.2012 21:41, Ben Allison wrote:
>>>> Dave Yeo wrote:
>>>>> Yes that makes sense. Requiring a C99 compliant compiler
>>>>> seems quite
>>> reasonable.
>>>> Well I'm actually going to be even more reasonable than that.
>>>> The only
>>> bits of C99 that flac will really require is header file
>>>> with C99 standard width integers (int8_t, uint8_t, int16_t
>>>> etc). Erik
>>>
>>> I would recommend including with the distribution a file for
>>> windows developers to use.  It's fairly simple
>>>
>>>
>>> /* since windows doesn't have stdint.h */ typedef unsigned
>>> __int64 uint64_t; typedef unsigned __int32 uint32_t; typedef
>>> unsigned __int16 uint16_t; typedef unsigned __int8 uint8_t; 
>>> typedef __int64 int64_t; typedef __int32 int32_t; typedef __int16
>>> int16_t; typedef __int8  int8_t; #if defined(_M_IX64) typedef
>>> unsigned __int128 uint128_t; typedef __int128 int128_t; #endif
> 
>> Also, I agree with the consensus that developers have to #include
>> such a file before using including FLAC/all.h This is because many
>> Windows developers (such as myself) are likely to already have a
>> stdint.h replacement defined somewhere in their project. The other
>> choice would be to see if there's some preprocessor symbol commonly
>> in use that would indicate that these are defined by the compiler 
>> or by preprocessor directives.
> Please, exclude us, MinGW users, from this. MinGW comes with stdint.h

Likewise for MSVC 2010 users. I still sigh a lot when developers assume
Windows == MSVC.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20120210/b797748a/attachment.pgp 


More information about the flac-dev mailing list