2007.08.24 21:08 "[Tiff] A few libtiff4 changes", by Frank Warmerdam

2007.09.12 13:56 "Re: [Tiff] SIZEOF_UNSIGNED_LONG", by Frank Warmerdam

Ooops, sorry, I didn't mean to send that. Here's what I really meant to comment on.

> I wonder if we should either:
> o Require that SIZEOF_UNSIGNED_LONG be explicitly 8 or 4, and if it

>> is not

> defined we #error to stop the build.

What about just erroring if it's not defined? ie.

#ifndef SIZEOF_UNSIGNED_LONG
   #error SIZEOF_UNSIGED_LONG needs to be defined
#endif

Edward,

Well, this doesn't address the case of it being defined to something odd, like 5. I was suggesting:

#if SIZEOF_UNSIGNED_LONG == 8
... code

#elif SIZEOF_UNSIGNED_LONG == 4
... code

#else

#error "SIZEOF_UNSIGNED_LONG undefined or defined to a value other than 4 or 8" #endif

Er, what happened to the SIZEOF_LONG macro? I'm still using 3.7.0 though.

I believe that this bit of code was touched as part of libtiff 4 work and was altered to use unsigned long and the required macro was accordingly changed. I might question the necessity of the change, but for now I'm happy to make this arrangement more bullet proof. SIZEOF_LONG may still be used in other parts of the code base.

Best regards,
--
---------------------------------------+--------------------------------------

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam

and watch the world go round - Rush    | President OSGeo, http://osgeo.org