Size of C/C++ data type from GNU GCC/g++ compiled ELF 64-bit LSB executable, AMD x86-64 vs. ELF 32-bit LSB executable, Intel 80386

Matthew Woehlke mw_triad@users.sourceforge.net
Wed Jun 20 17:14:00 GMT 2007


Brian Dessent wrote:
> 'long' is a more fundamental data type that is used by practically every
> w32api function signiture.

I thought the w32api (w64api?) used typedefs (e.g. 'LONG', 'DWORD', etc) 
almost exclusively? :-)

The C runtime is obviously an issue (except to the extent that Cygwin 
mostly replaces that, so it's hard to say...), but it might be possible 
to do some trickery under the covers so that the w32api stuff all has 
'int' substituted for 'LONG', etc.

In fact, what about simply replacing 'long' with 'int' when processing 
"native" headers? I guess the only tricky part (other than having the 
ability to make such a substitution) is deciding what is a "native" header?

(Ultimately, I think this comes down to 'Microsoft decided to buck trend 
and do their own thing (surprise)' with the result that the rest of the 
world suffers either way :-(.)

-- 
Matthew
"Nobody expects the Spanish Inquisition!" -- Monty Python



More information about the Gcc-help mailing list