Re: 64-bit experiment

Keith Marshall <[email protected]> Sat, 8 Apr 2017 17:58:28 +0100
Newsgroups gmane.comp.gnu.mingw.devel
Organization MinGW Project
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/04/17 17:32, Earnie wrote:
>>>> Going forward, we could begin to develop a proper 64-bit port of
>>>> our runtime and w32api.  The first roadblock, I think, is the
>>>> startup code.
>>
>> Seems like a good place to start; we should conditionalize, to make 
>> it as multi-arch as possible.
>
> IIRC _win64 is defined as well as _win32 by the compiler.  The absence
> of _win64 is what can be used to indicate 32bit versus 64bit.

More or less.  AFAIK, the two macros are actually _WIN32 and _WIN64, 
(upper case matters), and *both* are defined by the 64-bit compiler; 
the 32-bit compiler defines only _WIN32.  Thus, the structure for the 
conditionals becomes:

  #if defined _WIN64
  /* 64-bit specific code here:
   */
   .
   .
  #elif defined _WIN32 /* or maybe just #else */
  /* 32-bit specific code here:
   */
   .
   .
  #endif

- -- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJY6RazAAoJEMCtNsY0flo/umcP/29X4f2R6FP7vm/VL0V6m9pw
FiN3CVQ2TGOHJkt2McCW8td/suAsV2vPSFpcynS6xKWjHPB9c3JWcfHYMtk0HXWe
hpLA7c1EyhrpdzHfC5+4F392ZRBmalFiYOXTYg3ucUzfOwO7HeDBGgKhw9Y5pq42
AQ4ZQ2VL6W5TUYYkO76lVRvbU7+1dflINEpPDaMWRjy62shMV+3gG1Z8amVt6B4I
RI7Up/8VgNrcxzSrfSf5C+ZPlChR1OyeujCgWPPB9yp5KzO0YDdCAP0aH1Cw2wrt
Qv6XuqccrRHs5lY5bmd/7QDZ0kGhHXAqnC3aRtH6pXxH7TwZpsDTK+TJBGHU0iF1
kf3J6PzjW+tWauYeQhPSlLoVMtrrOJdy26KxJANO/SaN1b4qkCHhQV4CR9RWvkDm
xynB8NcTdK52AW5HpsJIqQfNnSwaYksu/KnpJRF8yoXKmKFtWtYhFVHhOeU1TSNO
+LBe7DErPRWHetqAb5UhUe+LYVy4UZINSkBitW0iMeSdMLS8I98QY1pl7K5CZUaH
lbyMyWEUFX4Y/pcv5zW7TgyBZDbJh2A5w+JMnIjwBb9TEVaNmvju527SI4DcDdZr
ShsO9s5kkSlZvRaKJ0Pf+08miVtUcvp0Ye3S3tvEBCrXKUh323xM9vBEF3ygKgWJ
Oi9dGi4I/trwbF/BlwRX
=WvnO
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot