On Tue, Apr 07, 2009 at 08:12:26PM +0200, Bernhard Reutner-Fischer wrote: > On Sat, Nov 01, 2008 at 10:08:06AM +0100, Tobias Oetiker wrote: > > >This sounds like quite a bit of added complexity. It would > >require us to be able to convert from all platforms to all other > >platforms ... I have the feeling that adding one new format with > >the ability to read the old one already puts quite something on our > >plate. > > Why didn't we use htonl(), ntohl() etc, btw? > > It's not that converting between "host" and "network" byte order is > something new, ISTR.. > > This means that we just store the data in network byte order on disk > and read it back with ntohl(), ntohs(). This should result in > much reduced pain, i would say.
Given the various machine architectures (now and future), and the various packing strategies employed by all the compilers out there, it makes sense to use 64-bit values. Is there a standard ntohl() equivalent for 64-bits? Most of the work is in ensuring that all accesses to the file use the proper xtoy() and ytox()... not actually picking the function. -- kevin brintnall =~ /[email protected]/ _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
