/security/nss/lib/jar/jzconf.h

http://github.com/zpao/v8monkey · C Header · 190 lines · 130 code · 21 blank · 39 comment · 21 complexity · 5f4439bc9f1627632642b2f910cb4b42 MD5 · raw file

  1. /* zconf.h -- configuration of the zlib compression library
  2. * Copyright (C) 1995-1996 Jean-loup Gailly.
  3. * For conditions of distribution and use, see copyright notice in zlib.h
  4. */
  5. /* This file was modified since it was taken from the zlib distribution */
  6. /* $Id: jzconf.h,v 1.2 2009/04/28 04:25:03 nelson%bolyard.com Exp $ */
  7. #ifndef _ZCONF_H
  8. #define _ZCONF_H
  9. /*
  10. * If you *really* need a unique prefix for all types and library functions,
  11. * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
  12. */
  13. #ifdef Z_PREFIX
  14. # define deflateInit_ z_deflateInit_
  15. # define deflate z_deflate
  16. # define deflateEnd z_deflateEnd
  17. # define inflateInit_ z_inflateInit_
  18. # define inflate z_inflate
  19. # define inflateEnd z_inflateEnd
  20. # define deflateInit2_ z_deflateInit2_
  21. # define deflateSetDictionary z_deflateSetDictionary
  22. # define deflateCopy z_deflateCopy
  23. # define deflateReset z_deflateReset
  24. # define deflateParams z_deflateParams
  25. # define inflateInit2_ z_inflateInit2_
  26. # define inflateSetDictionary z_inflateSetDictionary
  27. # define inflateSync z_inflateSync
  28. # define inflateReset z_inflateReset
  29. # define compress z_compress
  30. # define uncompress z_uncompress
  31. # define adler32 z_adler32
  32. # define crc32 z_crc32
  33. # define get_crc_table z_get_crc_table
  34. # define Byte z_Byte
  35. # define uInt z_uInt
  36. # define uLong z_uLong
  37. # define Bytef z_Bytef
  38. # define charf z_charf
  39. # define intf z_intf
  40. # define uIntf z_uIntf
  41. # define uLongf z_uLongf
  42. # define voidpf z_voidpf
  43. # define voidp z_voidp
  44. #endif
  45. #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
  46. # define WIN32
  47. #endif
  48. #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
  49. # ifndef __32BIT__
  50. # define __32BIT__
  51. # endif
  52. #endif
  53. #if defined(__MSDOS__) && !defined(MSDOS)
  54. # define MSDOS
  55. #endif
  56. /*
  57. * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
  58. * than 64k bytes at a time (needed on systems with 16-bit int).
  59. */
  60. #if defined(MSDOS) && !defined(__32BIT__)
  61. # define MAXSEG_64K
  62. #endif
  63. #ifdef MSDOS
  64. # define UNALIGNED_OK
  65. #endif
  66. #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32) || defined(XP_OS2)) && !defined(STDC)
  67. # define STDC
  68. #endif
  69. #if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC)
  70. # define STDC
  71. #endif
  72. #ifndef STDC
  73. # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
  74. # define const
  75. # endif
  76. #endif
  77. /* Some Mac compilers merge all .h files incorrectly: */
  78. #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
  79. # define NO_DUMMY_DECL
  80. #endif
  81. /* Maximum value for memLevel in deflateInit2 */
  82. #ifndef MAX_MEM_LEVEL
  83. # ifdef MAXSEG_64K
  84. # define MAX_MEM_LEVEL 8
  85. # else
  86. # define MAX_MEM_LEVEL 9
  87. # endif
  88. #endif
  89. /* Maximum value for windowBits in deflateInit2 and inflateInit2 */
  90. #ifndef MAX_WBITS
  91. # define MAX_WBITS 15 /* 32K LZ77 window */
  92. #endif
  93. /* The memory requirements for deflate are (in bytes):
  94. 1 << (windowBits+2) + 1 << (memLevel+9)
  95. that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
  96. plus a few kilobytes for small objects. For example, if you want to reduce
  97. the default memory requirements from 256K to 128K, compile with
  98. make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  99. Of course this will generally degrade compression (there's no free lunch).
  100. The memory requirements for inflate are (in bytes) 1 << windowBits
  101. that is, 32K for windowBits=15 (default value) plus a few kilobytes
  102. for small objects.
  103. */
  104. /* Type declarations */
  105. #ifndef OF /* function prototypes */
  106. # ifdef STDC
  107. # define OF(args) args
  108. # else
  109. # define OF(args) ()
  110. # endif
  111. #endif
  112. /* The following definitions for FAR are needed only for MSDOS mixed
  113. * model programming (small or medium model with some far allocations).
  114. * This was tested only with MSC; for other MSDOS compilers you may have
  115. * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
  116. * just define FAR to be empty.
  117. */
  118. #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
  119. /* MSC small or medium model */
  120. # define SMALL_MEDIUM
  121. # ifdef _MSC_VER
  122. # define FAR __far
  123. # else
  124. # define FAR far
  125. # endif
  126. #endif
  127. #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
  128. # ifndef __32BIT__
  129. # define SMALL_MEDIUM
  130. # define FAR __far
  131. # endif
  132. #endif
  133. #ifndef FAR
  134. # define FAR
  135. #endif
  136. typedef unsigned char Byte; /* 8 bits */
  137. typedef unsigned int uInt; /* 16 bits or more */
  138. typedef unsigned long uLong; /* 32 bits or more */
  139. #if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
  140. /* Borland C/C++ ignores FAR inside typedef */
  141. # define Bytef Byte FAR
  142. #else
  143. typedef Byte FAR Bytef;
  144. #endif
  145. typedef char FAR charf;
  146. typedef int FAR intf;
  147. typedef uInt FAR uIntf;
  148. typedef uLong FAR uLongf;
  149. #ifdef STDC
  150. typedef void FAR *voidpf;
  151. typedef void *voidp;
  152. #else
  153. typedef Byte FAR *voidpf;
  154. typedef Byte *voidp;
  155. #endif
  156. #ifdef MOZILLA_CLIENT
  157. #include "prtypes.h"
  158. #else
  159. /* Compile with -DZLIB_DLL for Windows DLL support */
  160. #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
  161. # include <windows.h>
  162. # define EXPORT WINAPI
  163. #else
  164. # define EXPORT
  165. #endif
  166. #define PR_PUBLIC_API(type) type
  167. #endif /* MOZILLA_CLIENT */
  168. #endif /* _ZCONF_H */