aboutsummaryrefslogtreecommitdiff
path: root/zutil.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2012-06-19 05:48:36 +0000
committerXin LI <delphij@FreeBSD.org>2012-06-19 05:48:36 +0000
commit11598cceda4aa6b2db006d9dc3b7c80e9e727174 (patch)
tree65f97a778a7643891e5d3b1724fd3e6f5acd6279 /zutil.c
parent48e633e3cf6760e7d6fe3be88fd4a393374433a7 (diff)
Vendor import of zlib 1.2.7.vendor/zlib/1.2.7
Diffstat (limited to 'zutil.c')
-rw-r--r--zutil.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/zutil.c b/zutil.c
index 8a1d2420937f..65e0d3b72b05 100644
--- a/zutil.c
+++ b/zutil.c
@@ -1,11 +1,14 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010, 2011 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zutil.h"
+#ifndef Z_SOLO
+# include "gzguts.h"
+#endif
#ifndef NO_DUMMY_DECL
struct internal_state {int dummy;}; /* for buggy compilers */
@@ -85,11 +88,31 @@ uLong ZEXPORT zlibCompileFlags()
#ifdef FASTEST
flags += 1L << 21;
#endif
-#ifdef Z_SOLO
- return flags;
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifdef NO_vsnprintf
+ flags += 1L << 25;
+# ifdef HAS_vsprintf_void
+ flags += 1L << 26;
+# endif
+# else
+# ifdef HAS_vsnprintf_void
+ flags += 1L << 26;
+# endif
+# endif
#else
- return flags + gzflags();
+ flags += 1L << 24;
+# ifdef NO_snprintf
+ flags += 1L << 25;
+# ifdef HAS_sprintf_void
+ flags += 1L << 26;
+# endif
+# else
+# ifdef HAS_snprintf_void
+ flags += 1L << 26;
+# endif
+# endif
#endif
+ return flags;
}
#ifdef DEBUG