From: Zoran V. <zv...@ar...> - 2006-09-14 20:02:26
|
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. My assumption seems to be mostly OK but, allright... And what about unisgned short? Could this be 32bit on 64 bit box? I doubt, but I better ask... > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |