On Mon, 2005-04-04 at 12:51 -0400, Brian Weaver wrote: 
> 
> Any chance you could enlighten those of us without access to 64-bit
> machines what the sizeof operator returns in your little program?

Hi Brian,

Sure, on a typical 64-bit system you'll see:

cat <<EOF > tst.c
#include "stdio.h"
int main (int argc, char ** argv)
{
   printf("sizeof(long) = %d\n",sizeof(long));
   printf("sizeof(unsigned long) = %d\n",sizeof(unsigned long));
   printf("sizeof(long long) = %d\n",sizeof(long long));
   return 0;
}
EOF
make tst
./tst
sizeof(long) = 8
sizeof(unsigned long) = 8
sizeof(long long) = 8

so beware of the variable sizeof(...)'s.  AMD64, PPC64, and EM64T are
becoming quite popular.  Its likely that, in less than two years, most
chips sold (inc. laptops) will be 64-bit-capable.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  [EMAIL PROTECTED]                [EMAIL PROTECTED]
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464

-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

Reply via email to