title: Is there a standard way to determine at compile-time if system is 32 or 64 bit?
body: <p>I need to set <code> #ifdef </code> - checks for conditional compile. I want to automate the process but cannot specify the target OS/machine. Is there some way that the pre-compiler can resolve whether it it is running on 32-bit or 64-bit?</p>
  
  <p>(Explanation) I need to define a type that is 64 bits in size. On 64bit OS it is a long, on most others it is a long long.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/735647/ifdef-for-32-bit-platform/735656#735656">this answer</a> - is this the correct way to go?</p>
  
  <p>[edit] a <a href="http://sourceforge.net/apps/mediawiki/predef/index.php?title=Main_Page" rel="nofollow noreferrer">handy reference for compiler macros</a></p>