From 2b76d786553ef5a0325bd77cce02541cdf76827e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 15 Jun 2025 14:50:52 +0200 Subject: bzlib.h: Move #includes outside extern "C" {...} This helps C++ compilers that come with their own standard library headers that don't expect to be included inside of extern "C" {...}. https://sourceware.org/bugzilla/show_bug.cgi?id=32812 --- bzlib.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bzlib.h b/bzlib.h index 8966a6c..ac3f1ba 100644 --- a/bzlib.h +++ b/bzlib.h @@ -22,6 +22,15 @@ #ifndef _BZLIB_H #define _BZLIB_H +#ifndef BZ_NO_STDIO +/* Need a definitition for FILE */ +#include +#endif + +#ifdef _WIN32 +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -70,13 +79,7 @@ typedef #define BZ_EXPORT #endif -#ifndef BZ_NO_STDIO -/* Need a definitition for FILE */ -#include -#endif - #ifdef _WIN32 -# include # ifdef small /* windows.h define small to char */ # undef small -- cgit v1.2.3-55-g6feb