From: Mat Date: Fri, 30 Oct 2015 09:39:02 +0000 (+0100) Subject: fix for preprocessor namespace pollution X-Git-Tag: 1.9.9-b1~795^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F54%2Fhead;p=thirdparty%2Fzlib-ng.git 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 --- 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 */