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
This commit is contained in:
Mark Wielaard 2025-06-15 14:50:52 +02:00
parent fbc4b11da5
commit 2b76d78655

15
bzlib.h
View File

@ -22,6 +22,15 @@
#ifndef _BZLIB_H
#define _BZLIB_H
#ifndef BZ_NO_STDIO
/* Need a definitition for FILE */
#include <stdio.h>
#endif
#ifdef _WIN32
#include <windows.h>
#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 <stdio.h>
#endif
#ifdef _WIN32
# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small