On 9/14/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
On 14.09.2006, at 21:52, Stephen Deasey wrote: > > > This code looks wrong: > > /* > * It is pain in the neck to get a satisfactory definition of > * u_int_XX_t or uintXX_t as different OS'es do that in different > * header files and sometimes even do not define such types at all. > * We choose to define them ourselves here and stop the blues. > */ > > typedef unsigned int uint32; > typedef unsigned short uint16; > > > What if int's are 64 bit? There is this code in the Tcl example > extension: > > > #ifdef HAVE_INTTYPES_H > # include <inttypes.h> > typedef uint32_t sha_uint32_t; > #else > # if ((1<<31)<0) > typedef unsigned long sha_uint32_t; > # else > typedef unsigned int sha_uint32_t; > # endif > #endif I spend 3 days peeking all arround at three different platforms (Solaris, Linux, Macosx) and was not able to find a common denominator. The int's are 32 bits AFAIK. The long ints (or ptrs) could be 64 bit on 64 box.
Oh, OK. So on an AMD64 box, pointers are 64bit, but int's are 32? You need long int to get 64bit?
