Re: [Newbie] [Code] Room Flags MSVC 6

From: Dread Quixadhal (quixadhal@chartermi.net)
Date: 10/13/02


>
> Date:    Fri, 11 Oct 2002 12:00:32 -0400
> From:    Carlton Colter <carlton@COLTER.COM>
> Subject: Re: [Newbie] [Code] Room Flags MSVC 6
>
> >They both depend on the CPU architecture. For example, I can make my
> >(ultrasparc enterprise dual) debian/linux-sparc64 autobuilder have
> >64-bit wide ints. Or I could be running Solaris on a supersparc
> >which is only a 32-bit wide architecture. Linux on Itanium or Alpha
> >processors get 64. Solaris on an ultrasparc should get 64, but it
> >depends on your compiler and environment settings. Linux on 32-bit
> >x86 processors (IA32) only get 32-bit wide ints. I could go on, but
> >I shan't. Point is, if you want to compile and run exclusively on
> >64-bit hardware, fine, but if you code for 32-bit ints you're
> >portable across most hardware architectures.
>
> Very cool - and thanks for the lesson!  I have a friend that hosts my mud
> on his Sun Solaris.. I checked with him after your post and he said it
uses
> 64-bit hardware and the OS is 64 bit... so I can support more bits! WOO
HOO!
>
> -Carlton

Actually, if you want to be portable across gcc-based systems, I believe you
can redeclare all "int" variables to "long long" and you will get 64-bit
integers regardless of the target platform.  Of course, on 32-bit cpu's you
will incur a sizeable performance penalty.  I don't have a 64-bit platform
to
verify that on though, so be sure to try a printf("%d\n", sizeof(long long))
first to be sure it actually works.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT