diff --git a/CMakeLists.txt b/CMakeLists.txt index d49508a0..25e45c16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,6 +397,10 @@ int main(void) { }" HAVE_SNPRINTF) +if(NOT HAVE_SNPRINTF) + add_definitions(-DNEED_LIBPORT) +endif() + # CPU bit order set(fillorder FILLORDER_MSB2LSB) if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i.*86.*" OR diff --git a/ChangeLog b/ChangeLog index 41716a15..7e85a50a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-08-20 Bob Friesenhahn + + * tools/CMakeLists.txt, port/snprintf.c: Patch by Roger Leigh to + fix build issues when using Cmake due to Windows large file + changes. + 2015-08-18 Bob Friesenhahn * libtiff/tiffiop.h: First cut at supporting large files under diff --git a/port/snprintf.c b/port/snprintf.c index ce261291..1c4ac087 100644 --- a/port/snprintf.c +++ b/port/snprintf.c @@ -11,7 +11,7 @@ #include #include "libport.h" -int vsnprintf(char* str, size_t size, const char* format, va_list ap) +int _TIFF_vsnprintf_f(char* str, size_t size, const char* format, va_list ap) { int count = -1; @@ -23,7 +23,7 @@ int vsnprintf(char* str, size_t size, const char* format, va_list ap) return count; } -int snprintf(char* str, size_t size, const char* format, ...) +int _TIFF_snprintf_f(char* str, size_t size, const char* format, ...) { int count; va_list ap; diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index c8a5005f..a595c4b8 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -26,6 +26,7 @@ extra_dist(Makefile.vc) include_directories(${PROJECT_SOURCE_DIR}/libtiff ${PROJECT_BINARY_DIR}/libtiff + ${PROJECT_SOURCE_DIR}/port ${CMAKE_CURRENT_BINARY_DIR}) add_executable(bmp2tiff bmp2tiff.c)