"Fossies" - the Fresh Open Source Software Archive

Member "zsync-0.6.2/zlib/zconf.h" (16 Sep 2010, 8882 Bytes) of package /linux/privat/old/zsync-0.6.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "zconf.h" see the Fossies "Dox" file reference documentation.

    1 /* zconf.h -- configuration of the zlib compression library
    2  * Copyright (C) 1995-2003 Jean-loup Gailly.
    3  * For conditions of distribution and use, see copyright notice in zlib.h
    4  */
    5 
    6 /* @(#) $Id$ */
    7 
    8 #ifndef ZCONF_H
    9 #define ZCONF_H
   10 
   11 /*
   12  * If you *really* need a unique prefix for all types and library functions,
   13  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
   14  */
   15 #ifdef Z_PREFIX
   16 #  define deflateInit_  z_deflateInit_
   17 #  define deflate       z_deflate
   18 #  define deflateEnd    z_deflateEnd
   19 #  define inflateInit_  z_inflateInit_
   20 #  define inflate       z_inflate
   21 #  define inflateEnd    z_inflateEnd
   22 #  define deflateInit2_ z_deflateInit2_
   23 #  define deflateSetDictionary z_deflateSetDictionary
   24 #  define deflateCopy   z_deflateCopy
   25 #  define deflateReset  z_deflateReset
   26 #  define deflatePrime  z_deflatePrime
   27 #  define deflateParams z_deflateParams
   28 #  define deflateBound  z_deflateBound
   29 #  define inflateInit2_ z_inflateInit2_
   30 #  define inflateSetDictionary z_inflateSetDictionary
   31 #  define inflateSync   z_inflateSync
   32 #  define inflateSyncPoint z_inflateSyncPoint
   33 #  define inflateCopy   z_inflateCopy
   34 #  define inflateReset  z_inflateReset
   35 #  define compress      z_compress
   36 #  define compress2     z_compress2
   37 #  define compressBound z_compressBound
   38 #  define uncompress    z_uncompress
   39 #  define adler32       z_adler32
   40 #  define crc32         z_crc32
   41 #  define get_crc_table z_get_crc_table
   42 
   43 #  define Byte          z_Byte
   44 #  define uInt          z_uInt
   45 #  define uLong         z_uLong
   46 #  define Bytef         z_Bytef
   47 #  define charf         z_charf
   48 #  define intf          z_intf
   49 #  define uIntf         z_uIntf
   50 #  define uLongf        z_uLongf
   51 #  define voidpf        z_voidpf
   52 #  define voidp         z_voidp
   53 #endif
   54 
   55 #if defined(__MSDOS__) && !defined(MSDOS)
   56 #  define MSDOS
   57 #endif
   58 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
   59 #  define OS2
   60 #endif
   61 #if defined(_WINDOWS) && !defined(WINDOWS)
   62 #  define WINDOWS
   63 #endif
   64 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
   65 #  define WIN32
   66 #endif
   67 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
   68 #  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
   69 #    ifndef SYS16BIT
   70 #      define SYS16BIT
   71 #    endif
   72 #  endif
   73 #endif
   74 
   75 /*
   76  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
   77  * than 64k bytes at a time (needed on systems with 16-bit int).
   78  */
   79 #ifdef SYS16BIT
   80 #  define MAXSEG_64K
   81 #endif
   82 #ifdef MSDOS
   83 #  define UNALIGNED_OK
   84 #endif
   85 
   86 #ifdef __STDC_VERSION__
   87 #  ifndef STDC
   88 #    define STDC
   89 #  endif
   90 #  if __STDC_VERSION__ >= 199901L
   91 #    ifndef STDC99
   92 #      define STDC99
   93 #    endif
   94 #  endif
   95 #endif
   96 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
   97 #  define STDC
   98 #endif
   99 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
  100 #  define STDC
  101 #endif
  102 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
  103 #  define STDC
  104 #endif
  105 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
  106 #  define STDC
  107 #endif
  108 
  109 #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
  110 #  define STDC
  111 #endif
  112 
  113 #ifndef STDC
  114 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
  115 #    define const       /* note: need a more gentle solution here */
  116 #  endif
  117 #endif
  118 
  119 /* Some Mac compilers merge all .h files incorrectly: */
  120 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
  121 #  define NO_DUMMY_DECL
  122 #endif
  123 
  124 /* Maximum value for memLevel in deflateInit2 */
  125 #ifndef MAX_MEM_LEVEL
  126 #  ifdef MAXSEG_64K
  127 #    define MAX_MEM_LEVEL 8
  128 #  else
  129 #    define MAX_MEM_LEVEL 9
  130 #  endif
  131 #endif
  132 
  133 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
  134  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  135  * created by gzip. (Files created by minigzip can still be extracted by
  136  * gzip.)
  137  */
  138 #ifndef MAX_WBITS
  139 #  define MAX_WBITS   15 /* 32K LZ77 window */
  140 #endif
  141 
  142 /* The memory requirements for deflate are (in bytes):
  143             (1 << (windowBits+2)) +  (1 << (memLevel+9))
  144  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  145  plus a few kilobytes for small objects. For example, if you want to reduce
  146  the default memory requirements from 256K to 128K, compile with
  147      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  148  Of course this will generally degrade compression (there's no free lunch).
  149 
  150    The memory requirements for inflate are (in bytes) 1 << windowBits
  151  that is, 32K for windowBits=15 (default value) plus a few kilobytes
  152  for small objects.
  153 */
  154 
  155                         /* Type declarations */
  156 
  157 #ifndef OF /* function prototypes */
  158 #  ifdef STDC
  159 #    define OF(args)  args
  160 #  else
  161 #    define OF(args)  ()
  162 #  endif
  163 #endif
  164 
  165 /* The following definitions for FAR are needed only for MSDOS mixed
  166  * model programming (small or medium model with some far allocations).
  167  * This was tested only with MSC; for other MSDOS compilers you may have
  168  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
  169  * just define FAR to be empty.
  170  */
  171 #ifdef SYS16BIT
  172 #  if defined(M_I86SM) || defined(M_I86MM)
  173      /* MSC small or medium model */
  174 #    define SMALL_MEDIUM
  175 #    ifdef _MSC_VER
  176 #      define FAR _far
  177 #    else
  178 #      define FAR far
  179 #    endif
  180 #  endif
  181 #  if (defined(__SMALL__) || defined(__MEDIUM__))
  182      /* Turbo C small or medium model */
  183 #    define SMALL_MEDIUM
  184 #    ifdef __BORLANDC__
  185 #      define FAR _far
  186 #    else
  187 #      define FAR far
  188 #    endif
  189 #  endif
  190 #endif
  191 
  192 #if defined(WINDOWS) || defined(WIN32)
  193    /* If building or using zlib as a DLL, define ZLIB_DLL.
  194     * This is not mandatory, but it offers a little performance increase.
  195     */
  196 #  ifdef ZLIB_DLL
  197 #    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
  198 #      ifdef ZLIB_INTERNAL
  199 #        define ZEXTERN extern __declspec(dllexport)
  200 #      else
  201 #        define ZEXTERN extern __declspec(dllimport)
  202 #      endif
  203 #    endif
  204 #  endif  /* ZLIB_DLL */
  205    /* If building or using zlib with the WINAPI/WINAPIV calling convention,
  206     * define ZLIB_WINAPI.
  207     * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
  208     */
  209 #  ifdef ZLIB_WINAPI
  210 #    ifdef FAR
  211 #      undef FAR
  212 #    endif
  213 #    include <windows.h>
  214      /* No need for _export, use ZLIB.DEF instead. */
  215      /* For complete Windows compatibility, use WINAPI, not __stdcall. */
  216 #    define ZEXPORT WINAPI
  217 #    ifdef WIN32
  218 #      define ZEXPORTVA WINAPIV
  219 #    else
  220 #      define ZEXPORTVA FAR CDECL
  221 #    endif
  222 #  endif
  223 #endif
  224 
  225 #if defined (__BEOS__)
  226 #  ifdef ZLIB_DLL
  227 #    ifdef ZLIB_INTERNAL
  228 #      define ZEXPORT   __declspec(dllexport)
  229 #      define ZEXPORTVA __declspec(dllexport)
  230 #    else
  231 #      define ZEXPORT   __declspec(dllimport)
  232 #      define ZEXPORTVA __declspec(dllimport)
  233 #    endif
  234 #  endif
  235 #endif
  236 
  237 #ifndef ZEXTERN
  238 #  define ZEXTERN extern
  239 #endif
  240 #ifndef ZEXPORT
  241 #  define ZEXPORT
  242 #endif
  243 #ifndef ZEXPORTVA
  244 #  define ZEXPORTVA
  245 #endif
  246 
  247 #ifndef FAR
  248 #  define FAR
  249 #endif
  250 
  251 #if !defined(__MACTYPES__)
  252 typedef unsigned char  Byte;  /* 8 bits */
  253 #endif
  254 typedef unsigned int   uInt;  /* 16 bits or more */
  255 typedef unsigned long  uLong; /* 32 bits or more */
  256 
  257 #ifdef SMALL_MEDIUM
  258    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  259 #  define Bytef Byte FAR
  260 #else
  261    typedef Byte  FAR Bytef;
  262 #endif
  263 typedef char  FAR charf;
  264 typedef int   FAR intf;
  265 typedef uInt  FAR uIntf;
  266 typedef uLong FAR uLongf;
  267 
  268 #ifdef STDC
  269    typedef void const *voidpc;
  270    typedef void FAR   *voidpf;
  271    typedef void       *voidp;
  272 #else
  273    typedef Byte const *voidpc;
  274    typedef Byte FAR   *voidpf;
  275    typedef Byte       *voidp;
  276 #endif
  277 
  278 #if 1           /* HAVE_UNISTD_H -- this line is updated by ./configure */
  279 #  include <sys/types.h> /* for off_t */
  280 #  ifdef VMS
  281 #    include <unixio.h>   /* for off_t */
  282 #  endif
  283 #  define z_off_t  off_t
  284 #endif
  285 #ifndef SEEK_SET
  286 #  define SEEK_SET        0       /* Seek from beginning of file.  */
  287 #  define SEEK_CUR        1       /* Seek from current position.  */
  288 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
  289 #endif
  290 #ifndef z_off_t
  291 #  define  z_off_t long
  292 #endif
  293 
  294 #if defined(__OS400__)
  295 #define NO_vsnprintf
  296 #endif
  297 
  298 #if defined(__MVS__)
  299 #  define NO_vsnprintf
  300 #  ifdef FAR
  301 #    undef FAR
  302 #  endif
  303 #endif
  304 
  305 /* MVS linker does not support external names larger than 8 bytes */
  306 #if defined(__MVS__)
  307 #   pragma map(deflateInit_,"DEIN")
  308 #   pragma map(deflateInit2_,"DEIN2")
  309 #   pragma map(deflateEnd,"DEEND")
  310 #   pragma map(deflateBound,"DEBND")
  311 #   pragma map(inflateInit_,"ININ")
  312 #   pragma map(inflateInit2_,"ININ2")
  313 #   pragma map(inflateEnd,"INEND")
  314 #   pragma map(inflateSync,"INSY")
  315 #   pragma map(inflateSetDictionary,"INSEDI")
  316 #   pragma map(compressBound,"CMBND")
  317 #   pragma map(inflate_table,"INTABL")
  318 #   pragma map(inflate_fast,"INFA")
  319 #   pragma map(inflate_copyright,"INCOPY")
  320 #endif
  321 
  322 #endif /* ZCONF_H */