1168404Spjd/*
2168404Spjd * CDDL HEADER START
3168404Spjd *
4168404Spjd * The contents of this file are subject to the terms of the
5168404Spjd * Common Development and Distribution License (the "License").
6168404Spjd * You may not use this file except in compliance with the License.
7168404Spjd *
8168404Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9168404Spjd * or http://www.opensolaris.org/os/licensing.
10168404Spjd * See the License for the specific language governing permissions
11168404Spjd * and limitations under the License.
12168404Spjd *
13168404Spjd * When distributing Covered Code, include this CDDL HEADER in each
14168404Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15168404Spjd * If applicable, add the following below this CDDL HEADER, with the
16168404Spjd * fields enclosed by brackets "[]" replaced with your own identifying
17168404Spjd * information: Portions Copyright [yyyy] [name of copyright owner]
18168404Spjd *
19168404Spjd * CDDL HEADER END
20168404Spjd */
21168404Spjd
22168404Spjd/*
23168404Spjd * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24168404Spjd * Use is subject to license terms.
25168404Spjd */
26168404Spjd
27168404Spjd#ifndef	_ZCONF_H
28168404Spjd#define	_ZCONF_H
29168404Spjd
30168404Spjd#pragma ident	"%Z%%M%	%I%	%E% SMI"
31168404Spjd
32168404Spjd#include <sys/param.h>
33168404Spjd#include <sys/systm.h>
34168404Spjd#include <sys/types.h>
35168404Spjd
36168404Spjd#ifdef	__cplusplus
37168404Spjdextern "C" {
38168404Spjd#endif
39168404Spjd
40168404Spjd/*
41168404Spjd * We don't want to turn on zlib's debugging.
42168404Spjd */
43168404Spjd#undef DEBUG
44168404Spjd
45168404Spjd/*
46168404Spjd * We define our own memory allocation and deallocation routines that use kmem.
47168404Spjd */
48168404Spjd#define	MY_ZCALLOC
49168404Spjd
50168404Spjd/*
51168404Spjd * We don't define HAVE_MEMCPY here, but do in zutil.c, and implement our
52168404Spjd * our versions of zmemcpy(), zmemzero(), and zmemcmp().
53168404Spjd */
54168404Spjd
55168404Spjd/*
56168404Spjd * We have a sufficiently capable compiler as to not need zlib's compiler hack.
57168404Spjd */
58168404Spjd#define	NO_DUMMY_DECL
59168404Spjd
60168404Spjd#define	compressBound(len)	(len + (len >> 12) + (len >> 14) + 11)
61168404Spjd
62168404Spjd#define	z_off_t	off_t
63168404Spjd#define	OF(p)	p
64168404Spjd#define	ZEXTERN	extern
65168404Spjd#define	ZEXPORT
66168404Spjd#define	ZEXPORTVA
67168404Spjd#define	FAR
68168404Spjd
69168404Spjd#define	deflateInit_		z_deflateInit_
70168404Spjd#define	deflate			z_deflate
71168404Spjd#define	deflateEnd		z_deflateEnd
72168404Spjd#define	inflateInit_		z_inflateInit_
73168404Spjd#define	inflate			z_inflate
74168404Spjd#define	inflateEnd		z_inflateEnd
75168404Spjd#define	deflateInit2_		z_deflateInit2_
76168404Spjd#define	deflateSetDictionary	z_deflateSetDictionary
77168404Spjd#define	deflateCopy		z_deflateCopy
78168404Spjd#define	deflateReset		z_deflateReset
79168404Spjd#define	deflateParams		z_deflateParams
80168404Spjd#define	deflateBound		z_deflateBound
81168404Spjd#define	deflatePrime		z_deflatePrime
82168404Spjd#define	inflateInit2_		z_inflateInit2_
83168404Spjd#define	inflateSetDictionary	z_inflateSetDictionary
84168404Spjd#define	inflateSync		z_inflateSync
85168404Spjd#define	inflateSyncPoint	z_inflateSyncPoint
86168404Spjd#define	inflateCopy		z_inflateCopy
87168404Spjd#define	inflateReset		z_inflateReset
88168404Spjd#define	inflateBack		z_inflateBack
89168404Spjd#define	inflateBackEnd		z_inflateBackEnd
90168404Spjd#define	compress		zz_compress
91168404Spjd#define	compress2		zz_compress2
92168404Spjd#define	uncompress		zz_uncompress
93168404Spjd#define	adler32			z_adler32
94168404Spjd#define	crc32			z_crc32
95168404Spjd#define	get_crc_table		z_get_crc_table
96168404Spjd#define	zError			z_zError
97168404Spjd
98168404Spjd#define	MAX_MEM_LEVEL	9
99168404Spjd#define	MAX_WBITS	15
100168404Spjd
101168404Spjdtypedef unsigned char Byte;
102168404Spjdtypedef unsigned int uInt;
103168404Spjdtypedef unsigned long uLong;
104168404Spjdtypedef Byte Bytef;
105168404Spjdtypedef char charf;
106168404Spjdtypedef int intf;
107168404Spjdtypedef uInt uIntf;
108168404Spjdtypedef uLong uLongf;
109168404Spjdtypedef void *voidpc;
110168404Spjdtypedef void *voidpf;
111168404Spjdtypedef void *voidp;
112168404Spjd
113168404Spjd#ifdef	__cplusplus
114168404Spjd}
115168404Spjd#endif
116168404Spjd
117168404Spjd#endif	/* _ZCONF_H */
118