mirror of
https://gitlab.com/libtiff/libtiff.git
synced 2026-01-18 21:51:18 +01:00
Make TIFF_MAX_DIR_COUNT a autoconf/CMake setting
This commit is contained in:
@@ -35,6 +35,8 @@ if(strip-chopping)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(TIFF_MAX_DIR_COUNT 1048576 CACHE STRING "Maximum number of TIFF directories that libtiff can browse through")
|
||||
|
||||
# Defer loading of strip/tile offsets
|
||||
option(defer-strile-load "enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen())" OFF)
|
||||
set(DEFER_STRILE_LOAD ${defer-strile-load})
|
||||
|
||||
14
configure.ac
14
configure.ac
@@ -1080,6 +1080,20 @@ if test "$HAVE_STRIPCHOP" = "yes" \
|
||||
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Maximum number of TIFF directories that libtiff can browse through
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_WITH(max-dir-count,
|
||||
AS_HELP_STRING([--with-max-dir-count=SIZE],
|
||||
[Maximum number of TIFF directories that libtiff can browse through [[default=1048576]]]),,)
|
||||
|
||||
if test "x$with_max_dir_count" = "x" -o "x$with_max_dir_count" = "xyes"; then
|
||||
with_max_dir_count="1048576"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(TIFF_MAX_DIR_COUNT,$with_max_dir_count,[Maximum number of TIFF directories that libtiff can browse through])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Should we try to defer loading of strip/tile offsets and sizes to
|
||||
dnl optimize directory scanning?
|
||||
|
||||
@@ -112,6 +112,9 @@
|
||||
/* Default size of the strip in bytes (when strip chopping enabled) */
|
||||
#define STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@
|
||||
|
||||
/** Maximum number of TIFF IFDs that libtiff can iterate through in a file. */
|
||||
#define TIFF_MAX_DIR_COUNT @TIFF_MAX_DIR_COUNT@
|
||||
|
||||
/* define to use win32 IO system */
|
||||
#cmakedefine USE_WIN32_FILEIO 1
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
/* Default size of the strip in bytes (when strip chopping enabled) */
|
||||
#undef STRIP_SIZE_DEFAULT
|
||||
|
||||
/* Maximum number of TIFF IFDs that libtiff can iterate through in a file. */
|
||||
#undef TIFF_MAX_DIR_COUNT
|
||||
|
||||
/* define to use win32 IO system */
|
||||
#undef USE_WIN32_FILEIO
|
||||
|
||||
|
||||
@@ -277,11 +277,6 @@ typedef struct
|
||||
#define TIFF_ATTRIBUTE(x) /*nothing*/
|
||||
#endif
|
||||
|
||||
/** Maximum number of TIFF IFDs that libtiff can iterate through in a file. */
|
||||
#ifndef TIFF_MAX_DIR_COUNT
|
||||
#define TIFF_MAX_DIR_COUNT 1048576
|
||||
#endif
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -55,6 +55,10 @@
|
||||
#define STRIP_SIZE_DEFAULT 8192
|
||||
#endif
|
||||
|
||||
#ifndef TIFF_MAX_DIR_COUNT
|
||||
#define TIFF_MAX_DIR_COUNT 1048576
|
||||
#endif
|
||||
|
||||
#define streq(a, b) (strcmp(a, b) == 0)
|
||||
#define strneq(a, b, n) (strncmp(a, b, n) == 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user