diff --git a/frmts/aigrid/gridlib.c b/frmts/aigrid/gridlib.c index ac4423c82536..330cda968320 100644 --- a/frmts/aigrid/gridlib.c +++ b/frmts/aigrid/gridlib.c @@ -13,8 +13,6 @@ #include "aigrid.h" -#include - #ifndef CPL_IGNORE_RET_VAL_INT_defined #define CPL_IGNORE_RET_VAL_INT_defined diff --git a/frmts/gtiff/tif_jxl.c b/frmts/gtiff/tif_jxl.c index 4634fad4558d..1e7a6af4b3b1 100644 --- a/frmts/gtiff/tif_jxl.c +++ b/frmts/gtiff/tif_jxl.c @@ -413,8 +413,8 @@ static int JXLPreDecode(TIFF *tif, uint16_t s) if (buffer_size != channel_size) { TIFFErrorExtR(tif, module, - "JxlDecoderExtraChannelBufferSize returned %ld, " - "expecting %u", + "JxlDecoderExtraChannelBufferSize returned " + "%" TIFF_SIZE_FORMAT ", expecting %u", buffer_size, channel_size); _TIFFfreeExt(tif, extra_channel_buffer); return 0; diff --git a/frmts/gtiff/tif_jxl.h b/frmts/gtiff/tif_jxl.h index 2827322c7541..5edfe9da9e87 100644 --- a/frmts/gtiff/tif_jxl.h +++ b/frmts/gtiff/tif_jxl.h @@ -25,6 +25,8 @@ #ifndef TIFF_JXL_H_DEFINED #define TIFF_JXL_H_DEFINED +#include "tiffio.h" + #ifndef COMPRESSION_JXL #define COMPRESSION_JXL \ 50002 /* JPEGXL: WARNING not registered in Adobe-maintained registry */ diff --git a/frmts/zlib/contrib/infback9/minified_zutil.h b/frmts/zlib/contrib/infback9/minified_zutil.h index 102320ba685e..78aacd5032ee 100644 --- a/frmts/zlib/contrib/infback9/minified_zutil.h +++ b/frmts/zlib/contrib/infback9/minified_zutil.h @@ -92,89 +92,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - /* target dependencies */ - -#if defined(MSDOS) || (defined(WINDOWS) && !defined(_WIN32)) -# define OS_CODE 0x00 -# ifndef Z_SOLO -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include -# endif -# else /* MSC or DJGPP */ -# include -# endif -# endif -#endif - -#ifdef AMIGA -# define OS_CODE 1 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 2 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#ifdef __370__ -# if __TARGET_LIB__ < 0x20000000 -# define OS_CODE 4 -# elif __TARGET_LIB__ < 0x40000000 -# define OS_CODE 11 -# else -# define OS_CODE 8 -# endif -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 5 -#endif - -#ifdef OS2 -# define OS_CODE 6 -# if defined(M_I86) && !defined(Z_SOLO) -# include -# endif -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif -#endif - -#ifdef __acorn -# define OS_CODE 13 -#endif - -#if defined(_WIN32) && !defined(__CYGWIN__) -# define OS_CODE 10 -#endif - -#ifdef _BEOS_ -# define OS_CODE 16 -#endif - -#ifdef __TOS_OS400__ -# define OS_CODE 18 -#endif - -#ifdef __APPLE__ -# define OS_CODE 19 -#endif - #if defined(_BEOS_) || defined(RISCOS) # define fdopen(fd,mode) NULL /* No fdopen() */ #endif @@ -203,10 +120,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* common defaults */ -#ifndef OS_CODE -# define OS_CODE 3 /* assume Unix */ -#endif - #ifndef F_OPEN # define F_OPEN(name, mode) fopen((name), (mode)) #endif diff --git a/port/cpl_error.h b/port/cpl_error.h index a4d8fcd0a862..63eaa6f3c37b 100644 --- a/port/cpl_error.h +++ b/port/cpl_error.h @@ -17,6 +17,7 @@ #include "cpl_port.h" #include +#include #include /*=====================================================================