Annotation of embedaddon/sudo/zlib/zconf.h.in, revision 1.1.1.2

1.1       misho       1: /* zconf.h -- configuration of the zlib compression library
1.1.1.2 ! misho       2:  * Copyright (C) 1995-2011 Jean-loup Gailly.
1.1       misho       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: /* The following four defines are enabled by sudo's configure script. */
                     12: #undef HAVE_UNISTD_H
                     13: #undef HAVE_VSNPRINTF
                     14: #undef HAVE_MEMCPY
                     15: #undef _FILE_OFFSET_BITS
1.1.1.2 ! misho      16: #undef _LARGE_FILES  
1.1       misho      17: #undef const
                     18: 
                     19: /*
                     20:  * If you *really* need a unique prefix for all types and library functions,
                     21:  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
                     22:  * Even better than compiling with -DZ_PREFIX would be to use configure to set
                     23:  * this permanently in zconf.h using "./configure --zprefix".
                     24:  */
                     25: #ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
1.1.1.2 ! misho      26: #  define Z_PREFIX_SET
1.1       misho      27: 
                     28: /* all linked symbols */
                     29: #  define _dist_code            z__dist_code
                     30: #  define _length_code          z__length_code
                     31: #  define _tr_align             z__tr_align
                     32: #  define _tr_flush_block       z__tr_flush_block
                     33: #  define _tr_init              z__tr_init
                     34: #  define _tr_stored_block      z__tr_stored_block
                     35: #  define _tr_tally             z__tr_tally
                     36: #  define adler32               z_adler32
                     37: #  define adler32_combine       z_adler32_combine
                     38: #  define adler32_combine64     z_adler32_combine64
1.1.1.2 ! misho      39: #  ifndef Z_SOLO
        !            40: #    define compress              z_compress
        !            41: #    define compress2             z_compress2
        !            42: #    define compressBound         z_compressBound
        !            43: #  endif
1.1       misho      44: #  define crc32                 z_crc32
                     45: #  define crc32_combine         z_crc32_combine
                     46: #  define crc32_combine64       z_crc32_combine64
                     47: #  define deflate               z_deflate
                     48: #  define deflateBound          z_deflateBound
                     49: #  define deflateCopy           z_deflateCopy
                     50: #  define deflateEnd            z_deflateEnd
                     51: #  define deflateInit2_         z_deflateInit2_
                     52: #  define deflateInit_          z_deflateInit_
                     53: #  define deflateParams         z_deflateParams
1.1.1.2 ! misho      54: #  define deflatePending        z_deflatePending
1.1       misho      55: #  define deflatePrime          z_deflatePrime
                     56: #  define deflateReset          z_deflateReset
1.1.1.2 ! misho      57: #  define deflateResetKeep      z_deflateResetKeep
1.1       misho      58: #  define deflateSetDictionary  z_deflateSetDictionary
                     59: #  define deflateSetHeader      z_deflateSetHeader
                     60: #  define deflateTune           z_deflateTune
                     61: #  define deflate_copyright     z_deflate_copyright
                     62: #  define get_crc_table         z_get_crc_table
1.1.1.2 ! misho      63: #  ifndef Z_SOLO
        !            64: #    define gz_error              z_gz_error
        !            65: #    define gz_intmax             z_gz_intmax
        !            66: #    define gz_strwinerror        z_gz_strwinerror
        !            67: #    define gzbuffer              z_gzbuffer
        !            68: #    define gzclearerr            z_gzclearerr
        !            69: #    define gzclose               z_gzclose
        !            70: #    define gzclose_r             z_gzclose_r
        !            71: #    define gzclose_w             z_gzclose_w
        !            72: #    define gzdirect              z_gzdirect
        !            73: #    define gzdopen               z_gzdopen
        !            74: #    define gzeof                 z_gzeof
        !            75: #    define gzerror               z_gzerror
        !            76: #    define gzflags               z_gzflags
        !            77: #    define gzflush               z_gzflush
        !            78: #    define gzgetc                z_gzgetc
        !            79: #    define gzgetc_               z_gzgetc_
        !            80: #    define gzgets                z_gzgets
        !            81: #    define gzoffset              z_gzoffset
        !            82: #    define gzoffset64            z_gzoffset64
        !            83: #    define gzopen                z_gzopen
        !            84: #    define gzopen64              z_gzopen64
        !            85: #    define gzprintf              z_gzprintf
        !            86: #    define gzputc                z_gzputc
        !            87: #    define gzputs                z_gzputs
        !            88: #    define gzread                z_gzread
        !            89: #    define gzrewind              z_gzrewind
        !            90: #    define gzseek                z_gzseek
        !            91: #    define gzseek64              z_gzseek64
        !            92: #    define gzsetparams           z_gzsetparams
        !            93: #    define gztell                z_gztell
        !            94: #    define gztell64              z_gztell64
        !            95: #    define gzungetc              z_gzungetc
        !            96: #    define gzwrite               z_gzwrite
        !            97: #  endif
1.1       misho      98: #  define inflate               z_inflate
                     99: #  define inflateBack           z_inflateBack
                    100: #  define inflateBackEnd        z_inflateBackEnd
                    101: #  define inflateBackInit_      z_inflateBackInit_
                    102: #  define inflateCopy           z_inflateCopy
                    103: #  define inflateEnd            z_inflateEnd
                    104: #  define inflateGetHeader      z_inflateGetHeader
                    105: #  define inflateInit2_         z_inflateInit2_
                    106: #  define inflateInit_          z_inflateInit_
                    107: #  define inflateMark           z_inflateMark
                    108: #  define inflatePrime          z_inflatePrime
                    109: #  define inflateReset          z_inflateReset
                    110: #  define inflateReset2         z_inflateReset2
                    111: #  define inflateSetDictionary  z_inflateSetDictionary
                    112: #  define inflateSync           z_inflateSync
                    113: #  define inflateSyncPoint      z_inflateSyncPoint
                    114: #  define inflateUndermine      z_inflateUndermine
1.1.1.2 ! misho     115: #  define inflateResetKeep      z_inflateResetKeep
1.1       misho     116: #  define inflate_copyright     z_inflate_copyright
                    117: #  define inflate_fast          z_inflate_fast
                    118: #  define inflate_table         z_inflate_table
1.1.1.2 ! misho     119: #  ifndef Z_SOLO
        !           120: #    define uncompress            z_uncompress
        !           121: #  endif
1.1       misho     122: #  define zError                z_zError
1.1.1.2 ! misho     123: #  ifndef Z_SOLO
        !           124: #    define zcalloc               z_zcalloc
        !           125: #    define zcfree                z_zcfree
        !           126: #  endif
1.1       misho     127: #  define zlibCompileFlags      z_zlibCompileFlags
                    128: #  define zlibVersion           z_zlibVersion
                    129: 
                    130: /* all zlib typedefs in zlib.h and zconf.h */
                    131: #  define Byte                  z_Byte
                    132: #  define Bytef                 z_Bytef
                    133: #  define alloc_func            z_alloc_func
                    134: #  define charf                 z_charf
                    135: #  define free_func             z_free_func
1.1.1.2 ! misho     136: #  ifndef Z_SOLO
        !           137: #    define gzFile                z_gzFile
        !           138: #    define gz_header             z_gz_header
        !           139: #    define gz_headerp            z_gz_headerp
        !           140: #  endif
1.1       misho     141: #  define in_func               z_in_func
                    142: #  define intf                  z_intf
                    143: #  define out_func              z_out_func
                    144: #  define uInt                  z_uInt
                    145: #  define uIntf                 z_uIntf
                    146: #  define uLong                 z_uLong
                    147: #  define uLongf                z_uLongf
                    148: #  define voidp                 z_voidp
                    149: #  define voidpc                z_voidpc
                    150: #  define voidpf                z_voidpf
                    151: 
                    152: /* all zlib structs in zlib.h and zconf.h */
1.1.1.2 ! misho     153: #  ifndef Z_SOLO
        !           154: #    define gz_header_s           z_gz_header_s
        !           155: #  endif
1.1       misho     156: #  define internal_state        z_internal_state
                    157: 
                    158: #endif
                    159: 
                    160: #if defined(__MSDOS__) && !defined(MSDOS)
                    161: #  define MSDOS
                    162: #endif
                    163: #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
                    164: #  define OS2
                    165: #endif
                    166: #if defined(_WINDOWS) && !defined(WINDOWS)
                    167: #  define WINDOWS
                    168: #endif
                    169: #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
                    170: #  ifndef WIN32
                    171: #    define WIN32
                    172: #  endif
                    173: #endif
                    174: #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
                    175: #  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
                    176: #    ifndef SYS16BIT
                    177: #      define SYS16BIT
                    178: #    endif
                    179: #  endif
                    180: #endif
                    181: 
                    182: /*
                    183:  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
                    184:  * than 64k bytes at a time (needed on systems with 16-bit int).
                    185:  */
                    186: #ifdef SYS16BIT
                    187: #  define MAXSEG_64K
                    188: #endif
                    189: #ifdef MSDOS
                    190: #  define UNALIGNED_OK
                    191: #endif
                    192: 
                    193: #ifdef __STDC_VERSION__
                    194: #  ifndef STDC
                    195: #    define STDC
                    196: #  endif
                    197: #  if __STDC_VERSION__ >= 199901L
                    198: #    ifndef STDC99
                    199: #      define STDC99
                    200: #    endif
                    201: #  endif
                    202: #endif
                    203: #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
                    204: #  define STDC
                    205: #endif
                    206: #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
                    207: #  define STDC
                    208: #endif
                    209: #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
                    210: #  define STDC
                    211: #endif
                    212: #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
                    213: #  define STDC
                    214: #endif
                    215: 
                    216: #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
                    217: #  define STDC
                    218: #endif
                    219: 
                    220: #ifndef STDC
                    221: #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
                    222: #    define const       /* note: need a more gentle solution here */
                    223: #  endif
                    224: #endif
                    225: 
1.1.1.2 ! misho     226: #if defined(ZLIB_CONST) && !defined(z_const)
        !           227: #  define z_const const
        !           228: #else
        !           229: #  define z_const
        !           230: #endif
        !           231: 
1.1       misho     232: /* Some Mac compilers merge all .h files incorrectly: */
                    233: #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
                    234: #  define NO_DUMMY_DECL
                    235: #endif
                    236: 
                    237: /* Maximum value for memLevel in deflateInit2 */
                    238: #ifndef MAX_MEM_LEVEL
                    239: #  ifdef MAXSEG_64K
                    240: #    define MAX_MEM_LEVEL 8
                    241: #  else
                    242: #    define MAX_MEM_LEVEL 9
                    243: #  endif
                    244: #endif
                    245: 
                    246: /* Maximum value for windowBits in deflateInit2 and inflateInit2.
                    247:  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
                    248:  * created by gzip. (Files created by minigzip can still be extracted by
                    249:  * gzip.)
                    250:  */
                    251: #ifndef MAX_WBITS
                    252: #  define MAX_WBITS   15 /* 32K LZ77 window */
                    253: #endif
                    254: 
                    255: /* The memory requirements for deflate are (in bytes):
                    256:             (1 << (windowBits+2)) +  (1 << (memLevel+9))
                    257:  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
                    258:  plus a few kilobytes for small objects. For example, if you want to reduce
                    259:  the default memory requirements from 256K to 128K, compile with
                    260:      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
                    261:  Of course this will generally degrade compression (there's no free lunch).
                    262: 
                    263:    The memory requirements for inflate are (in bytes) 1 << windowBits
                    264:  that is, 32K for windowBits=15 (default value) plus a few kilobytes
                    265:  for small objects.
                    266: */
                    267: 
                    268:                         /* Type declarations */
                    269: 
                    270: #ifndef OF /* function prototypes */
                    271: #  ifdef STDC
                    272: #    define OF(args)  args
                    273: #  else
                    274: #    define OF(args)  ()
                    275: #  endif
                    276: #endif
                    277: 
1.1.1.2 ! misho     278: #ifndef Z_ARG /* function prototypes for stdarg */
        !           279: #  if defined(STDC) || defined(Z_HAVE_STDARG_H)
        !           280: #    define Z_ARG(args)  args
        !           281: #  else
        !           282: #    define Z_ARG(args)  ()
        !           283: #  endif
        !           284: #endif
        !           285: 
1.1       misho     286: /* The following definitions for FAR are needed only for MSDOS mixed
                    287:  * model programming (small or medium model with some far allocations).
                    288:  * This was tested only with MSC; for other MSDOS compilers you may have
                    289:  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
                    290:  * just define FAR to be empty.
                    291:  */
                    292: #ifdef SYS16BIT
                    293: #  if defined(M_I86SM) || defined(M_I86MM)
                    294:      /* MSC small or medium model */
                    295: #    define SMALL_MEDIUM
                    296: #    ifdef _MSC_VER
                    297: #      define FAR _far
                    298: #    else
                    299: #      define FAR far
                    300: #    endif
                    301: #  endif
                    302: #  if (defined(__SMALL__) || defined(__MEDIUM__))
                    303:      /* Turbo C small or medium model */
                    304: #    define SMALL_MEDIUM
                    305: #    ifdef __BORLANDC__
                    306: #      define FAR _far
                    307: #    else
                    308: #      define FAR far
                    309: #    endif
                    310: #  endif
                    311: #endif
                    312: 
                    313: #if defined(WINDOWS) || defined(WIN32)
                    314:    /* If building or using zlib as a DLL, define ZLIB_DLL.
                    315:     * This is not mandatory, but it offers a little performance increase.
                    316:     */
                    317: #  ifdef ZLIB_DLL
                    318: #    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
                    319: #      ifdef ZLIB_INTERNAL
                    320: #        define ZEXTERN extern __declspec(dllexport)
                    321: #      else
                    322: #        define ZEXTERN extern __declspec(dllimport)
                    323: #      endif
                    324: #    endif
                    325: #  endif  /* ZLIB_DLL */
                    326:    /* If building or using zlib with the WINAPI/WINAPIV calling convention,
                    327:     * define ZLIB_WINAPI.
                    328:     * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
                    329:     */
                    330: #  ifdef ZLIB_WINAPI
                    331: #    ifdef FAR
                    332: #      undef FAR
                    333: #    endif
                    334: #    include <windows.h>
                    335:      /* No need for _export, use ZLIB.DEF instead. */
                    336:      /* For complete Windows compatibility, use WINAPI, not __stdcall. */
                    337: #    define ZEXPORT WINAPI
                    338: #    ifdef WIN32
                    339: #      define ZEXPORTVA WINAPIV
                    340: #    else
                    341: #      define ZEXPORTVA FAR CDECL
                    342: #    endif
                    343: #  endif
                    344: #endif
                    345: 
                    346: #if defined (__BEOS__)
                    347: #  ifdef ZLIB_DLL
                    348: #    ifdef ZLIB_INTERNAL
                    349: #      define ZEXPORT   __declspec(dllexport)
                    350: #      define ZEXPORTVA __declspec(dllexport)
                    351: #    else
                    352: #      define ZEXPORT   __declspec(dllimport)
                    353: #      define ZEXPORTVA __declspec(dllimport)
                    354: #    endif
                    355: #  endif
                    356: #endif
                    357: 
                    358: #ifndef ZEXTERN
                    359: #  define ZEXTERN extern
                    360: #endif
                    361: #ifndef ZEXPORT
                    362: #  define ZEXPORT
                    363: #endif
                    364: #ifndef ZEXPORTVA
                    365: #  define ZEXPORTVA
                    366: #endif
                    367: 
                    368: #ifndef FAR
                    369: #  define FAR
                    370: #endif
                    371: 
                    372: #if !defined(__MACTYPES__)
                    373: typedef unsigned char  Byte;  /* 8 bits */
                    374: #endif
                    375: typedef unsigned int   uInt;  /* 16 bits or more */
                    376: typedef unsigned long  uLong; /* 32 bits or more */
                    377: 
                    378: #ifdef SMALL_MEDIUM
                    379:    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
                    380: #  define Bytef Byte FAR
                    381: #else
                    382:    typedef Byte  FAR Bytef;
                    383: #endif
                    384: typedef char  FAR charf;
                    385: typedef int   FAR intf;
                    386: typedef uInt  FAR uIntf;
                    387: typedef uLong FAR uLongf;
                    388: 
                    389: #ifdef STDC
                    390:    typedef void const *voidpc;
                    391:    typedef void FAR   *voidpf;
                    392:    typedef void       *voidp;
                    393: #else
                    394:    typedef Byte const *voidpc;
                    395:    typedef Byte FAR   *voidpf;
                    396:    typedef Byte       *voidp;
                    397: #endif
                    398: 
                    399: #ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
                    400: #  define Z_HAVE_UNISTD_H
                    401: #endif
                    402: 
1.1.1.2 ! misho     403: #ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
        !           404: #  define Z_HAVE_STDARG_H
        !           405: #endif
        !           406: 
1.1       misho     407: #ifdef STDC
1.1.1.2 ! misho     408: #  ifndef Z_SOLO
        !           409: #    include <sys/types.h>      /* for off_t */
        !           410: #  endif
1.1       misho     411: #endif
                    412: 
                    413: /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
                    414:  * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
                    415:  * though the former does not conform to the LFS document), but considering
                    416:  * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
                    417:  * equivalently requesting no 64-bit operations
                    418:  */
                    419: #if -_LARGEFILE64_SOURCE - -1 == 1
                    420: #  undef _LARGEFILE64_SOURCE
                    421: #endif
                    422: 
1.1.1.2 ! misho     423: #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
        !           424: #  define Z_LARGE
        !           425: #endif
        !           426: 
        !           427: #if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE)) && !defined(Z_SOLO)
1.1       misho     428: #  include <unistd.h>       /* for SEEK_* and off_t */
                    429: #  ifdef VMS
                    430: #    include <unixio.h>     /* for off_t */
                    431: #  endif
                    432: #  ifndef z_off_t
                    433: #    define z_off_t off_t
                    434: #  endif
                    435: #endif
                    436: 
1.1.1.2 ! misho     437: #if !defined(SEEK_SET) && !defined(Z_SOLO)
1.1       misho     438: #  define SEEK_SET        0       /* Seek from beginning of file.  */
                    439: #  define SEEK_CUR        1       /* Seek from current position.  */
                    440: #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
                    441: #endif
                    442: 
                    443: #ifndef z_off_t
                    444: #  define z_off_t long
                    445: #endif
                    446: 
1.1.1.2 ! misho     447: #if !defined(_WIN32) && (defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0)
1.1       misho     448: #  define z_off64_t off64_t
                    449: #else
1.1.1.2 ! misho     450: #  if defined(_WIN32)
        !           451: #    define z_off64_t __int64
        !           452: #  else
1.1       misho     453: #  define z_off64_t z_off_t
                    454: #endif
                    455: #endif
                    456: 
                    457: /* MVS linker does not support external names larger than 8 bytes */
                    458: #if defined(__MVS__)
                    459:   #pragma map(deflateInit_,"DEIN")
                    460:   #pragma map(deflateInit2_,"DEIN2")
                    461:   #pragma map(deflateEnd,"DEEND")
                    462:   #pragma map(deflateBound,"DEBND")
                    463:   #pragma map(inflateInit_,"ININ")
                    464:   #pragma map(inflateInit2_,"ININ2")
                    465:   #pragma map(inflateEnd,"INEND")
                    466:   #pragma map(inflateSync,"INSY")
                    467:   #pragma map(inflateSetDictionary,"INSEDI")
                    468:   #pragma map(compressBound,"CMBND")
                    469:   #pragma map(inflate_table,"INTABL")
                    470:   #pragma map(inflate_fast,"INFA")
                    471:   #pragma map(inflate_copyright,"INCOPY")
                    472: #endif
                    473: 
                    474: #endif /* ZCONF_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>