[rrd-developers] [rrd] 32bit vs 64bit compatibility issues.

D. Walsh info at daleenterprise.com
Sat Nov 10 09:53:23 CET 2007

Hash: SHA1

On Nov 10, 2007, at 01:39:18, Tobias Oetiker wrote:

> Hi Dale,
>> Since the CPU itself isn't changing and sharing the rrd files between
>> different platforms isn't a concern, is it possible to patch the  
>> source to
>> allow it to use the .rrd files generated regardless of whether  
>> they were
>> created by the 32 bit app or the 64bit app?
>> Basically I guess I need to force it to generate the 32bit .rrd  
>> content
>> regardless of whether it's run in 32bit or 64bit so I can utilize  
>> the .rrd
>> files under any app and maintain some kind of compatibility.
>> I'd like to start doing this under the 1.0.49 build since this is  
>> the most
>> common version used in my OS and then once I have something  
>> working move the
>> patches to a newer version as I attempt to provide upgrades for  
>> the users.
> well the reason for this incompatibility is that in 32 and 64 bit
> mode the data alignment in structs is different. It is not easily
> possible to force a 64bit binary todo 32bit alignement. The other
> way, can be done though by properly arangeing the content of the
> sruct and / or adding padding to it.
> if you go to the rrdtool wiki you can see a lot of information on
> this toppic. I will adress this in the 1.4 series of rrdtool. It
> will featuere a format update which causes rrdfiles to be portable
> across platforms and bitwidths.

Basically I think if I convert all unsigned longs to uint32_t , longs  
to int32_t I think I should be OK cause I believe double can be  
swapped with int32_t but things like "signed long int" pose a problem.

> cheers
> tobi
>> Ideas?
>> - -- Dale
>> Version: GnuPG v1.4.2.2 (Darwin)
>> KI6l/3jx0bgjI+hkYVV85cE=
>> =LDQ7
>> -----END PGP SIGNATURE-----
> -- 
> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
> http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902

Version: GnuPG v1.4.2.2 (Darwin)


More information about the rrd-developers mailing list