aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2025-06-15 14:50:52 +0200
committerMark Wielaard <mark@klomp.org>2025-06-15 14:51:05 +0200
commit2b76d786553ef5a0325bd77cce02541cdf76827e (patch)
tree6693440ac5d5455b285e6a72ed9530d945b7500d
parentfbc4b11da543753b3b803e5546f56e26ec90c2a7 (diff)
downloadbzip2-2b76d786553ef5a0325bd77cce02541cdf76827e.tar.gz
bzip2-2b76d786553ef5a0325bd77cce02541cdf76827e.tar.bz2
bzip2-2b76d786553ef5a0325bd77cce02541cdf76827e.zip
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
-rw-r--r--bzlib.h15
1 files 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 @@
22#ifndef _BZLIB_H 22#ifndef _BZLIB_H
23#define _BZLIB_H 23#define _BZLIB_H
24 24
25#ifndef BZ_NO_STDIO
26/* Need a definitition for FILE */
27#include <stdio.h>
28#endif
29
30#ifdef _WIN32
31#include <windows.h>
32#endif
33
25#ifdef __cplusplus 34#ifdef __cplusplus
26extern "C" { 35extern "C" {
27#endif 36#endif
@@ -70,13 +79,7 @@ typedef
70#define BZ_EXPORT 79#define BZ_EXPORT
71#endif 80#endif
72 81
73#ifndef BZ_NO_STDIO
74/* Need a definitition for FILE */
75#include <stdio.h>
76#endif
77
78#ifdef _WIN32 82#ifdef _WIN32
79# include <windows.h>
80# ifdef small 83# ifdef small
81 /* windows.h define small to char */ 84 /* windows.h define small to char */
82# undef small 85# undef small