2021.01.04 14:23 "[Tiff] Motions related to C99 use in libtiff", by Even Rouault

2021.01.11 14:12 "Re: [Tiff] Motions related to C99 use in libtiff", by Bob Friesenhahn

Could TIFF_LEGACY_TYPES be 0 or 1 instead of just defined/not defined so tiffio.h could temporarily

#ifndef TIFF_LEGACY_TYPES
#if defined(_STDINT_H) || (__STDC_VERSION__ >= 199901L)
#define TIFF_LEGACY_TYPES 0
#else
#define TIFF_LEGACY_TYPES 1

As some clarification, __STDC_VERSION__ does not provide any clear indication if stdint.h is available because __STDC_VERSION__ is defined by the compiler, but in most Unix-type environments (e.g. "Linux") these header files are provided by the operating system and not by the compiler. For example, GCC and Clang do not provide these header files. Visual Studio, MinGW, and Cygwin, provide such headers for Microsoft Windows because the operating system does not provide header files.

Also, one can not depend on the mechanics employed by the conditional code for some particular OS.

Regardless, your idea to use #include <tiffvers.h> first is a good one, but it is not something that existing source code normally does because it is not a documented header file and there was no need to do this before

Bob

Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt