diff options
author | Roger Leigh <rleigh@codelibre.net> | 2021-01-22 08:49:05 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@codelibre.net> | 2021-01-22 08:49:05 +0000 |
commit | 41e3efcc2e512849dc7bc194ebf547739072bdb2 (patch) | |
tree | ae1a382edac1791dfe14dfad586ff5ba21c5c768 | |
parent | ddb8756f10520396f09d9c86f740013a69b82e08 (diff) | |
download | libtiff-git-41e3efcc2e512849dc7bc194ebf547739072bdb2.tar.gz |
Add and enable TIFF_DISABLE_DEPRECATED for internal use
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | libtiff/tiff.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fdb33aa6..0a939c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,6 +260,9 @@ int main(void){ }" TM_IN_SYS_TIME) +# Disable deprecated features to ensure clean build +add_definitions(-DTIFF_DISABLE_DEPRECATED) + # Check type sizes set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES}) set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h") diff --git a/configure.ac b/configure.ac index d2033740..e84cbf6b 100644 --- a/configure.ac +++ b/configure.ac @@ -193,6 +193,13 @@ dnl Check if optarg (and presumably related externs) already declared in headers AC_CHECK_DECLS([optarg]) dnl --------------------------------------------------------------------------- +dnl Deprecated features and backward compatibilty +dnl --------------------------------------------------------------------------- + +# Disable deprecated features to ensure clean build +CPPFLAGS="-DTIFF_DISABLE_DEPRECATED $CPPFLAGS" + +dnl --------------------------------------------------------------------------- dnl Compute sized types for current CPU and compiler options dnl --------------------------------------------------------------------------- diff --git a/libtiff/tiff.h b/libtiff/tiff.h index f7f291db..3a37fa51 100644 --- a/libtiff/tiff.h +++ b/libtiff/tiff.h @@ -73,6 +73,7 @@ #define TIFF_MSC_DEPRECATED #endif +#ifndef TIFF_DISABLE_DEPRECATED typedef TIFF_MSC_DEPRECATED int8_t int8 TIFF_GCC_DEPRECATED; typedef TIFF_MSC_DEPRECATED uint8_t uint8 TIFF_GCC_DEPRECATED; @@ -84,6 +85,7 @@ typedef TIFF_MSC_DEPRECATED uint32_t uint32 TIFF_GCC_DEPRECATED; typedef TIFF_MSC_DEPRECATED int64_t int64 TIFF_GCC_DEPRECATED; typedef TIFF_MSC_DEPRECATED uint64_t uint64 TIFF_GCC_DEPRECATED; +#endif /* TIFF_DISABLE_DEPRECATED */ /* |