[PATCH] Fix type inconsistencies in stdint.h

Dave Korn dave.korn.cygwin@googlemail.com
Tue Apr 7 13:12:00 GMT 2009


Eric Blake wrote:

> According to Christopher Faylor on 4/4/2009 12:24 AM:
>>> Because our stdint.h types are divergent from Linux, and changing them
>>> instead could cause yet another ABI break.
>> Why would changing uint32_t from 'unsigned long' to 'unsigned int' break
>> anything?  It looks to me like that is a disaster waiting to happen if
>> we ever provide a 64-bit port.
> 
> If we ever provide a 64-bit port, then we are free to use #ifdef magic to
> select a different underlying type on 64-bit compiles than on 32-bit
> compiles.  

  Indeed, that would be more linux like, because that's how linux does it, e.g
(from http://linux.die.net/include/stdint.h):

# if __WORDSIZE == 64
typedef long int		int64_t;
# else
__extension__
typedef long long int		int64_t;
# endif

    cheers,
      DaveK




More information about the Cygwin-patches mailing list