Permalink
Browse files

zlib-1.2.5

  • Loading branch information...
0 parents commit c3659aa69d524035295676fe038a8624789661e6 @vapier vapier committed Apr 7, 2011
Showing with 64,807 additions and 0 deletions.
  1. +190 −0 CMakeLists.txt
  2. +1,208 −0 ChangeLog
  3. +366 −0 FAQ
  4. +65 −0 INDEX
  5. +5 −0 Makefile
  6. +257 −0 Makefile.in
  7. +115 −0 README
  8. +169 −0 adler32.c
  9. +69 −0 amiga/Makefile.pup
  10. +68 −0 amiga/Makefile.sas
  11. +80 −0 compress.c
  12. +596 −0 configure
  13. +77 −0 contrib/README.contrib
  14. +106 −0 contrib/ada/buffer_demo.adb
  15. +156 −0 contrib/ada/mtest.adb
  16. +156 −0 contrib/ada/read.adb
  17. +65 −0 contrib/ada/readme.txt
  18. +463 −0 contrib/ada/test.adb
  19. +225 −0 contrib/ada/zlib-streams.adb
  20. +114 −0 contrib/ada/zlib-streams.ads
  21. +141 −0 contrib/ada/zlib-thin.adb
  22. +450 −0 contrib/ada/zlib-thin.ads
  23. +701 −0 contrib/ada/zlib.adb
  24. +328 −0 contrib/ada/zlib.ads
  25. +20 −0 contrib/ada/zlib.gpr
  26. +452 −0 contrib/amd64/amd64-match.S
  27. +51 −0 contrib/asm686/README.686
  28. +343 −0 contrib/asm686/match.S
  29. +8 −0 contrib/blast/Makefile
  30. +4 −0 contrib/blast/README
  31. +444 −0 contrib/blast/blast.c
  32. +71 −0 contrib/blast/blast.h
  33. BIN contrib/blast/test.pk
  34. +1 −0 contrib/blast/test.txt
  35. +557 −0 contrib/delphi/ZLib.pas
  36. +11 −0 contrib/delphi/ZLibConst.pas
  37. +76 −0 contrib/delphi/readme.txt
  38. +99 −0 contrib/delphi/zlibd32.mak
  39. +33 −0 contrib/dotzlib/DotZLib.build
  40. BIN contrib/dotzlib/DotZLib.chm
  41. +21 −0 contrib/dotzlib/DotZLib.sln
  42. +58 −0 contrib/dotzlib/DotZLib/AssemblyInfo.cs
  43. +202 −0 contrib/dotzlib/DotZLib/ChecksumImpl.cs
  44. +83 −0 contrib/dotzlib/DotZLib/CircularBuffer.cs
  45. +198 −0 contrib/dotzlib/DotZLib/CodecBase.cs
  46. +106 −0 contrib/dotzlib/DotZLib/Deflater.cs
  47. +288 −0 contrib/dotzlib/DotZLib/DotZLib.cs
  48. +141 −0 contrib/dotzlib/DotZLib/DotZLib.csproj
  49. +301 −0 contrib/dotzlib/DotZLib/GZipStream.cs
  50. +105 −0 contrib/dotzlib/DotZLib/Inflater.cs
  51. +274 −0 contrib/dotzlib/DotZLib/UnitTests.cs
  52. +23 −0 contrib/dotzlib/LICENSE_1_0.txt
  53. +58 −0 contrib/dotzlib/readme.txt
  54. +574 −0 contrib/gcc_gvmat64/gvmat64.S
  55. +1 −0 contrib/infback9/README
  56. +617 −0 contrib/infback9/infback9.c
  57. +37 −0 contrib/infback9/infback9.h
  58. +107 −0 contrib/infback9/inffix9.h
  59. +47 −0 contrib/infback9/inflate9.h
  60. +324 −0 contrib/infback9/inftree9.c
  61. +61 −0 contrib/infback9/inftree9.h
  62. +1,157 −0 contrib/inflate86/inffas86.c
  63. +1,368 −0 contrib/inflate86/inffast.S
  64. +24 −0 contrib/iostream/test.cpp
  65. +329 −0 contrib/iostream/zfstream.cpp
  66. +128 −0 contrib/iostream/zfstream.h
  67. +307 −0 contrib/iostream2/zstream.h
  68. +25 −0 contrib/iostream2/zstream_test.cpp
  69. +35 −0 contrib/iostream3/README
  70. +17 −0 contrib/iostream3/TODO
  71. +50 −0 contrib/iostream3/test.cc
  72. +479 −0 contrib/iostream3/zfstream.cc
  73. +466 −0 contrib/iostream3/zfstream.h
  74. +2 −0 contrib/masmx64/bld_ml64.bat
  75. +553 −0 contrib/masmx64/gvmat64.asm
  76. +186 −0 contrib/masmx64/inffas8664.c
  77. +396 −0 contrib/masmx64/inffasx64.asm
  78. +31 −0 contrib/masmx64/readme.txt
  79. +2 −0 contrib/masmx86/bld_ml32.bat
  80. +1,083 −0 contrib/masmx86/inffas32.asm
  81. +478 −0 contrib/masmx86/match686.asm
  82. +27 −0 contrib/masmx86/readme.txt
  83. +25 −0 contrib/minizip/Makefile
  84. +6 −0 contrib/minizip/MiniZip64_Changes.txt
  85. +74 −0 contrib/minizip/MiniZip64_info.txt
  86. +131 −0 contrib/minizip/crypt.h
  87. +235 −0 contrib/minizip/ioapi.c
  88. +200 −0 contrib/minizip/ioapi.h
  89. +389 −0 contrib/minizip/iowin32.c
  90. +28 −0 contrib/minizip/iowin32.h
  91. +25 −0 contrib/minizip/make_vms.com
  92. +648 −0 contrib/minizip/miniunz.c
  93. +507 −0 contrib/minizip/minizip.c
  94. +281 −0 contrib/minizip/mztools.c
  95. +31 −0 contrib/minizip/mztools.h
  96. +2,125 −0 contrib/minizip/unzip.c
  97. +437 −0 contrib/minizip/unzip.h
  98. +2,004 −0 contrib/minizip/zip.c
  99. +362 −0 contrib/minizip/zip.h
  100. +599 −0 contrib/pascal/example.pas
  101. +76 −0 contrib/pascal/readme.txt
  102. +99 −0 contrib/pascal/zlibd32.mak
  103. +236 −0 contrib/pascal/zlibpas.pas
  104. +8 −0 contrib/puff/Makefile
  105. +63 −0 contrib/puff/README
  106. +955 −0 contrib/puff/puff.c
  107. +31 −0 contrib/puff/puff.h
  108. BIN contrib/puff/zeros.raw
  109. +275 −0 contrib/testzlib/testzlib.c
  110. +10 −0 contrib/testzlib/testzlib.txt
  111. +14 −0 contrib/untgz/Makefile
  112. +17 −0 contrib/untgz/Makefile.msc
  113. +674 −0 contrib/untgz/untgz.c
  114. +60 −0 contrib/vstudio/readme.txt
  115. +310 −0 contrib/vstudio/vc10/miniunz.vcxproj
  116. +22 −0 contrib/vstudio/vc10/miniunz.vcxproj.filters
  117. +3 −0 contrib/vstudio/vc10/miniunz.vcxproj.user
  118. +307 −0 contrib/vstudio/vc10/minizip.vcxproj
  119. +22 −0 contrib/vstudio/vc10/minizip.vcxproj.filters
  120. +3 −0 contrib/vstudio/vc10/minizip.vcxproj.user
  121. +420 −0 contrib/vstudio/vc10/testzlib.vcxproj
  122. +58 −0 contrib/vstudio/vc10/testzlib.vcxproj.filters
  123. +3 −0 contrib/vstudio/vc10/testzlib.vcxproj.user
  124. +310 −0 contrib/vstudio/vc10/testzlibdll.vcxproj
  125. +22 −0 contrib/vstudio/vc10/testzlibdll.vcxproj.filters
  126. +3 −0 contrib/vstudio/vc10/testzlibdll.vcxproj.user
  127. +32 −0 contrib/vstudio/vc10/zlib.rc
  128. +457 −0 contrib/vstudio/vc10/zlibstat.vcxproj
  129. +77 −0 contrib/vstudio/vc10/zlibstat.vcxproj.filters
  130. +3 −0 contrib/vstudio/vc10/zlibstat.vcxproj.user
  131. +130 −0 contrib/vstudio/vc10/zlibvc.def
  132. +135 −0 contrib/vstudio/vc10/zlibvc.sln
  133. +659 −0 contrib/vstudio/vc10/zlibvc.vcxproj
  134. +118 −0 contrib/vstudio/vc10/zlibvc.vcxproj.filters
  135. +3 −0 contrib/vstudio/vc10/zlibvc.vcxproj.user
  136. +565 −0 contrib/vstudio/vc9/miniunz.vcproj
  137. +562 −0 contrib/vstudio/vc9/minizip.vcproj
  138. +852 −0 contrib/vstudio/vc9/testzlib.vcproj
  139. +565 −0 contrib/vstudio/vc9/testzlibdll.vcproj
  140. +32 −0 contrib/vstudio/vc9/zlib.rc
  141. +835 −0 contrib/vstudio/vc9/zlibstat.vcproj
  142. +130 −0 contrib/vstudio/vc9/zlibvc.def
  143. +144 −0 contrib/vstudio/vc9/zlibvc.sln
  144. +1,156 −0 contrib/vstudio/vc9/zlibvc.vcproj
  145. +442 −0 crc32.c
  146. +441 −0 crc32.h
  147. +1,834 −0 deflate.c
  148. +342 −0 deflate.h
  149. +209 −0 doc/algorithm.txt
  150. +619 −0 doc/rfc1950.txt
  151. +955 −0 doc/rfc1951.txt
  152. +675 −0 doc/rfc1952.txt
  153. +107 −0 doc/txtvsbin.txt
  154. +565 −0 example.c
  155. +49 −0 examples/README.examples
  156. +569 −0 examples/enough.c
  157. +233 −0 examples/fitblk.c
  158. +701 −0 examples/gun.c
  159. +500 −0 examples/gzappend.c
  160. +448 −0 examples/gzjoin.c
  161. +1,058 −0 examples/gzlog.c
  162. +89 −0 examples/gzlog.h
  163. +545 −0 examples/zlib_how.html
  164. +205 −0 examples/zpipe.c
  165. +404 −0 examples/zran.c
  166. +25 −0 gzclose.c
  167. +132 −0 gzguts.h
  168. +537 −0 gzlib.c
  169. +653 −0 gzread.c
  170. +531 −0 gzwrite.c
  171. +632 −0 infback.c
  172. +340 −0 inffast.c
  173. +11 −0 inffast.h
  174. +94 −0 inffixed.h
  175. +1,480 −0 inflate.c
  176. +122 −0 inflate.h
  177. +330 −0 inftrees.c
  178. +62 −0 inftrees.h
  179. +804 −0 make_vms.com
  180. +440 −0 minigzip.c
  181. +115 −0 msdos/Makefile.bor
  182. +104 −0 msdos/Makefile.dj2
  183. +69 −0 msdos/Makefile.emx
  184. +112 −0 msdos/Makefile.msc
  185. +100 −0 msdos/Makefile.tc
  186. +126 −0 nintendods/Makefile
  187. +5 −0 nintendods/README
  188. +151 −0 old/Makefile.riscos
  189. +3 −0 old/README
  190. +132 −0 old/as400/bndsrc
  191. +123 −0 old/as400/compile.clp
  192. +111 −0 old/as400/readme.txt
  193. +331 −0 old/as400/zlib.inc
  194. +48 −0 old/descrip.mms
  195. +136 −0 old/os2/Makefile.os2
  196. +51 −0 old/os2/zlib.def
  197. +160 −0 old/visual-basic.txt
  198. +73 −0 old/visualc6/README.txt
  199. +278 −0 old/visualc6/example.dsp
  200. +278 −0 old/visualc6/minigzip.dsp
  201. +621 −0 old/visualc6/zlib.dsp
  202. +59 −0 old/visualc6/zlib.dsw
  203. +141 −0 qnx/package.qpg
  204. +116 −0 treebuild.xml
  205. +1,244 −0 trees.c
  206. +128 −0 trees.h
  207. +59 −0 uncompr.c
  208. +43 −0 watcom/watcom_f.mak
  209. +43 −0 watcom/watcom_l.mak
  210. +397 −0 win32/DLL_FAQ.txt
  211. +110 −0 win32/Makefile.bor
  212. +69 −0 win32/Makefile.emx
  213. +164 −0 win32/Makefile.gcc
  214. +157 −0 win32/Makefile.msc
  215. +103 −0 win32/README-WIN32.txt
  216. +3 −0 win32/VisualC.txt
  217. +74 −0 win32/zlib.def
  218. +40 −0 win32/zlib1.rc
  219. +428 −0 zconf.h
  220. +430 −0 zconf.h.cmakein
  221. +428 −0 zconf.h.in
  222. +151 −0 zlib.3
  223. BIN zlib.3.pdf
  224. +1,613 −0 zlib.h
  225. +68 −0 zlib.map
  226. +13 −0 zlib.pc.in
  227. +152 −0 zlib2ansi
  228. +318 −0 zutil.c
  229. +274 −0 zutil.h
@@ -0,0 +1,190 @@
+cmake_minimum_required(VERSION 2.4.4)
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
+
+project(zlib C)
+
+if(NOT DEFINED BUILD_SHARED_LIBS)
+ option(BUILD_SHARED_LIBS "Build a shared library form of zlib" ON)
+endif()
+
+include(CheckTypeSize)
+include(CheckFunctionExists)
+include(CheckIncludeFile)
+include(CheckCSourceCompiles)
+enable_testing()
+
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(stdint.h HAVE_STDINT_H)
+check_include_file(stddef.h HAVE_STDDEF_H)
+
+#
+# Check to see if we have large file support
+#
+set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
+# We add these other definitions here because CheckTypeSize.cmake
+# in CMake 2.4.x does not automatically do so and we want
+# compatibility with CMake 2.4.x.
+if(HAVE_SYS_TYPES_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
+endif()
+if(HAVE_STDINT_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
+endif()
+if(HAVE_STDDEF_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
+endif()
+check_type_size(off64_t OFF64_T)
+if(HAVE_OFF64_T)
+ add_definitions(-D_LARGEFILE64_SOURCE=1)
+endif()
+set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
+
+#
+# Check for fseeko
+#
+check_function_exists(fseeko HAVE_FSEEKO)
+if(NOT HAVE_FSEEKO)
+ add_definitions(-DNO_FSEEKO)
+endif()
+
+#
+# Check for unistd.h
+#
+check_include_file(unistd.h Z_HAVE_UNISTD_H)
+
+if(MSVC)
+ set(CMAKE_DEBUG_POSTFIX "d")
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+endif()
+
+if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
+ # If we're doing an out of source build and the user has a zconf.h
+ # in their source tree...
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
+ message(FATAL_ERROR
+ "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
+ "from the source tree. This file is included with zlib "
+ "but CMake generates this file for you automatically "
+ "in the build directory.")
+ endif()
+endif()
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
+ ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+
+#============================================================================
+# zlib
+#============================================================================
+
+set(ZLIB_PUBLIC_HDRS
+ ${CMAKE_CURRENT_BINARY_DIR}/zconf.h
+ zlib.h
+)
+set(ZLIB_PRIVATE_HDRS
+ crc32.h
+ deflate.h
+ gzguts.h
+ inffast.h
+ inffixed.h
+ inflate.h
+ inftrees.h
+ trees.h
+ zutil.h
+)
+set(ZLIB_SRCS
+ adler32.c
+ compress.c
+ crc32.c
+ deflate.c
+ gzclose.c
+ gzlib.c
+ gzread.c
+ gzwrite.c
+ inflate.c
+ infback.c
+ inftrees.c
+ inffast.c
+ trees.c
+ uncompr.c
+ zutil.c
+ win32/zlib1.rc
+)
+
+# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
+string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([0-9A-Za-z.]+)\".*"
+ "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
+
+if(MINGW)
+ # This gets us DLL resource information when compiling on MinGW.
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
+ COMMAND windres.exe
+ -D GCC_WINDRES
+ -I ${CMAKE_CURRENT_SOURCE_DIR}
+ -I ${CMAKE_CURRENT_BINARY_DIR}
+ -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
+ -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
+ set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
+endif(MINGW)
+
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+
+set_target_properties(zlib PROPERTIES SOVERSION 1)
+
+if(NOT CYGWIN)
+ # This property causes shared libraries on Linux to have the full version
+ # encoded into their final filename. We disable this on Cygwin because
+ # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
+ # seems to be the default.
+ #
+ # This has no effect with MSVC, on that platform the version info for
+ # the DLL comes from the resource file win32/zlib1.rc
+ set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
+endif()
+
+if(UNIX)
+ # On unix-like platforms the library is almost always called libz
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
+elseif(BUILD_SHARED_LIBS AND WIN32)
+ # Creates zlib1.dll when building shared library version
+ set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
+endif()
+
+if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ install(TARGETS zlib
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib )
+endif()
+if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
+ install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION include)
+endif()
+if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
+ install(FILES zlib.3 DESTINATION share/man/man3)
+endif()
+
+#============================================================================
+# Example binaries
+#============================================================================
+
+add_executable(example example.c)
+target_link_libraries(example zlib)
+add_test(example example)
+
+add_executable(minigzip minigzip.c)
+target_link_libraries(minigzip zlib)
+
+if(HAVE_OFF64_T)
+ add_executable(example64 example.c)
+ target_link_libraries(example64 zlib)
+ set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+ add_test(example64 example64)
+
+ add_executable(minigzip64 minigzip.c)
+ target_link_libraries(minigzip64 zlib)
+ set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+endif()
Oops, something went wrong.

0 comments on commit c3659aa

Please sign in to comment.