sizeof(int) test - we're not quite there yet
| From: | Zeev Suraski | Date: | Sun, 04 Jul 1999 23:53:00 +0000 |
| Subject: | sizeof(int) test - we're not quite there yet | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-1881@lists.php.net to get a copy of this message | ||
Testing SIZEOF_INT for being 8 doesn't cut it. Here are the #define's from a Solaris 2.7 box (64-bit Ultrasparcs):
/* The number of bytes in a int. */
#define SIZEOF_INT 4
/* The number of bytes in a long. */
#define SIZEOF_LONG 4
gcc crashes like a champ though.
I wrote a tiny program to make sure that the sizes of int&long are really 4 bytes - and they are. Looks like gcc doesn't take advantage of the increased word size in Solaris..?
Zeev
--
Zeev Suraski <zeev@zend.com> http://www.zend.com/
For a PGP public key, finger bourbon@netvision.net.il