Il 05/10/2011 06:33 PM, Bart Van Assche ha scritto: > On Tue, May 10, 2011 at 5:46 PM, Leo Cacciari <[email protected]> wrote: >> For "normal" platforms, where a long _is_ >> a 32 bits integer then both typedefs lead to exactly the same binary output. > Depends on what you call "normal". With gcc on a 64-bit Linux system a > long contains 64 bits (eight bytes), not 32: > > $ uname -m; { echo '#include <stdio.h>'; echo 'int > main(){printf("%zd\n", sizeof(long));}'; } | gcc -xc - && ./a.out > x86_64 > 8 > > Bart. Ok, let's say 32 bit platforms (which, by today standards would be subnormal ;)) Anyhow, this only confirms what I said: old typedef with u_long was wrong, new one is right. If any binary incompatibility arises, then it will be on platform with 64bits longs, where the old typedef produced not-conforming implementation with 64bits oid.
Leo -- Leo Cacciari Aliae nationes servitutem pati possunt populi romani est propria libertas ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
