]> git.lizzy.rs Git - zlib.git/blob - zconf.h
4e05a3e5af46cd5c307d650720b05b795af5bf27
[zlib.git] / zconf.h
1 /* zconf.h -- configuration of the zlib compression library
2  * Copyright (C) 1995 Jean-loup Gailly.
3  * For conditions of distribution and use, see copyright notice in zlib.h 
4  */
5
6 /* $Id: zconf.h,v 1.10 1995/04/30 19:27:14 jloup Exp $ */
7
8 #ifndef _ZCONF_H
9 #define _ZCONF_H
10
11 /*
12      The library does not install any signal handler. It is recommended to
13   add at least a handler for SIGSEGV when decompressing; the library checks
14   the consistency of the input data whenever possible but may go nuts
15   for some forms of corrupted input.
16  */
17
18 /*
19  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
20  * than 64k bytes at a time (needed on systems with 16-bit int).
21  */
22 #if defined(_GNUC__) && !defined(__32BIT__)
23 #  define __32BIT__
24 #endif
25 #if defined(__MSDOS__) && !defined(MSDOS)
26 #  define MSDOS
27 #endif
28 #if defined(MSDOS) && !defined(__32BIT__)
29 #  define MAXSEG_64K
30 #endif
31 #if !defined(STDC) && (defined(MSDOS) || defined(__STDC__))
32 #  define STDC
33 #endif
34
35 #ifndef MAX_MEM_LEVEL
36 #  ifdef MAXSEG_64K
37 #    define MAX_MEM_LEVEL 8
38 #  else
39 #    define MAX_MEM_LEVEL 9
40 #  endif
41 #endif
42
43 #ifndef MAX_WBITS
44 #  define MAX_WBITS   15 /* 32K LZ77 window */
45 #endif
46
47                         /* Type declarations */
48
49 #ifndef __P /* function prototypes */
50 #  ifdef STDC
51 #    define __P(args)  args
52 #  else
53 #    define __P(args)  ()
54 #  endif
55 #endif
56
57 #ifndef Byte
58   typedef unsigned char  Byte;  /* 8 bits */
59 #endif
60 #ifndef uInt
61   typedef unsigned int   uInt;  /* 16 bits or more */
62 #endif
63 #ifndef uLong
64   typedef unsigned long  uLong; /* 32 bits or more */
65 #endif
66 #ifndef voidp
67 #  ifdef STDC
68      typedef void *voidp;
69 #  else
70      typedef Byte *voidp;
71 #  endif
72 #endif
73
74 #endif /* _ZCONF_H */
75