summaryrefslogtreecommitdiff
path: root/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/Compress-Raw-Zlib/zlib-src/zutil.c')
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/zutil.c75
1 files changed, 29 insertions, 46 deletions
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/zutil.c b/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
index 1eff158182..8a1d242093 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/zutil.c
@@ -1,5 +1,5 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010, 2011 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -85,31 +85,11 @@ uLong ZEXPORT zlibCompileFlags()
#ifdef FASTEST
flags += 1L << 21;
#endif
-#ifdef STDC
-# ifdef NO_vsnprintf
- flags += 1L << 25;
-# ifdef HAS_vsprintf_void
- flags += 1L << 26;
-# endif
-# else
-# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
-# endif
-# endif
+#ifdef Z_SOLO
+ return flags;
#else
- 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
+ return flags + gzflags();
#endif
- return flags;
}
#ifdef DEBUG
@@ -119,8 +99,8 @@ uLong ZEXPORT zlibCompileFlags()
# endif
int ZLIB_INTERNAL z_verbose = verbose;
-void ZLIB_INTERNAL z_error (
- char *m)
+void ZLIB_INTERNAL z_error (m)
+ char *m;
{
fprintf(stderr, "%s\n", m);
exit(1);
@@ -130,8 +110,8 @@ void ZLIB_INTERNAL z_error (
/* exported to allow conversion of error code to string for compress() and
* uncompress()
*/
-const char * ZEXPORT zError(
- int err)
+const char * ZEXPORT zError(err)
+ int err;
{
return ERR_MSG(err);
}
@@ -146,10 +126,10 @@ const char * ZEXPORT zError(
#ifndef HAVE_MEMCPY
-void ZLIB_INTERNAL zmemcpy(
- Bytef* dest,
- const Bytef* source,
- uInt len)
+void ZLIB_INTERNAL zmemcpy(dest, source, len)
+ Bytef* dest;
+ const Bytef* source;
+ uInt len;
{
if (len == 0) return;
do {
@@ -157,10 +137,10 @@ void ZLIB_INTERNAL zmemcpy(
} while (--len != 0);
}
-int ZLIB_INTERNAL zmemcmp(
- const Bytef* s1,
- const Bytef* s2,
- uInt len)
+int ZLIB_INTERNAL zmemcmp(s1, s2, len)
+ const Bytef* s1;
+ const Bytef* s2;
+ uInt len;
{
uInt j;
@@ -170,9 +150,9 @@ int ZLIB_INTERNAL zmemcmp(
return 0;
}
-void ZLIB_INTERNAL zmemzero(
- Bytef* dest,
- uInt len)
+void ZLIB_INTERNAL zmemzero(dest, len)
+ Bytef* dest;
+ uInt len;
{
if (len == 0) return;
do {
@@ -181,6 +161,7 @@ void ZLIB_INTERNAL zmemzero(
}
#endif
+#ifndef Z_SOLO
#ifdef SYS16BIT
@@ -297,22 +278,24 @@ extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr));
#endif
-voidpf ZLIB_INTERNAL zcalloc (
- voidpf opaque,
- unsigned items,
- unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
+ voidpf opaque;
+ unsigned items;
+ unsigned size;
{
if (opaque) items += size - size; /* make compiler happy */
return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
(voidpf)calloc(items, size);
}
-void ZLIB_INTERNAL zcfree (
- voidpf opaque,
- voidpf ptr)
+void ZLIB_INTERNAL zcfree (opaque, ptr)
+ voidpf opaque;
+ voidpf ptr;
{
free(ptr);
if (opaque) return; /* make compiler happy */
}
#endif /* MY_ZCALLOC */
+
+#endif /* !Z_SOLO */