2020.01.18 13:19 "[Tiff] Warnings while building tools", by Miguel Medalha

2020.01.25 16:22 "Re: [Tiff] Warnings while building tools", by Bob Friesenhahn

I am working on fixing up the nmake build. Fixing it is pretty easy, but I have run across something I do not understand. I am confused in that that libport.h seems to use inverted logic for exposing the prototypes for missing strlto* functions:

#if HAVE_STRTOL
long strtol(const char *nptr, char **endptr, int base);
#endif
#if HAVE_STRTOLL
long long strtoll(const char *nptr, char **endptr, int base);
#endif
#if HAVE_STRTOUL
unsigned long strtoul(const char *nptr, char **endptr, int base);
#endif
#if HAVE_STRTOULL
unsigned long long strtoull(const char *nptr, char **endptr, int
base);
#endif

It seems like a HAVE_STRTO* definition should indicate that the system/compiler has this function available so it should not be necessary to provide a prototype or offer a port build for it. Thus I would expect prototype logic like '#if !HAVE_STRTOL'. Looking at CMakeLists.txt the conditional logic which adds source files is as I would expect.

Are you able to explain why the function prototype logic is inverted?

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