AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.12.18 04:56 "tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 05:13 "Re: tiffvers.h - TIFFLIB_RELEASE macro addition", by Lee Howard
2008.12.18 05:31 "Re: tiffvers.h - TIFFLIB_RELEASE macro addition", by Bob Friesenhahn
2008.12.18 06:00 "Re: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 16:16 "Re: tiffvers.h - TIFFLIB_RELEASE macro addition", by Bob Friesenhahn
2008.12.18 18:59 "Re: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 19:04 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Lee Howard
2008.12.18 19:18 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Edward Lam
2008.12.18 19:20 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 19:28 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Lee Howard
2008.12.18 19:35 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 20:11 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 20:42 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Bob Friesenhahn
2008.12.18 21:56 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.18 22:05 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Bob Friesenhahn
2008.12.19 02:26 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.19 03:12 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Bob Friesenhahn
2008.12.21 16:03 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Jay Berkenbilt
2008.12.21 16:10 "Re: 3.9.0 release", by Jay Berkenbilt
2008.12.21 15:35 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Jay Berkenbilt
2008.12.21 15:57 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Jay Berkenbilt
2008.12.21 16:14 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam
2008.12.21 16:44 "Re: 3.9.0 release, Was: tiffvers.h - TIFFLIB_RELEASE macro addition", by Jay Berkenbilt

2008.12.18 04:56 "tiffvers.h - TIFFLIB_RELEASE macro addition", by Frank Warmerdam

Folks,

In ancient times, the only version information available to applications
building against libtiff was:

#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.0beta3\nCopyright (c) 
1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."

Circa 2000 or so I added:

/*
  * This define can be used in code that requires
  * compilation-related definitions specific to a
  * version or versions of the library.  Runtime
  * version checking should be done based on the
  * string returned by TIFFGetVersion.
  */
#define TIFFLIB_VERSION 20081217

in tiffvers.h.  This is the date of release.

However, as we split the 3.9 and 4.0 branches a "time stamp" no longer
clearly defines the libtiff version well.  So I propose to add:

/*
  * This define contains the library version number encode as
  * two digits each for major, minor and point.  So, for instance,
  * 3.9.8 would be 030908.  This define was only introduced in libtiff4.
  */
#define TIFFLIB_RELEASE 040000

This macro should make it easy to do checks on features from different
versions of libtiff.  An example (whether TIFFUnsetField() is available)
is demonstrated here:

#if TIFFLIB_VERSION >= 20081217 \
     && defined(TIFFLIB_RELEASE) && TIFFLIB_RELEASE >= 040000
         TIFFUnsetField( poGDS->hTIFF, TIFFTAG_COLORMAP );
#else
         CPLDebug( "GTiff",
                   "TIFFUnsetField() not supported, colormap may not be 
cleared." );
#endif

Does the addition of TIFFLIB_RELEASE seem ok to folks?  Any suggestions
or caveats?  Hmm, I just discovered that tiffvers.h is autogenerated
by "make release" in the main libtiff makefile.  Does anyone know why
such a mechanism is used?  It seems like it might be rather involved to
cause it to generate the TIFFLIB_VERSION macro.  I'm inclined to revert
this to a manual process described in HOWTO-RELEASE unless someone
sees a reason for it to be as complicated as it is now.

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    | Geospatial Programmer for Rent