xref: /titanic_50/usr/src/uts/common/zmod/zconf.h (revision c9431fa1e59a88c2f0abf611f25b97af964449e5)
17c478bd9Sstevel@tonic-gate /*
2a0b85df4Sstevel  * CDDL HEADER START
3a0b85df4Sstevel  *
4a0b85df4Sstevel  * The contents of this file are subject to the terms of the
5*c9431fa1Sahl  * Common Development and Distribution License (the "License").
6*c9431fa1Sahl  * You may not use this file except in compliance with the License.
7a0b85df4Sstevel  *
8a0b85df4Sstevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a0b85df4Sstevel  * or http://www.opensolaris.org/os/licensing.
10a0b85df4Sstevel  * See the License for the specific language governing permissions
11a0b85df4Sstevel  * and limitations under the License.
12a0b85df4Sstevel  *
13a0b85df4Sstevel  * When distributing Covered Code, include this CDDL HEADER in each
14a0b85df4Sstevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a0b85df4Sstevel  * If applicable, add the following below this CDDL HEADER, with the
16a0b85df4Sstevel  * fields enclosed by brackets "[]" replaced with your own identifying
17a0b85df4Sstevel  * information: Portions Copyright [yyyy] [name of copyright owner]
18a0b85df4Sstevel  *
19a0b85df4Sstevel  * CDDL HEADER END
20a0b85df4Sstevel  */
21a0b85df4Sstevel 
22a0b85df4Sstevel /*
23*c9431fa1Sahl  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	_ZCONF_H
287c478bd9Sstevel@tonic-gate #define	_ZCONF_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
317c478bd9Sstevel@tonic-gate 
32*c9431fa1Sahl #include <sys/param.h>
33*c9431fa1Sahl #include <sys/systm.h>
347c478bd9Sstevel@tonic-gate #include <sys/types.h>
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
377c478bd9Sstevel@tonic-gate extern "C" {
387c478bd9Sstevel@tonic-gate #endif
397c478bd9Sstevel@tonic-gate 
40*c9431fa1Sahl /*
41*c9431fa1Sahl  * We don't want to turn on zlib's debugging.
42*c9431fa1Sahl  */
43*c9431fa1Sahl #undef DEBUG
44*c9431fa1Sahl 
45*c9431fa1Sahl /*
46*c9431fa1Sahl  * We define our own memory allocation and deallocation routines that use kmem.
47*c9431fa1Sahl  */
48*c9431fa1Sahl #define	MY_ZCALLOC
49*c9431fa1Sahl 
50*c9431fa1Sahl /*
51*c9431fa1Sahl  * We don't define HAVE_MEMCPY here, but do in zutil.c, and implement our
52*c9431fa1Sahl  * our versions of zmemcpy(), zmemzero(), and zmemcmp().
53*c9431fa1Sahl  */
54*c9431fa1Sahl 
55*c9431fa1Sahl /*
56*c9431fa1Sahl  * We have a sufficiently capable compiler as to not need zlib's compiler hack.
57*c9431fa1Sahl  */
58*c9431fa1Sahl #define	NO_DUMMY_DECL
59*c9431fa1Sahl 
60*c9431fa1Sahl #define	compressBound(len)	(len + (len >> 12) + (len >> 14) + 11)
61*c9431fa1Sahl 
627c478bd9Sstevel@tonic-gate #define	z_off_t	off_t
637c478bd9Sstevel@tonic-gate #define	OF(p)	p
647c478bd9Sstevel@tonic-gate #define	ZEXTERN	extern
657c478bd9Sstevel@tonic-gate #define	ZEXPORT
667c478bd9Sstevel@tonic-gate #define	ZEXPORTVA
677c478bd9Sstevel@tonic-gate #define	FAR
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate #define	deflateInit_		z_deflateInit_
707c478bd9Sstevel@tonic-gate #define	deflate			z_deflate
717c478bd9Sstevel@tonic-gate #define	deflateEnd		z_deflateEnd
727c478bd9Sstevel@tonic-gate #define	inflateInit_		z_inflateInit_
737c478bd9Sstevel@tonic-gate #define	inflate			z_inflate
747c478bd9Sstevel@tonic-gate #define	inflateEnd		z_inflateEnd
757c478bd9Sstevel@tonic-gate #define	deflateInit2_		z_deflateInit2_
767c478bd9Sstevel@tonic-gate #define	deflateSetDictionary	z_deflateSetDictionary
777c478bd9Sstevel@tonic-gate #define	deflateCopy		z_deflateCopy
787c478bd9Sstevel@tonic-gate #define	deflateReset		z_deflateReset
797c478bd9Sstevel@tonic-gate #define	deflateParams		z_deflateParams
80*c9431fa1Sahl #define	deflateBound		z_deflateBound
81*c9431fa1Sahl #define	deflatePrime		z_deflatePrime
827c478bd9Sstevel@tonic-gate #define	inflateInit2_		z_inflateInit2_
837c478bd9Sstevel@tonic-gate #define	inflateSetDictionary	z_inflateSetDictionary
847c478bd9Sstevel@tonic-gate #define	inflateSync		z_inflateSync
857c478bd9Sstevel@tonic-gate #define	inflateSyncPoint	z_inflateSyncPoint
86*c9431fa1Sahl #define	inflateCopy		z_inflateCopy
877c478bd9Sstevel@tonic-gate #define	inflateReset		z_inflateReset
88*c9431fa1Sahl #define	inflateBack		z_inflateBack
89*c9431fa1Sahl #define	inflateBackEnd		z_inflateBackEnd
90*c9431fa1Sahl #define	compress		zz_compress
91*c9431fa1Sahl #define	compress2		zz_compress2
92*c9431fa1Sahl #define	uncompress		zz_uncompress
937c478bd9Sstevel@tonic-gate #define	adler32			z_adler32
947c478bd9Sstevel@tonic-gate #define	crc32			z_crc32
957c478bd9Sstevel@tonic-gate #define	get_crc_table		z_get_crc_table
96*c9431fa1Sahl #define	zError			z_zError
977c478bd9Sstevel@tonic-gate 
987c478bd9Sstevel@tonic-gate #define	MAX_MEM_LEVEL	9
997c478bd9Sstevel@tonic-gate #define	MAX_WBITS	15
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate typedef unsigned char Byte;
1027c478bd9Sstevel@tonic-gate typedef unsigned int uInt;
1037c478bd9Sstevel@tonic-gate typedef unsigned long uLong;
1047c478bd9Sstevel@tonic-gate typedef Byte Bytef;
1057c478bd9Sstevel@tonic-gate typedef char charf;
1067c478bd9Sstevel@tonic-gate typedef int intf;
1077c478bd9Sstevel@tonic-gate typedef uInt uIntf;
1087c478bd9Sstevel@tonic-gate typedef uLong uLongf;
109*c9431fa1Sahl typedef void *voidpc;
1107c478bd9Sstevel@tonic-gate typedef void *voidpf;
1117c478bd9Sstevel@tonic-gate typedef void *voidp;
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1147c478bd9Sstevel@tonic-gate }
1157c478bd9Sstevel@tonic-gate #endif
1167c478bd9Sstevel@tonic-gate 
1177c478bd9Sstevel@tonic-gate #endif	/* _ZCONF_H */
118