bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Windows 64-bit abomination


From: Matthew Woehlke
Subject: Re: The Windows 64-bit abomination
Date: Thu, 26 Oct 2006 10:09:48 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0

Paul Eggert wrote:
I assume you're talking about IA-64 Windows.  But as I understand it,
long int is 32 bits on that platform, and off_t is 64 bits, so it's
not a problem.
Nope, x86_x64 Windows.

Can you please double-check this?  I could understand 64-bit long int,
but that's not a problem either.  The problem occurs only if off_t is
_narrower_ than long int.  I find it hard to believe that off_t would
be 32 bits on such a platform.

It isn't narrower that "long int", because "long int" *is 32 bits*. And, as best I can tell, so is off_t.

sys/types.h has:
typedef long _off_t;
typedef long off_t;

...and wchar.h has the same.

But to make sure...

$ cat test.c
#include <sys/types.h>
#include <stdio.h>

int main() {
  printf("// sizeof(long)  == %i\n",sizeof(long));
  printf("// sizeof(off_t) == %i\n",sizeof(off_t));
  printf("// sizeof(void*) == %i\n",sizeof(void*));
  return 0;
}
$ cl /nologo test.c
test.c
$ ./test
// sizeof(long)  == 4
// sizeof(off_t) == 4
// sizeof(void*) == 8


To clarify, I wasn't actually claiming that off_t was *not* 64 bits, although now that you've made me check that assumption, obviously I was wrong...

Where is this documented online?

http://msdn.microsoft.com/? Well, somewhere there, anyway. MSDN is the standard place for Microsoft developer documentation.

--
Matthew
$ kill bill - kill: can't find process "bill"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]