Subject: Re: bug#9960: Compiling Emacs trunk with MSVC

From: Eli Zaretskii <[email-masked]>
Date: Mon, 21 Nov 2011 05:51:02 +0200

> From: Juanma Barranquero <[email-masked]>
> Date: Mon, 21 Nov 2011 03:45:06 +0100
> Cc: [email-masked], Fabrice Popineau <[email-masked]>,
> 	[email-masked]
> 
> On Mon, Nov 21, 2011 at 03:30, Stefan Monnier <[email-masked]> wrote:
> 
> > I'm not sure I understand the question, but IIUC the answer is that
> > `long' is 64bit on all known 64bit POSIX systems.
> 
> OK, let me rephrase the question to Fabrice (I thought that he meant
> that there was some typedef or macro that he had to change, not
> variables directly declared to be long):
> 
> Why it is a problem to "switch long to something that is 64 bits long
> on a 64-bit architecture"? What is the problem exactly?

The hidden assumption is that a long and a pointer are of the same
width.  This is true on 32-bit hosts and on 64-bit Posix hosts (which
have the LP64 architecture), but not on 64-bit Windows, where long is
a 32-bit data type, but a pointer is 64-bit wide.