< prev index next >

src/java.base/share/native/libzip/zlib/zconf.h

Print this page

  6  * published by the Free Software Foundation.  Oracle designates this
  7  * particular file as subject to the "Classpath" exception as provided
  8  * by Oracle in the LICENSE file that accompanied this code.
  9  *
 10  * This code is distributed in the hope that it will be useful, but WITHOUT
 11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 13  * version 2 for more details (a copy is included in the LICENSE file that
 14  * accompanied this code).
 15  *
 16  * You should have received a copy of the GNU General Public License version
 17  * 2 along with this work; if not, write to the Free Software Foundation,
 18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.
 23  */
 24 
 25 /* zconf.h -- configuration of the zlib compression library
 26  * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
 27  * For conditions of distribution and use, see copyright notice in zlib.h
 28  */
 29 
 30 /* @(#) $Id$ */
 31 
 32 #ifndef ZCONF_H
 33 #define ZCONF_H
 34 
 35 /*
 36  * If you *really* need a unique prefix for all types and library functions,
 37  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
 38  * Even better than compiling with -DZ_PREFIX would be to use configure to set
 39  * this permanently in zconf.h using "./configure --zprefix".
 40  */
 41 #ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
 42 #  define Z_PREFIX_SET
 43 
 44 /* all linked symbols and init macros */
 45 #  define _dist_code            z__dist_code
 46 #  define _length_code          z__length_code

248 #  define STDC
249 #endif
250 
251 #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
252 #  define STDC
253 #endif
254 
255 #ifndef STDC
256 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
257 #    define const       /* note: need a more gentle solution here */
258 #  endif
259 #endif
260 
261 #if defined(ZLIB_CONST) && !defined(z_const)
262 #  define z_const const
263 #else
264 #  define z_const
265 #endif
266 
267 #ifdef Z_SOLO
268    typedef unsigned long z_size_t;




269 #else
270 #  define z_longlong long long
271 #  if defined(NO_SIZE_T)
272      typedef unsigned NO_SIZE_T z_size_t;
273 #  elif defined(STDC)
274 #    include <stddef.h>
275      typedef size_t z_size_t;
276 #  else
277      typedef unsigned long z_size_t;
278 #  endif
279 #  undef z_longlong
280 #endif
281 
282 /* Maximum value for memLevel in deflateInit2 */
283 #ifndef MAX_MEM_LEVEL
284 #  ifdef MAXSEG_64K
285 #    define MAX_MEM_LEVEL 8
286 #  else
287 #    define MAX_MEM_LEVEL 9
288 #  endif

303  plus a few kilobytes for small objects. For example, if you want to reduce
304  the default memory requirements from 256K to 128K, compile with
305      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
306  Of course this will generally degrade compression (there's no free lunch).
307 
308    The memory requirements for inflate are (in bytes) 1 << windowBits
309  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
310  for small objects.
311 */
312 
313                         /* Type declarations */
314 
315 #ifndef OF /* function prototypes */
316 #  ifdef STDC
317 #    define OF(args)  args
318 #  else
319 #    define OF(args)  ()
320 #  endif
321 #endif
322 
323 #ifndef Z_ARG /* function prototypes for stdarg */
324 #  if defined(STDC) || defined(Z_HAVE_STDARG_H)
325 #    define Z_ARG(args)  args
326 #  else
327 #    define Z_ARG(args)  ()
328 #  endif
329 #endif
330 
331 /* The following definitions for FAR are needed only for MSDOS mixed
332  * model programming (small or medium model with some far allocations).
333  * This was tested only with MSC; for other MSDOS compilers you may have
334  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
335  * just define FAR to be empty.
336  */
337 #ifdef SYS16BIT
338 #  if defined(M_I86SM) || defined(M_I86MM)
339      /* MSC small or medium model */
340 #    define SMALL_MEDIUM
341 #    ifdef _MSC_VER
342 #      define FAR _far
343 #    else
344 #      define FAR far
345 #    endif
346 #  endif
347 #  if (defined(__SMALL__) || defined(__MEDIUM__))
348      /* Turbo C small or medium model */
349 #    define SMALL_MEDIUM
350 #    ifdef __BORLANDC__

527 #  define Z_LARGE64
528 #endif
529 
530 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
531 #  define Z_WANT64
532 #endif
533 
534 #if !defined(SEEK_SET) && !defined(Z_SOLO)
535 #  define SEEK_SET        0       /* Seek from beginning of file.  */
536 #  define SEEK_CUR        1       /* Seek from current position.  */
537 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
538 #endif
539 
540 #ifndef z_off_t
541 #  define z_off_t long
542 #endif
543 
544 #if !defined(_WIN32) && defined(Z_LARGE64)
545 #  define z_off64_t off64_t
546 #else
547 #  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
548 #    define z_off64_t __int64
549 #  else
550 #    define z_off64_t z_off_t
551 #  endif
552 #endif
553 
554 /* MVS linker does not support external names larger than 8 bytes */
555 #if defined(__MVS__)
556   #pragma map(deflateInit_,"DEIN")
557   #pragma map(deflateInit2_,"DEIN2")
558   #pragma map(deflateEnd,"DEEND")
559   #pragma map(deflateBound,"DEBND")
560   #pragma map(inflateInit_,"ININ")
561   #pragma map(inflateInit2_,"ININ2")
562   #pragma map(inflateEnd,"INEND")
563   #pragma map(inflateSync,"INSY")
564   #pragma map(inflateSetDictionary,"INSEDI")
565   #pragma map(compressBound,"CMBND")
566   #pragma map(inflate_table,"INTABL")
567   #pragma map(inflate_fast,"INFA")

  6  * published by the Free Software Foundation.  Oracle designates this
  7  * particular file as subject to the "Classpath" exception as provided
  8  * by Oracle in the LICENSE file that accompanied this code.
  9  *
 10  * This code is distributed in the hope that it will be useful, but WITHOUT
 11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 13  * version 2 for more details (a copy is included in the LICENSE file that
 14  * accompanied this code).
 15  *
 16  * You should have received a copy of the GNU General Public License version
 17  * 2 along with this work; if not, write to the Free Software Foundation,
 18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.
 23  */
 24 
 25 /* zconf.h -- configuration of the zlib compression library
 26  * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
 27  * For conditions of distribution and use, see copyright notice in zlib.h
 28  */
 29 
 30 /* @(#) $Id$ */
 31 
 32 #ifndef ZCONF_H
 33 #define ZCONF_H
 34 
 35 /*
 36  * If you *really* need a unique prefix for all types and library functions,
 37  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
 38  * Even better than compiling with -DZ_PREFIX would be to use configure to set
 39  * this permanently in zconf.h using "./configure --zprefix".
 40  */
 41 #ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
 42 #  define Z_PREFIX_SET
 43 
 44 /* all linked symbols and init macros */
 45 #  define _dist_code            z__dist_code
 46 #  define _length_code          z__length_code

248 #  define STDC
249 #endif
250 
251 #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
252 #  define STDC
253 #endif
254 
255 #ifndef STDC
256 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
257 #    define const       /* note: need a more gentle solution here */
258 #  endif
259 #endif
260 
261 #if defined(ZLIB_CONST) && !defined(z_const)
262 #  define z_const const
263 #else
264 #  define z_const
265 #endif
266 
267 #ifdef Z_SOLO
268 #  ifdef _WIN64
269      typedef unsigned long long z_size_t;
270 #  else
271      typedef unsigned long z_size_t;
272 #  endif
273 #else
274 #  define z_longlong long long
275 #  if defined(NO_SIZE_T)
276      typedef unsigned NO_SIZE_T z_size_t;
277 #  elif defined(STDC)
278 #    include <stddef.h>
279      typedef size_t z_size_t;
280 #  else
281      typedef unsigned long z_size_t;
282 #  endif
283 #  undef z_longlong
284 #endif
285 
286 /* Maximum value for memLevel in deflateInit2 */
287 #ifndef MAX_MEM_LEVEL
288 #  ifdef MAXSEG_64K
289 #    define MAX_MEM_LEVEL 8
290 #  else
291 #    define MAX_MEM_LEVEL 9
292 #  endif

307  plus a few kilobytes for small objects. For example, if you want to reduce
308  the default memory requirements from 256K to 128K, compile with
309      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
310  Of course this will generally degrade compression (there's no free lunch).
311 
312    The memory requirements for inflate are (in bytes) 1 << windowBits
313  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
314  for small objects.
315 */
316 
317                         /* Type declarations */
318 
319 #ifndef OF /* function prototypes */
320 #  ifdef STDC
321 #    define OF(args)  args
322 #  else
323 #    define OF(args)  ()
324 #  endif
325 #endif
326 








327 /* The following definitions for FAR are needed only for MSDOS mixed
328  * model programming (small or medium model with some far allocations).
329  * This was tested only with MSC; for other MSDOS compilers you may have
330  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
331  * just define FAR to be empty.
332  */
333 #ifdef SYS16BIT
334 #  if defined(M_I86SM) || defined(M_I86MM)
335      /* MSC small or medium model */
336 #    define SMALL_MEDIUM
337 #    ifdef _MSC_VER
338 #      define FAR _far
339 #    else
340 #      define FAR far
341 #    endif
342 #  endif
343 #  if (defined(__SMALL__) || defined(__MEDIUM__))
344      /* Turbo C small or medium model */
345 #    define SMALL_MEDIUM
346 #    ifdef __BORLANDC__

523 #  define Z_LARGE64
524 #endif
525 
526 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
527 #  define Z_WANT64
528 #endif
529 
530 #if !defined(SEEK_SET) && !defined(Z_SOLO)
531 #  define SEEK_SET        0       /* Seek from beginning of file.  */
532 #  define SEEK_CUR        1       /* Seek from current position.  */
533 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
534 #endif
535 
536 #ifndef z_off_t
537 #  define z_off_t long
538 #endif
539 
540 #if !defined(_WIN32) && defined(Z_LARGE64)
541 #  define z_off64_t off64_t
542 #else
543 #  if defined(_WIN32) && !defined(__GNUC__)
544 #    define z_off64_t __int64
545 #  else
546 #    define z_off64_t z_off_t
547 #  endif
548 #endif
549 
550 /* MVS linker does not support external names larger than 8 bytes */
551 #if defined(__MVS__)
552   #pragma map(deflateInit_,"DEIN")
553   #pragma map(deflateInit2_,"DEIN2")
554   #pragma map(deflateEnd,"DEEND")
555   #pragma map(deflateBound,"DEBND")
556   #pragma map(inflateInit_,"ININ")
557   #pragma map(inflateInit2_,"ININ2")
558   #pragma map(inflateEnd,"INEND")
559   #pragma map(inflateSync,"INSY")
560   #pragma map(inflateSetDictionary,"INSEDI")
561   #pragma map(compressBound,"CMBND")
562   #pragma map(inflate_table,"INTABL")
563   #pragma map(inflate_fast,"INFA")
< prev index next >