On Wed, 2004-08-25 at 17:41, Robert Story wrote: > On Wed, 25 Aug 2004 16:48:15 +0100 Dave wrote: > DS> RS> I'd vote for the <inttypes.h>/<stdint.h> style (more C99 headers). > DS> RS> I'd like to avoid project specific types... > DS> > DS> OK - so what would that mean in practise? > DS> What should the typedef name be for: > DS> > DS> a) unsigned 32-bit integers > DS> b) signed 32-bit integers > DS> c) unsigned 64-bit integers > DS> d) signed 64-bit integers > > uint32_t, int32_t, uint64_t, int64_t. > > Though I'm not sure we'd need explicit 64 bit types. (There is intmax_t for the > case when you simply want the largest available int type.) I think the idea is > more focused on explicit sizes for constrained types. MIB variables and OIDs > are the two examples (OIDs are currently u_long, which means on 64 bit, they > can contain illegal values). > I think that there is a need to make a distinction between the data that is carried in the snmp payload and between native OS values.
Surely uint64_t and int64_t are needed for holding things like Counter64 values. Things like uintmax_t are more appropriate for the OS specific side of things where counters may get truncated to 32 bit values but the OS reports them as 64 bits. Richard -- [EMAIL PROTECTED] ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
