You need to log in before you can comment on or make changes to this bug.
When building libtiff on Windows (using Visual Studio supplied compiler) with CMake I encountered a build problem in contrib\iptcutil\iptcutil.c. There we have three preprocessor tests based on WIN32. This WIN32 preprocessor define is not defined. At least this should be changed in _WIN32 (which the Visual Studio compiler is defining automatically) or __WIN32__ which is defined in tiffio.h: --8<-- #if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32)) #define __WIN32__ #endif --8<--
#ifdef WIN32 #define STRNICMP strnicmp #else #define STRNICMP strncasecmp #endif I think #ifdef WIN32 should be changed to #ifdef MSC_VER because it is more a MSVC build problem (I think strncasecmp is defined in MingW)
I think you mean _MSC_VER (see https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2017). The test should in fact determine if the MS C runtime library is used, not based on which compiler you're using so I'm not sure _MSC_VER is any better choice. After all clang/clang-cl can also use MS C runtime library (and hence need to use strnicmp, not strncasecmp). Ideally perhaps check for strnicmp/strncasecmp via a CMake based test ?
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets, such as this one, have been migrated to the libtiff GitLab instance at https://gitlab.com/libtiff/libtiff/issues . The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is the initial Bugzilla issue number.