This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] Fix type inconsistencies in stdint.h
Christopher Faylor wrote:
> Why would changing uint32_t from 'unsigned long' to 'unsigned int' break
> anything?
Well, it mangles differently and will resolve overloads and instantiate
templates differently won't it?
> It looks to me like that is a disaster waiting to happen if
> we ever provide a 64-bit port
Not necessarily. Win64 is an LLP64 platform. Won't that make it OK? All
the 32-bit integer types remain 32-bits, the 64-bit long long remains 64-bits,
only pointers change in size. (Along with the related [u]intptr_t, ptrdiff_t
etc.)
> Isn't a long 32 bits? What would be the ABI breakage in changing that
> one typedef rather than lots of #defines? It seems like fixing the
> typedefs in stdint.h is the right thing to do before Cygwin 1.7 rolls
> out.
Agreed, but I'm not sure if they are wrong yet. Just different, with a
legacy of applications that expect them to be the way they currently are.
cheers,
DaveK