aboutsummaryrefslogtreecommitdiff
path: root/zutil.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:49 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:49 -0700
commitd004b047838a7e803818b4973a2e39e0ff8c1fa2 (patch)
tree9e8c804f78d73152c70d4ff24c6a7531a0d46782 /zutil.h
parentf6194ef39af5864f792412460c354cc339dde7d1 (diff)
downloadzlib-d004b047838a7e803818b4973a2e39e0ff8c1fa2.tar.gz
zlib-d004b047838a7e803818b4973a2e39e0ff8c1fa2.tar.bz2
zlib-d004b047838a7e803818b4973a2e39e0ff8c1fa2.zip
zlib 1.2.3.5v1.2.3.5
Diffstat (limited to 'zutil.h')
-rw-r--r--zutil.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/zutil.h b/zutil.h
index bccc581..18a13cf 100644
--- a/zutil.h
+++ b/zutil.h
@@ -1,5 +1,5 @@
1/* zutil.h -- internal interface and configuration of the compression library 1/* zutil.h -- internal interface and configuration of the compression library
2 * Copyright (C) 1995-2006 Jean-loup Gailly. 2 * Copyright (C) 1995-2010 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
@@ -17,24 +17,24 @@
17#include "zlib.h" 17#include "zlib.h"
18 18
19#ifdef STDC 19#ifdef STDC
20# ifndef _WIN32_WCE 20# if !(defined(_WIN32_WCE) && defined(_MSV_VER))
21# include <stddef.h> 21# include <stddef.h>
22# endif 22# endif
23# include <string.h> 23# include <string.h>
24# include <stdlib.h> 24# include <stdlib.h>
25#endif 25#endif
26#if defined(NO_ERRNO_H) || defined(_WIN32_WCE) 26
27# ifdef _WIN32_WCE 27#if defined(UNDER_CE) && defined(NO_ERRNO_H)
28 /* The Microsoft C Run-Time Library for Windows CE doesn't have 28# define zseterrno(ERR) SetLastError((DWORD)(ERR))
29 * errno. We define it as a global variable to simplify porting. 29# define zerrno() ((int)GetLastError())
30 * Its value is always 0 and should not be used. We rename it to
31 * avoid conflict with other libraries that use the same workaround.
32 */
33# define errno z_errno
34# endif
35 extern int errno;
36#else 30#else
37# include <errno.h> 31# ifdef NO_ERRNO_H
32 extern int errno;
33# else
34# include <errno.h>
35# endif
36# define zseterrno(ERR) do { errno = (ERR); } while (0)
37# define zerrno() errno
38#endif 38#endif
39 39
40#ifndef local 40#ifndef local
@@ -87,7 +87,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
87#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) 87#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
88# define OS_CODE 0x00 88# define OS_CODE 0x00
89# if defined(__TURBOC__) || defined(__BORLANDC__) 89# if defined(__TURBOC__) || defined(__BORLANDC__)
90# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) 90# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
91 /* Allow compilation with ANSI keywords only enabled */ 91 /* Allow compilation with ANSI keywords only enabled */
92 void _Cdecl farfree( void *block ); 92 void _Cdecl farfree( void *block );
93 void *_Cdecl farmalloc( unsigned long nbytes ); 93 void *_Cdecl farmalloc( unsigned long nbytes );
@@ -213,7 +213,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
213# ifdef WIN32 213# ifdef WIN32
214 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ 214 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
215# if !defined(vsnprintf) && !defined(NO_vsnprintf) 215# if !defined(vsnprintf) && !defined(NO_vsnprintf)
216# define vsnprintf _vsnprintf 216# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
217# define vsnprintf _vsnprintf
218# endif
217# endif 219# endif
218# endif 220# endif
219# ifdef __SASC 221# ifdef __SASC