This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: RFC: Cygwin 64 bit?
On Jan 18 14:23, Pedro Alves wrote:
> On 01/18/2012 01:57 PM, Corinna Vinschen wrote:
> So I meant, "okay question on LLP64 mode, but there are no original LP64
> sources, though, and there likely won't be."
The idea is that there will be: All Cygwin applications utilizing the
Windows headers.
> >> With the pragma, I think you'd still get a -Wall/-Wformat warning
> >> in LLP64 for
> >>
> >> JET_SIGNATURE js;
> >> printf ("%ld", fs.ulRandom);
> >
> > No, you'd get the warning in LP64. The printf should be fine for LLP64
>
> Right, my point still stands.
Right. You won't get a warning in Win32 conforming code built with a
Win32 conforming LLP64 compiler. You will get a warning in a not yet
existing Cygwin LP64 compiler.
> >> so you can't have a perfect match, and some things will always
> >> need adjustment. The question is then, is
> >>
> >> #if LLP64
> >> unsigned int ulRandom;
> >> #else
> >> unsigned long ulRandom;
> >> #endif
> > [...]
> >> any worse?
> >
> > Well, there's a big difference. If you have to do the above,
> > you have to change lots and lots of places in the header files.
> > The #pragma only requires a dumb adding of two #pragma directives
> > at the start and end of each header file, which can be easily
> > automated. It's also much less intrusive.
>
> I was looking for a technical reason that's worse, other then the
> amount of mechanical work, which I'm sure could also be easily
> scripted, with the long/int hidden behind a #define,
> from the perspective of code that uses the headers. It's obvious
> the pragma is less intrusive to the headers.
I can't think of any. In both cases you will get the type mismatches in
certain circumstances within the LP64 code of the application.
Hmm. The only other problem I could see with the #pragma approach is a
potential clash of debug information within the same CU. If you use
Windows headers you would potentially have two entries for long in
.debug_info:
From the LLP64 code:
<1><d0>: Abbrev Number: 2 (DW_TAG_base_type)
<d1> DW_AT_byte_size : 4
<d2> DW_AT_encoding : 5 (signed)
<d3> DW_AT_name : long int
From the LP64 code in the same CU:
<1><dc>: Abbrev Number: 2 (DW_TAG_base_type)
<dd> DW_AT_byte_size : 8
<de> DW_AT_encoding : 5 (signed)
<df> DW_AT_name : long int
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat