152419Sjulian/*
252419Sjulian * CDDL HEADER START
352419Sjulian *
452419Sjulian * The contents of this file are subject to the terms of the
552419Sjulian * Common Development and Distribution License (the "License").
652419Sjulian * You may not use this file except in compliance with the License.
770784Sjulian *
852419Sjulian * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
952419Sjulian * or http://www.opensolaris.org/os/licensing.
1052419Sjulian * See the License for the specific language governing permissions
1152419Sjulian * and limitations under the License.
1252419Sjulian *
1352419Sjulian * When distributing Covered Code, include this CDDL HEADER in each
1452419Sjulian * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1552419Sjulian * If applicable, add the following below this CDDL HEADER, with the
1652419Sjulian * fields enclosed by brackets "[]" replaced with your own identifying
1752419Sjulian * information: Portions Copyright [yyyy] [name of copyright owner]
1870784Sjulian *
1952419Sjulian * CDDL HEADER END
2052419Sjulian */
2152419Sjulian
2252419Sjulian/*
2352419Sjulian * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2452419Sjulian * Use is subject to license terms.
2552419Sjulian */
2652419Sjulian
2752419Sjulian#ifndef	_ZCONF_H
2852419Sjulian#define	_ZCONF_H
2952419Sjulian
3052419Sjulian#pragma ident	"%Z%%M%	%I%	%E% SMI"
3152419Sjulian
3252419Sjulian#include <sys/param.h>
3352419Sjulian#include <sys/systm.h>
3452419Sjulian#include <sys/types.h>
3552419Sjulian
3652419Sjulian#ifdef	__cplusplus
3767506Sjulianextern "C" {
3852419Sjulian#endif
3952419Sjulian
4052752Sjulian/*
4152419Sjulian * We don't want to turn on zlib's debugging.
4252419Sjulian */
4352419Sjulian#undef DEBUG
4452419Sjulian
4552419Sjulian/*
4652419Sjulian * We define our own memory allocation and deallocation routines that use kmem.
4752419Sjulian */
4852419Sjulian#define	MY_ZCALLOC
4952419Sjulian
5052419Sjulian/*
5152419Sjulian * We don't define HAVE_MEMCPY here, but do in zutil.c, and implement our
5252419Sjulian * our versions of zmemcpy(), zmemzero(), and zmemcmp().
5352419Sjulian */
5452419Sjulian
5552419Sjulian/*
5652419Sjulian * We have a sufficiently capable compiler as to not need zlib's compiler hack.
5752419Sjulian */
5852419Sjulian#define	NO_DUMMY_DECL
5952419Sjulian
6052419Sjulian#define	compressBound(len)	(len + (len >> 12) + (len >> 14) + 11)
6152419Sjulian
6252419Sjulian#define	z_off_t	off_t
6352419Sjulian#define	OF(p)	p
6452419Sjulian#define	ZEXTERN	extern
6552419Sjulian#define	ZEXPORT
6652419Sjulian#define	ZEXPORTVA
6752419Sjulian#define	FAR
6852419Sjulian
6952919Sjulian#define	deflateInit_		z_deflateInit_
7052419Sjulian#define	deflate			z_deflate
7152419Sjulian#define	deflateEnd		z_deflateEnd
7270870Sjulian#define	inflateInit_		z_inflateInit_
7370870Sjulian#define	inflate			z_inflate
7470870Sjulian#define	inflateEnd		z_inflateEnd
7570870Sjulian#define	deflateInit2_		z_deflateInit2_
7670870Sjulian#define	deflateSetDictionary	z_deflateSetDictionary
7770870Sjulian#define	deflateCopy		z_deflateCopy
7870870Sjulian#define	deflateReset		z_deflateReset
7970870Sjulian#define	deflateParams		z_deflateParams
8052419Sjulian#define	deflateBound		z_deflateBound
8152419Sjulian#define	deflatePrime		z_deflatePrime
8252419Sjulian#define	inflateInit2_		z_inflateInit2_
8352419Sjulian#define	inflateSetDictionary	z_inflateSetDictionary
8452419Sjulian#define	inflateSync		z_inflateSync
8552419Sjulian#define	inflateSyncPoint	z_inflateSyncPoint
8652419Sjulian#define	inflateCopy		z_inflateCopy
8752419Sjulian#define	inflateReset		z_inflateReset
8852419Sjulian#define	inflateBack		z_inflateBack
8952419Sjulian#define	inflateBackEnd		z_inflateBackEnd
9052419Sjulian#define	compress		zz_compress
9152419Sjulian#define	compress2		zz_compress2
9252419Sjulian#define	uncompress		zz_uncompress
9352419Sjulian#define	adler32			z_adler32
9452419Sjulian#define	crc32			z_crc32
9552419Sjulian#define	get_crc_table		z_get_crc_table
9652419Sjulian#define	zError			z_zError
9752419Sjulian
9852419Sjulian#define	MAX_MEM_LEVEL	9
9952419Sjulian#define	MAX_WBITS	15
10052419Sjulian
10152419Sjuliantypedef unsigned char Byte;
10252419Sjuliantypedef unsigned int uInt;
10352419Sjuliantypedef unsigned long uLong;
10452419Sjuliantypedef Byte Bytef;
10552419Sjuliantypedef char charf;
10652419Sjuliantypedef int intf;
10752752Sjuliantypedef uInt uIntf;
10852752Sjuliantypedef uLong uLongf;
10970700Sjuliantypedef void *voidpc;
11052752Sjuliantypedef void *voidpf;
11172053Sjuliantypedef void *voidp;
11252752Sjulian
11352885Sjulian#ifdef	__cplusplus
11452419Sjulian}
11552419Sjulian#endif
11652419Sjulian
11752419Sjulian#endif	/* _ZCONF_H */
11852419Sjulian