[Zlib-devel] stddef.h included eventhough Z_SOLO is defined

Theo Niessink theo at taletn.com
Thu May 3 14:04:22 EDT 2012


Hi,

I seem to have missed this in the 1.2.7 release candidate (oops, sorry), but 
on Windows stddef.h is included in zconf.h eventhough Z_SOLO is defined. 
This also causes MSVC to complain about "benign redefinition of type" 
ptrdiff_t. So I propose the following patch:

---
diff --git a/zconf.h b/zconf.h
index 8a46a58..c71cade 100644
--- a/zconf.h
+++ b/zconf.h
@@ -426,7 +426,9 @@ typedef uLong FAR uLongf;
#endif

#ifdef _WIN32
-# include /* for wchar_t */
+# ifndef Z_SOLO
+# include /* for wchar_t */
+# endif
#endif

/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
--

This patch should probably also be applied to zconf.h.cmakein and 
zconf.in.h.

- Theo 





More information about the Zlib-devel mailing list