zconf.h
Go to the documentation of this file.
00001 /* zconf.h -- configuration of the zlib compression library
00002  * Copyright (C) 1995-2005 Jean-loup Gailly.
00003  * For conditions of distribution and use, see copyright notice in zlib.h
00004  */
00005 
00006 /* @(#) $Id$ */
00007 
00008 #ifndef ZCONF_H
00009 #define ZCONF_H
00010 
00011 
00012 /* BEGIN -- OpenNURBS Modification 
00013 //          OpenNURBS requires zlib to be compiled
00014 //          with -DZ_PREFIX and -DMY_ZCALLOC.  While
00015 //          this was done in the makefiles shipped
00016 //          with OpenNURBS, it still generated too
00017 //          many technical support questions.  So,
00018 //          we've modified the zlib source in this
00019 //          one spot and added these preprocessor
00020 //          defines.
00021 */
00022 #if !defined(Z_PREFIX)
00023 /* decorates zlib functions with a "z_" prefix to prevent symbol collision. */
00024 #define Z_PREFIX
00025 #endif
00026 
00027 #if !defined(MY_ZCALLOC)
00028 /* have zlib use oncalloc() and onfree() for memory managment*/
00029 #define MY_ZCALLOC
00030 #endif
00031 /* END - OpenNURBS Modification */
00032 
00033 
00034 /*
00035  * If you *really* need a unique prefix for all types and library functions,
00036  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
00037  */
00038 #ifdef Z_PREFIX
00039 #  define deflateInit_          z_deflateInit_
00040 #  define deflate               z_deflate
00041 #  define deflateEnd            z_deflateEnd
00042 #  define inflateInit_          z_inflateInit_
00043 #  define inflate               z_inflate
00044 #  define inflateEnd            z_inflateEnd
00045 #  define deflateInit2_         z_deflateInit2_
00046 #  define deflateSetDictionary  z_deflateSetDictionary
00047 #  define deflateCopy           z_deflateCopy
00048 #  define deflateReset          z_deflateReset
00049 #  define deflateParams         z_deflateParams
00050 #  define deflateBound          z_deflateBound
00051 #  define deflatePrime          z_deflatePrime
00052 #  define inflateInit2_         z_inflateInit2_
00053 #  define inflateSetDictionary  z_inflateSetDictionary
00054 #  define inflateSync           z_inflateSync
00055 #  define inflateSyncPoint      z_inflateSyncPoint
00056 #  define inflateCopy           z_inflateCopy
00057 #  define inflateReset          z_inflateReset
00058 #  define inflateBack           z_inflateBack
00059 #  define inflateBackEnd        z_inflateBackEnd
00060 #  define compress              z_compress
00061 #  define compress2             z_compress2
00062 #  define compressBound         z_compressBound
00063 #  define uncompress            z_uncompress
00064 #  define adler32               z_adler32
00065 #  define crc32                 z_crc32
00066 #  define get_crc_table         z_get_crc_table
00067 #  define zError                z_zError
00068 
00069 #  define alloc_func            z_alloc_func
00070 #  define free_func             z_free_func
00071 #  define in_func               z_in_func
00072 #  define out_func              z_out_func
00073 #  define Byte                  z_Byte
00074 #  define uInt                  z_uInt
00075 #  define uLong                 z_uLong
00076 #  define Bytef                 z_Bytef
00077 #  define charf                 z_charf
00078 #  define intf                  z_intf
00079 #  define uIntf                 z_uIntf
00080 #  define uLongf                z_uLongf
00081 #  define voidpf                z_voidpf
00082 #  define voidp                 z_voidp
00083 #endif
00084 
00085 #if defined(__MSDOS__) && !defined(MSDOS)
00086 #  define MSDOS
00087 #endif
00088 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
00089 #  define OS2
00090 #endif
00091 #if defined(_WINDOWS) && !defined(WINDOWS)
00092 #  define WINDOWS
00093 #endif
00094 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
00095 #if !defined(WIN64)
00096 #  ifndef WIN32
00097 #    define WIN32
00098 #  endif
00099 #endif
00100 #endif
00101 #if defined(_WIN64) || defined(_WIN64_WCE) || defined(__WIN64__)
00102 #  ifndef WIN64
00103 #    define WIN64
00104 #  endif
00105 #endif
00106 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) && !defined(WIN64)
00107 #  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
00108 #    ifndef SYS16BIT
00109 #      define SYS16BIT
00110 #    endif
00111 #  endif
00112 #endif
00113 
00114 /*
00115  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
00116  * than 64k bytes at a time (needed on systems with 16-bit int).
00117  */
00118 #ifdef SYS16BIT
00119 #  define MAXSEG_64K
00120 #endif
00121 #ifdef MSDOS
00122 #  define UNALIGNED_OK
00123 #endif
00124 
00125 #ifdef __STDC_VERSION__
00126 #  ifndef STDC
00127 #    define STDC
00128 #  endif
00129 #  if __STDC_VERSION__ >= 199901L
00130 #    ifndef STDC99
00131 #      define STDC99
00132 #    endif
00133 #  endif
00134 #endif
00135 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
00136 #  define STDC
00137 #endif
00138 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
00139 #  define STDC
00140 #endif
00141 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(WIN64))
00142 #  define STDC
00143 #endif
00144 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
00145 #  define STDC
00146 #endif
00147 
00148 #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
00149 #  define STDC
00150 #endif
00151 
00152 #ifndef STDC
00153 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
00154 #    define const       /* note: need a more gentle solution here */
00155 #  endif
00156 #endif
00157 
00158 /* Some Mac compilers merge all .h files incorrectly: */
00159 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
00160 #  define NO_DUMMY_DECL
00161 #endif
00162 
00163 /* Maximum value for memLevel in deflateInit2 */
00164 #ifndef MAX_MEM_LEVEL
00165 #  ifdef MAXSEG_64K
00166 #    define MAX_MEM_LEVEL 8
00167 #  else
00168 #    define MAX_MEM_LEVEL 9
00169 #  endif
00170 #endif
00171 
00172 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
00173  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
00174  * created by gzip. (Files created by minigzip can still be extracted by
00175  * gzip.)
00176  */
00177 #ifndef MAX_WBITS
00178 #  define MAX_WBITS   15 /* 32K LZ77 window */
00179 #endif
00180 
00181 /* The memory requirements for deflate are (in bytes):
00182             (1 << (windowBits+2)) +  (1 << (memLevel+9))
00183  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
00184  plus a few kilobytes for small objects. For example, if you want to reduce
00185  the default memory requirements from 256K to 128K, compile with
00186      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
00187  Of course this will generally degrade compression (there's no free lunch).
00188 
00189    The memory requirements for inflate are (in bytes) 1 << windowBits
00190  that is, 32K for windowBits=15 (default value) plus a few kilobytes
00191  for small objects.
00192 */
00193 
00194                         /* Type declarations */
00195 
00196 #ifndef OF /* function prototypes */
00197 #  ifdef STDC
00198 #    define OF(args)  args
00199 #  else
00200 #    define OF(args)  ()
00201 #  endif
00202 #endif
00203 
00204 /* The following definitions for FAR are needed only for MSDOS mixed
00205  * model programming (small or medium model with some far allocations).
00206  * This was tested only with MSC; for other MSDOS compilers you may have
00207  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
00208  * just define FAR to be empty.
00209  */
00210 #ifdef SYS16BIT
00211 #  if defined(M_I86SM) || defined(M_I86MM)
00212      /* MSC small or medium model */
00213 #    define SMALL_MEDIUM
00214 #    ifdef _MSC_VER
00215 #      define FAR _far
00216 #    else
00217 #      define FAR far
00218 #    endif
00219 #  endif
00220 #  if (defined(__SMALL__) || defined(__MEDIUM__))
00221      /* Turbo C small or medium model */
00222 #    define SMALL_MEDIUM
00223 #    ifdef __BORLANDC__
00224 #      define FAR _far
00225 #    else
00226 #      define FAR far
00227 #    endif
00228 #  endif
00229 #endif
00230 
00231 #if defined(WINDOWS) || defined(WIN32) || defined(WIN64)
00232    /* If building or using zlib as a DLL, define ZLIB_DLL.
00233     * This is not mandatory, but it offers a little performance increase.
00234     */
00235 #  ifdef ZLIB_DLL
00236 #    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
00237 #      ifdef ZLIB_INTERNAL
00238 #        define ZEXTERN extern __declspec(dllexport)
00239 #      else
00240 #        define ZEXTERN extern __declspec(dllimport)
00241 #      endif
00242 #    endif
00243 #  endif  /* ZLIB_DLL */
00244    /* If building or using zlib with the WINAPI/WINAPIV calling convention,
00245     * define ZLIB_WINAPI.
00246     * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
00247     */
00248 #  ifdef ZLIB_WINAPI
00249 #    ifdef FAR
00250 #      undef FAR
00251 #    endif
00252 #    include <windows.h>
00253      /* No need for _export, use ZLIB.DEF instead. */
00254      /* For complete Windows compatibility, use WINAPI, not __stdcall. */
00255 #    define ZEXPORT WINAPI
00256 #    ifdef WIN32
00257 #      define ZEXPORTVA WINAPIV
00258 #    else
00259 #      define ZEXPORTVA FAR CDECL
00260 #    endif
00261 #  endif
00262 #endif
00263 
00264 #if defined (__BEOS__)
00265 #  ifdef ZLIB_DLL
00266 #    ifdef ZLIB_INTERNAL
00267 #      define ZEXPORT   __declspec(dllexport)
00268 #      define ZEXPORTVA __declspec(dllexport)
00269 #    else
00270 #      define ZEXPORT   __declspec(dllimport)
00271 #      define ZEXPORTVA __declspec(dllimport)
00272 #    endif
00273 #  endif
00274 #endif
00275 
00276 #ifndef ZEXTERN
00277 #  define ZEXTERN extern
00278 #endif
00279 #ifndef ZEXPORT
00280 #  define ZEXPORT
00281 #endif
00282 #ifndef ZEXPORTVA
00283 #  define ZEXPORTVA
00284 #endif
00285 
00286 #ifndef FAR
00287 #  define FAR
00288 #endif
00289 
00290 #if !defined(__MACTYPES__)
00291 typedef unsigned char  Byte;  /* 8 bits */
00292 #endif
00293 typedef unsigned int   uInt;  /* 16 bits or more */
00294 typedef unsigned int  uLong; /* 32 bits or more */
00295 
00296 #ifdef SMALL_MEDIUM
00297    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
00298 #  define Bytef Byte FAR
00299 #else
00300    typedef Byte  FAR Bytef;
00301 #endif
00302 typedef char  FAR charf;
00303 typedef int   FAR intf;
00304 typedef uInt  FAR uIntf;
00305 typedef uLong FAR uLongf;
00306 
00307 #ifdef STDC
00308    typedef void const *voidpc;
00309    typedef void FAR   *voidpf;
00310    typedef void       *voidp;
00311 #else
00312    typedef Byte const *voidpc;
00313    typedef Byte FAR   *voidpf;
00314    typedef Byte       *voidp;
00315 #endif
00316 
00317 #if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
00318 #  include <sys/types.h> /* for off_t */
00319 #  include <unistd.h>    /* for SEEK_* and off_t */
00320 #  ifdef VMS
00321 #    include <unixio.h>   /* for off_t */
00322 #  endif
00323 #  define z_off_t off_t
00324 #endif
00325 #ifndef SEEK_SET
00326 #  define SEEK_SET        0       /* Seek from beginning of file.  */
00327 #  define SEEK_CUR        1       /* Seek from current position.  */
00328 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
00329 #endif
00330 #ifndef z_off_t
00331 #  define z_off_t int
00332 #endif
00333 
00334 #if defined(__OS400__)
00335 #  define NO_vsnprintf
00336 #endif
00337 
00338 #if defined(__MVS__)
00339 #  define NO_vsnprintf
00340 #  ifdef FAR
00341 #    undef FAR
00342 #  endif
00343 #endif
00344 
00345 /* MVS linker does not support external names larger than 8 bytes */
00346 #if defined(__MVS__)
00347 #   pragma map(deflateInit_,"DEIN")
00348 #   pragma map(deflateInit2_,"DEIN2")
00349 #   pragma map(deflateEnd,"DEEND")
00350 #   pragma map(deflateBound,"DEBND")
00351 #   pragma map(inflateInit_,"ININ")
00352 #   pragma map(inflateInit2_,"ININ2")
00353 #   pragma map(inflateEnd,"INEND")
00354 #   pragma map(inflateSync,"INSY")
00355 #   pragma map(inflateSetDictionary,"INSEDI")
00356 #   pragma map(compressBound,"CMBND")
00357 #   pragma map(inflate_table,"INTABL")
00358 #   pragma map(inflate_fast,"INFA")
00359 #   pragma map(inflate_copyright,"INCOPY")
00360 #endif
00361 
00362 #endif /* ZCONF_H */


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:38:43