Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #3218

Re: 64 bit check?

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.programming
Subject Re: 64 bit check?
Date 2013-04-03 10:09 +1300
Message-ID <as0vo4Fbg77U3@mid.individual.net> (permalink)
References <bfd869a1-e70f-448b-9cf5-6107309a4366@googlegroups.com>

Show all headers | View raw


bob wrote:
> Is this a foolproof way to check if your code is running in 64 bit mode?
>
> int pointer_size = sizeof(int*);
> boolean sixty_four_bit = (pointer_size==8) ? true : false;

Define a constant at compile time based on the compiler's built in flags.

-- 
Ian Collins

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

64 bit check? bob <bob@coolfone.comze.com> - 2013-04-02 13:58 -0700
  Re: 64 bit check? Ian Collins <ian-news@hotmail.com> - 2013-04-03 10:09 +1300
  Re: 64 bit check? Robert Wessel <robertwessel2@yahoo.com> - 2013-04-03 01:14 -0500
  Re: 64 bit check? Jongware <jongware@no-spam.plz> - 2013-04-03 16:42 +0200

csiph-web