From 596ea9ea209040b6f3b8496cb5616f5c552ba332 Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 30 Oct 2015 10:39:02 +0100 Subject: [PATCH] fix for preprocessor namespace pollution Do not pollute the namespace with a define for byte. This breaks various things. Instead use typedef which was also used in the original version of zlib.conf: #if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ #ifdef SMALL_MEDIUM /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ # define Bytef Byte FAR #else typedef Byte FAR Bytef; #endif --- zconf.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zconf.h.in b/zconf.h.in index 74c773c1..55488afa 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -92,8 +92,8 @@ #endif /* Fallback for something that includes us. */ -#define Byte unsigned char -#define Bytef unsigned char +typedef unsigned char Byte; +typedef Byte Bytef; typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ -- 2.47.2