Kvik and others were doing a deletion of the version check in order to gets things going, this week I had a bit of free time so I got to poke around in order to get both of these libs updated and compiling, even more importantly, I' ve tested it for a while searching for regressions(none found).
here's the patch to the ports tree in order to build the latest version of them, I hope it gets merged. :)
# HG changeset patch
# User Uramekus <uramekus@cirno.dev>
# Date 1581532030 14400
# Node ID 261facc89bfef26ddba248b6fcae7118b9d4f2dd
# Parent 5b0a83ca7639af8e60a53ac02f5ae1582a4f1596
update libpng and zlib
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/files/config.h
--- a/ape-libs/libpng/files/config.h Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/files/config.h Wed Feb 12 14:27:10 2020 -0400
@@ -59,7 +59,7 @@
#define PACKAGE_NAME "libpng"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libpng 1.6.17"
+#define PACKAGE_STRING "libpng 1.6.37"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libpng"
@@ -68,7 +68,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.6.17"
+#define PACKAGE_VERSION "1.6.37"
/* Turn on ARM Neon optimizations at run-time */
/* #undef PNG_ARM_NEON_API_SUPPORTED */
@@ -86,7 +86,7 @@
/* #undef TM_IN_SYS_TIME */
/* Version number of package */
-#define VERSION "1.6.17"
+#define VERSION "1.6.37"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/files/libpng-config
--- a/ape-libs/libpng/files/libpng-config Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/files/libpng-config Wed Feb 12 14:27:10 2020 -0400
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version="1.6.17"
+version="1.6.37"
prefix="/$objtype"
exec_prefix="${prefix}"
libdir="${exec_prefix}/lib/ape"
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/files/libpng.pc
--- a/ape-libs/libpng/files/libpng.pc Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/files/libpng.pc Wed Feb 12 14:27:10 2020 -0400
@@ -5,7 +5,7 @@
Name: libpng
Description: Loads and saves PNG files
-Version: 1.6.17
+Version: 1.6.37
Libs: -L${libdir} -lpng
Libs.private: -lz
Cflags: -I${includedir}
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/files/mkfile
--- a/ape-libs/libpng/files/mkfile Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/files/mkfile Wed Feb 12 14:27:10 2020 -0400
@@ -3,14 +3,13 @@
OFILES=pngread.$O example.$O pngtrans.$O pngrutil.$O pngwtran.$O pngwio.$O pngerror.$O \
pngwrite.$O pngget.$O png.$O pngrio.$O pngwutil.$O pngmem.$O pngrtran.$O \
pngpread.$O pngset.$O
-HFILES=pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngconf.h pnglibconf.h png.h \
- pnglibconf.h
+HFILES=pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngconf.h png.h
</sys/src/cmd/mksyslib
CC=pcc
LD=pcc
-CFLAGS=-c -I. -D_POSIX_SOURCE -D_SUSV2_SOURCE -D_BSD_EXTENSION -DHAVE_CONFIG_H -DPNGLIB_LIBNAME='PNG16_0' -DPNGLIB_VERSION='1.6.17' -DSYMBOL_PREFIX='' -DPNG_NO_USE_READ_MACROS
+CFLAGS=-c -I. -D_POSIX_SOURCE -D_SUSV2_SOURCE -D_BSD_EXTENSION -DHAVE_CONFIG_H -DPNGLIB_LIBNAME='PNG16_0' -DPNGLIB_VERSION='1.6.37' -DSYMBOL_PREFIX='' -DPNG_NO_USE_READ_MACROS
nuke:V:
mk clean
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/files/pngconf.h
--- a/ape-libs/libpng/files/pngconf.h Sun Dec 08 12:26:27 2019 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,622 +0,0 @@
-
-/* pngconf.h - machine configurable file for libpng
- *
- * libpng version 1.6.17, March 26, 2015
- *
- * Copyright (c) 1998-2015 Glenn Randers-Pehrson
- * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
- * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
- *
- * This code is released under the libpng license.
- * For conditions of distribution and use, see the disclaimer
- * and license in png.h
- *
- * Any machine specific code is near the front of this file, so if you
- * are configuring libpng for a machine, you may want to read the section
- * starting here down to where it starts to typedef png_color, png_text,
- * and png_info.
- */
-
-#ifndef PNGCONF_H
-#define PNGCONF_H
-
-#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */
-
-/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C
- * compiler for correct compilation. The following header files are required by
- * the standard. If your compiler doesn't provide these header files, or they
- * do not match the standard, you will need to provide/improve them.
- */
-#include <limits.h>
-#include <stddef.h>
-
-/* Library header files. These header files are all defined by ISOC90; libpng
- * expects conformant implementations, however, an ISOC90 conformant system need
- * not provide these header files if the functionality cannot be implemented.
- * In this case it will be necessary to disable the relevant parts of libpng in
- * the build of pnglibconf.h.
- *
- * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not
- * include this unnecessary header file.
- */
-
-#ifdef PNG_STDIO_SUPPORTED
- /* Required for the definition of FILE: */
-# include <stdio.h>
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
- /* Required for the definition of jmp_buf and the declaration of longjmp: */
-# include <setjmp.h>
-#endif
-
-#ifdef PNG_CONVERT_tIME_SUPPORTED
- /* Required for struct tm: */
-# include <time.h>
-#endif
-
-#endif /* PNG_BUILDING_SYMBOL_TABLE */
-
-/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using
- * PNG_NO_CONST; this is no longer supported except for data declarations which
- * apparently still cause problems in 2011 on some compilers.
- */
-#define PNG_CONST const /* backward compatibility only */
-
-/* This controls optimization of the reading of 16 and 32 bit values
- * from PNG files. It can be set on a per-app-file basis - it
- * just changes whether a macro is used when the function is called.
- * The library builder sets the default; if read functions are not
- * built into the library the macro implementation is forced on.
- */
-#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
-# define PNG_USE_READ_MACROS
-#endif
-#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
-# if PNG_DEFAULT_READ_MACROS
-# define PNG_USE_READ_MACROS
-# endif
-#endif
-
-/* COMPILER SPECIFIC OPTIONS.
- *
- * These options are provided so that a variety of difficult compilers
- * can be used. Some are fixed at build time (e.g. PNG_API_RULE
- * below) but still have compiler specific implementations, others
- * may be changed on a per-file basis when compiling against libpng.
- */
-
-/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect
- * against legacy (pre ISOC90) compilers that did not understand function
- * prototypes. It is not required for modern C compilers.
- */
-#ifndef PNGARG
-# define PNGARG(arglist) arglist
-#endif
-
-/* Function calling conventions.
- * =============================
- * Normally it is not necessary to specify to the compiler how to call
- * a function - it just does it - however on x86 systems derived from
- * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems
- * and some others) there are multiple ways to call a function and the
- * default can be changed on the compiler command line. For this reason
- * libpng specifies the calling convention of every exported function and
- * every function called via a user supplied function pointer. This is
- * done in this file by defining the following macros:
- *
- * PNGAPI Calling convention for exported functions.
- * PNGCBAPI Calling convention for user provided (callback) functions.
- * PNGCAPI Calling convention used by the ANSI-C library (required
- * for longjmp callbacks and sometimes used internally to
- * specify the calling convention for zlib).
- *
- * These macros should never be overridden. If it is necessary to
- * change calling convention in a private build this can be done
- * by setting PNG_API_RULE (which defaults to 0) to one of the values
- * below to select the correct 'API' variants.
- *
- * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout.
- * This is correct in every known environment.
- * PNG_API_RULE=1 Use the operating system convention for PNGAPI and
- * the 'C' calling convention (from PNGCAPI) for
- * callbacks (PNGCBAPI). This is no longer required
- * in any known environment - if it has to be used
- * please post an explanation of the problem to the
- * libpng mailing list.
- *
- * These cases only differ if the operating system does not use the C
- * calling convention, at present this just means the above cases
- * (x86 DOS/Windows sytems) and, even then, this does not apply to
- * Cygwin running on those systems.
- *
- * Note that the value must be defined in pnglibconf.h so that what
- * the application uses to call the library matches the conventions
- * set when building the library.
- */
-
-/* Symbol export
- * =============
- * When building a shared library it is almost always necessary to tell
- * the compiler which symbols to export. The png.h macro 'PNG_EXPORT'
- * is used to mark the symbols. On some systems these symbols can be
- * extracted at link time and need no special processing by the compiler,
- * on other systems the symbols are flagged by the compiler and just
- * the declaration requires a special tag applied (unfortunately) in a
- * compiler dependent way. Some systems can do either.
- *
- * A small number of older systems also require a symbol from a DLL to
- * be flagged to the program that calls it. This is a problem because
- * we do not know in the header file included by application code that
- * the symbol will come from a shared library, as opposed to a statically
- * linked one. For this reason the application must tell us by setting
- * the magic flag PNG_USE_DLL to turn on the special processing before
- * it includes png.h.
- *
- * Four additional macros are used to make this happen:
- *
- * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from
- * the build or imported if PNG_USE_DLL is set - compiler
- * and system specific.
- *
- * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to
- * 'type', compiler specific.
- *
- * PNG_DLL_EXPORT Set to the magic to use during a libpng build to
- * make a symbol exported from the DLL. Not used in the
- * public header files; see pngpriv.h for how it is used
- * in the libpng build.
- *
- * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come
- * from a DLL - used to define PNG_IMPEXP when
- * PNG_USE_DLL is set.
- */
-
-/* System specific discovery.
- * ==========================
- * This code is used at build time to find PNG_IMPEXP, the API settings
- * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
- * import processing is possible. On Windows systems it also sets
- * compiler-specific macros to the values required to change the calling
- * conventions of the various functions.
- */
-#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
- defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
- /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or
- * MinGW on any architecture currently supported by Windows. Also includes
- * Watcom builds but these need special treatment because they are not
- * compatible with GCC or Visual C because of different calling conventions.
- */
-# if PNG_API_RULE == 2
- /* If this line results in an error, either because __watcall is not
- * understood or because of a redefine just below you cannot use *this*
- * build of the library with the compiler you are using. *This* build was
- * build using Watcom and applications must also be built using Watcom!
- */
-# define PNGCAPI __watcall
-# endif
-
-# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800))
-# define PNGCAPI __cdecl
-# if PNG_API_RULE == 1
- /* If this line results in an error __stdcall is not understood and
- * PNG_API_RULE should not have been set to '1'.
- */
-# define PNGAPI __stdcall
-# endif
-# else
- /* An older compiler, or one not detected (erroneously) above,
- * if necessary override on the command line to get the correct
- * variants for the compiler.
- */
-# ifndef PNGCAPI
-# define PNGCAPI _cdecl
-# endif
-# if PNG_API_RULE == 1 && !defined(PNGAPI)
-# define PNGAPI _stdcall
-# endif
-# endif /* compiler/api */
-
- /* NOTE: PNGCBAPI always defaults to PNGCAPI. */
-
-# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
-# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed"
-# endif
-
-# if (defined(_MSC_VER) && _MSC_VER < 800) ||\
- (defined(__BORLANDC__) && __BORLANDC__ < 0x500)
- /* older Borland and MSC
- * compilers used '__export' and required this to be after
- * the type.
- */
-# ifndef PNG_EXPORT_TYPE
-# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP
-# endif
-# define PNG_DLL_EXPORT __export
-# else /* newer compiler */
-# define PNG_DLL_EXPORT __declspec(dllexport)
-# ifndef PNG_DLL_IMPORT
-# define PNG_DLL_IMPORT __declspec(dllimport)
-# endif
-# endif /* compiler */
-
-#else /* !Windows */
-# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
-# define PNGAPI _System
-# else /* !Windows/x86 && !OS/2 */
- /* Use the defaults, or define PNG*API on the command line (but
- * this will have to be done for every compile!)
- */
-# endif /* other system, !OS/2 */
-#endif /* !Windows/x86 */
-
-/* Now do all the defaulting . */
-#ifndef PNGCAPI
-# define PNGCAPI
-#endif
-#ifndef PNGCBAPI
-# define PNGCBAPI PNGCAPI
-#endif
-#ifndef PNGAPI
-# define PNGAPI PNGCAPI
-#endif
-
-/* PNG_IMPEXP may be set on the compilation system command line or (if not set)
- * then in an internal header file when building the library, otherwise (when
- * using the library) it is set here.
- */
-#ifndef PNG_IMPEXP
-# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT)
- /* This forces use of a DLL, disallowing static linking */
-# define PNG_IMPEXP PNG_DLL_IMPORT
-# endif
-
-# ifndef PNG_IMPEXP
-# define PNG_IMPEXP
-# endif
-#endif
-
-/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat
- * 'attributes' as a storage class - the attributes go at the start of the
- * function definition, and attributes are always appended regardless of the
- * compiler. This considerably simplifies these macros but may cause problems
- * if any compilers both need function attributes and fail to handle them as
- * a storage class (this is unlikely.)
- */
-#ifndef PNG_FUNCTION
-# define PNG_FUNCTION(type, name, args, attributes) attributes type name args
-#endif
-
-#ifndef PNG_EXPORT_TYPE
-# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type
-#endif
-
- /* The ordinal value is only relevant when preprocessing png.h for symbol
- * table entries, so we discard it here. See the .dfn files in the
- * scripts directory.
- */
-#ifndef PNG_EXPORTA
-
-# define PNG_EXPORTA(ordinal, type, name, args, attributes)\
- PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \
- extern attributes)
-#endif
-
-/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument,
- * so make something non-empty to satisfy the requirement:
- */
-#define PNG_EMPTY /*empty list*/
-
-#define PNG_EXPORT(ordinal, type, name, args)\
- PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY)
-
-/* Use PNG_REMOVED to comment out a removed interface. */
-#ifndef PNG_REMOVED
-# define PNG_REMOVED(ordinal, type, name, args, attributes)
-#endif
-
-#ifndef PNG_CALLBACK
-# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args)
-#endif
-
-/* Support for compiler specific function attributes. These are used
- * so that where compiler support is available incorrect use of API
- * functions in png.h will generate compiler warnings.
- *
- * Added at libpng-1.2.41.
- */
-
-#ifndef PNG_NO_PEDANTIC_WARNINGS
-# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
-# define PNG_PEDANTIC_WARNINGS_SUPPORTED
-# endif
-#endif
-
-#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
- /* Support for compiler specific function attributes. These are used
- * so that where compiler support is available, incorrect use of API
- * functions in png.h will generate compiler warnings. Added at libpng
- * version 1.2.41. Disabling these removes the warnings but may also produce
- * less efficient code.
- */
-# if defined(__clang__) && defined(__has_attribute)
- /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */
-# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
-# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
-# endif
-# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
-# define PNG_NORETURN __attribute__((__noreturn__))
-# endif
-# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
-# define PNG_ALLOCATED __attribute__((__malloc__))
-# endif
-# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
-# define PNG_DEPRECATED __attribute__((__deprecated__))
-# endif
-# if !defined(PNG_PRIVATE)
-# ifdef __has_extension
-# if __has_extension(attribute_unavailable_with_message)
-# define PNG_PRIVATE __attribute__((__unavailable__(\
- "This function is not exported by libpng.")))
-# endif
-# endif
-# endif
-# ifndef PNG_RESTRICT
-# define PNG_RESTRICT __restrict
-# endif
-
-# elif defined(__GNUC__)
-# ifndef PNG_USE_RESULT
-# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
-# endif
-# ifndef PNG_NORETURN
-# define PNG_NORETURN __attribute__((__noreturn__))
-# endif
-# if __GNUC__ >= 3
-# ifndef PNG_ALLOCATED
-# define PNG_ALLOCATED __attribute__((__malloc__))
-# endif
-# ifndef PNG_DEPRECATED
-# define PNG_DEPRECATED __attribute__((__deprecated__))
-# endif
-# ifndef PNG_PRIVATE
-# if 0 /* Doesn't work so we use deprecated instead*/
-# define PNG_PRIVATE \
- __attribute__((warning("This function is not exported by libpng.")))
-# else
-# define PNG_PRIVATE \
- __attribute__((__deprecated__))
-# endif
-# endif
-# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
-# ifndef PNG_RESTRICT
-# define PNG_RESTRICT __restrict
-# endif
-# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */
-# endif /* __GNUC__ >= 3 */
-
-# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
-# ifndef PNG_USE_RESULT
-# define PNG_USE_RESULT /* not supported */
-# endif
-# ifndef PNG_NORETURN
-# define PNG_NORETURN __declspec(noreturn)
-# endif
-# ifndef PNG_ALLOCATED
-# if (_MSC_VER >= 1400)
-# define PNG_ALLOCATED __declspec(restrict)
-# endif
-# endif
-# ifndef PNG_DEPRECATED
-# define PNG_DEPRECATED __declspec(deprecated)
-# endif
-# ifndef PNG_PRIVATE
-# define PNG_PRIVATE __declspec(deprecated)
-# endif
-# ifndef PNG_RESTRICT
-# if (_MSC_VER >= 1400)
-# define PNG_RESTRICT __restrict
-# endif
-# endif
-
-# elif defined(__WATCOMC__)
-# ifndef PNG_RESTRICT
-# define PNG_RESTRICT __restrict
-# endif
-# endif
-#endif /* PNG_PEDANTIC_WARNINGS */
-
-#ifndef PNG_DEPRECATED
-# define PNG_DEPRECATED /* Use of this function is deprecated */
-#endif
-#ifndef PNG_USE_RESULT
-# define PNG_USE_RESULT /* The result of this function must be checked */
-#endif
-#ifndef PNG_NORETURN
-# define PNG_NORETURN /* This function does not return */
-#endif
-#ifndef PNG_ALLOCATED
-# define PNG_ALLOCATED /* The result of the function is new memory */
-#endif
-#ifndef PNG_PRIVATE
-# define PNG_PRIVATE /* This is a private libpng function */
-#endif
-#ifndef PNG_RESTRICT
-# define PNG_RESTRICT /* The C99 "restrict" feature */
-#endif
-
-#ifndef PNG_FP_EXPORT /* A floating point API. */
-# ifdef PNG_FLOATING_POINT_SUPPORTED
-# define PNG_FP_EXPORT(ordinal, type, name, args)\
- PNG_EXPORT(ordinal, type, name, args);
-# else /* No floating point APIs */
-# define PNG_FP_EXPORT(ordinal, type, name, args)
-# endif
-#endif
-#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
-# ifdef PNG_FIXED_POINT_SUPPORTED
-# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
- PNG_EXPORT(ordinal, type, name, args);
-# else /* No fixed point APIs */
-# define PNG_FIXED_EXPORT(ordinal, type, name, args)
-# endif
-#endif
-
-#ifndef PNG_BUILDING_SYMBOL_TABLE
-/* Some typedefs to get us started. These should be safe on most of the common
- * platforms.
- *
- * png_uint_32 and png_int_32 may, currently, be larger than required to hold a
- * 32-bit value however this is not normally advisable.
- *
- * png_uint_16 and png_int_16 should always be two bytes in size - this is
- * verified at library build time.
- *
- * png_byte must always be one byte in size.
- *
- * The checks below use constants from limits.h, as defined by the ISOC90
- * standard.
- */
-#if CHAR_BIT == 8 && UCHAR_MAX == 255
- typedef unsigned char png_byte;
-#else
-# error "libpng requires 8 bit bytes"
-#endif
-
-#if INT_MIN == -32768 && INT_MAX == 32767
- typedef int png_int_16;
-#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
- typedef short png_int_16;
-#else
-# error "libpng requires a signed 16 bit type"
-#endif
-
-#if UINT_MAX == 65535
- typedef unsigned int png_uint_16;
-#elif USHRT_MAX == 65535
- typedef unsigned short png_uint_16;
-#else
-# error "libpng requires an unsigned 16 bit type"
-#endif
-
-#if INT_MIN < -2147483646 && INT_MAX > 2147483646
- typedef int png_int_32;
-#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
- typedef long int png_int_32;
-#else
-# error "libpng requires a signed 32 bit (or more) type"
-#endif
-
-#if UINT_MAX > 4294967294
- typedef unsigned int png_uint_32;
-#elif ULONG_MAX > 4294967294
- typedef unsigned long int png_uint_32;
-#else
-# error "libpng requires an unsigned 32 bit (or more) type"
-#endif
-
-/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however,
- * requires an ISOC90 compiler and relies on consistent behavior of sizeof.
- */
-typedef size_t png_size_t;
-typedef ptrdiff_t png_ptrdiff_t;
-
-/* libpng needs to know the maximum value of 'size_t' and this controls the
- * definition of png_alloc_size_t, below. This maximum value of size_t limits
- * but does not control the maximum allocations the library makes - there is
- * direct application control of this through png_set_user_limits().
- */
-#ifndef PNG_SMALL_SIZE_T
- /* Compiler specific tests for systems where size_t is known to be less than
- * 32 bits (some of these systems may no longer work because of the lack of
- * 'far' support; see above.)
- */
-# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\
- (defined(_MSC_VER) && defined(MAXSEG_64K))
-# define PNG_SMALL_SIZE_T
-# endif
-#endif
-
-/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no
- * smaller than png_uint_32. Casts from png_size_t or png_uint_32 to
- * png_alloc_size_t are not necessary; in fact, it is recommended not to use
- * them at all so that the compiler can complain when something turns out to be
- * problematic.
- *
- * Casts in the other direction (from png_alloc_size_t to png_size_t or
- * png_uint_32) should be explicitly applied; however, we do not expect to
- * encounter practical situations that require such conversions.
- *
- * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than
- * 4294967295 - i.e. less than the maximum value of png_uint_32.
- */
-#ifdef PNG_SMALL_SIZE_T
- typedef png_uint_32 png_alloc_size_t;
-#else
- typedef png_size_t png_alloc_size_t;
-#endif
-
-/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
- * implementations of Intel CPU specific support of user-mode segmented address
- * spaces, where 16-bit pointers address more than 65536 bytes of memory using
- * separate 'segment' registers. The implementation requires two different
- * types of pointer (only one of which includes the segment value.)
- *
- * If required this support is available in version 1.2 of libpng and may be
- * available in versions through 1.5, although the correctness of the code has
- * not been verified recently.
- */
-
-/* Typedef for floating-point numbers that are converted to fixed-point with a
- * multiple of 100,000, e.g., gamma
- */
-typedef png_int_32 png_fixed_point;
-
-/* Add typedefs for pointers */
-typedef void * png_voidp;
-typedef const void * png_const_voidp;
-typedef png_byte * png_bytep;
-typedef const png_byte * png_const_bytep;
-typedef png_uint_32 * png_uint_32p;
-typedef const png_uint_32 * png_const_uint_32p;
-typedef png_int_32 * png_int_32p;
-typedef const png_int_32 * png_const_int_32p;
-typedef png_uint_16 * png_uint_16p;
-typedef const png_uint_16 * png_const_uint_16p;
-typedef png_int_16 * png_int_16p;
-typedef const png_int_16 * png_const_int_16p;
-typedef char * png_charp;
-typedef const char * png_const_charp;
-typedef png_fixed_point * png_fixed_point_p;
-typedef const png_fixed_point * png_const_fixed_point_p;
-typedef png_size_t * png_size_tp;
-typedef const png_size_t * png_const_size_tp;
-
-#ifdef PNG_STDIO_SUPPORTED
-typedef FILE * png_FILE_p;
-#endif
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double * png_doublep;
-typedef const double * png_const_doublep;
-#endif
-
-/* Pointers to pointers; i.e. arrays */
-typedef png_byte * * png_bytepp;
-typedef png_uint_32 * * png_uint_32pp;
-typedef png_int_32 * * png_int_32pp;
-typedef png_uint_16 * * png_uint_16pp;
-typedef png_int_16 * * png_int_16pp;
-typedef const char * * png_const_charpp;
-typedef char * * png_charpp;
-typedef png_fixed_point * * png_fixed_point_pp;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double * * png_doublepp;
-#endif
-
-/* Pointers to pointers to pointers; i.e., pointer to array */
-typedef char * * * png_charppp;
-
-#endif /* PNG_BUILDING_SYMBOL_TABLE */
-
-#endif /* PNGCONF_H */
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/files/pnglibconf.h
--- a/ape-libs/libpng/files/pnglibconf.h Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/files/pnglibconf.h Wed Feb 12 14:27:10 2020 -0400
@@ -1,8 +1,9 @@
/* pnglibconf.h - library build configuration */
-/* libpng version 1.6.17, March 26, 2015 */
+/* libpng version 1.6.37 */
-/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
+/* Copyright (c) 2018-2019 Cosmin Truta */
+/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* For conditions of distribution and use, see the disclaimer */
@@ -42,6 +43,8 @@
#define PNG_IO_STATE_SUPPORTED
#define PNG_MNG_FEATURES_SUPPORTED
#define PNG_POINTER_INDEXING_SUPPORTED
+/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/
+/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/
#define PNG_PROGRESSIVE_READ_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
#define PNG_READ_ALPHA_MODE_SUPPORTED
@@ -80,6 +83,7 @@
#define PNG_READ_USER_TRANSFORM_SUPPORTED
#define PNG_READ_bKGD_SUPPORTED
#define PNG_READ_cHRM_SUPPORTED
+#define PNG_READ_eXIf_SUPPORTED
#define PNG_READ_gAMA_SUPPORTED
#define PNG_READ_hIST_SUPPORTED
#define PNG_READ_iCCP_SUPPORTED
@@ -107,6 +111,7 @@
#define PNG_SIMPLIFIED_READ_SUPPORTED
#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
+#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
#define PNG_SIMPLIFIED_WRITE_SUPPORTED
#define PNG_STDIO_SUPPORTED
#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
@@ -148,6 +153,7 @@
#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
#define PNG_WRITE_bKGD_SUPPORTED
#define PNG_WRITE_cHRM_SUPPORTED
+#define PNG_WRITE_eXIf_SUPPORTED
#define PNG_WRITE_gAMA_SUPPORTED
#define PNG_WRITE_hIST_SUPPORTED
#define PNG_WRITE_iCCP_SUPPORTED
@@ -165,6 +171,7 @@
#define PNG_WRITE_zTXt_SUPPORTED
#define PNG_bKGD_SUPPORTED
#define PNG_cHRM_SUPPORTED
+#define PNG_eXIf_SUPPORTED
#define PNG_gAMA_SUPPORTED
#define PNG_hIST_SUPPORTED
#define PNG_iCCP_SUPPORTED
@@ -183,11 +190,14 @@
/* end of options */
/* settings */
#define PNG_API_RULE 0
-#define PNG_COST_SHIFT 3
#define PNG_DEFAULT_READ_MACROS 1
#define PNG_GAMMA_THRESHOLD_FIXED 5000
#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
#define PNG_INFLATE_BUF_SIZE 1024
+#define PNG_LINKAGE_API extern
+#define PNG_LINKAGE_CALLBACK extern
+#define PNG_LINKAGE_DATA extern
+#define PNG_LINKAGE_FUNCTION extern
#define PNG_MAX_GAMMA_8 11
#define PNG_QUANTIZE_BLUE_BITS 5
#define PNG_QUANTIZE_GREEN_BITS 5
@@ -198,9 +208,8 @@
#define PNG_USER_CHUNK_MALLOC_MAX 8000000
#define PNG_USER_HEIGHT_MAX 1000000
#define PNG_USER_WIDTH_MAX 1000000
-#define PNG_WEIGHT_SHIFT 8
#define PNG_ZBUF_SIZE 8192
-#define PNG_ZLIB_VERNUM 0x1280
+#define PNG_ZLIB_VERNUM 0 /* unknown */
#define PNG_Z_DEFAULT_COMPRESSION (-1)
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
#define PNG_Z_DEFAULT_STRATEGY 1
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/manifest
--- a/ape-libs/libpng/manifest Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/manifest Wed Feb 12 14:27:10 2020 -0400
@@ -1,1 +1,1 @@
-a18233c99e1dc59a256180e6871d9305a42e91b3f98799b3ceb98e87e9ec5e31 libpng-1.6.17.tar.gz
+daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4 libpng-1.6.37.tar.gz
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/libpng/mkfile
--- a/ape-libs/libpng/mkfile Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/libpng/mkfile Wed Feb 12 14:27:10 2020 -0400
@@ -2,7 +2,7 @@
OWNER='Jens Staal <staal1978@gmail.com>'
DESCRIPTION='png library for APE'
-VERSION=1.6.17
+VERSION=1.6.37
DEPS=ape-libs/zlib
WEBSOURCE=https://download.sourceforge.net/libpng/libpng-$VERSION.tar.gz
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/zlib/files/zconf.h
--- a/ape-libs/zlib/files/zconf.h Sun Dec 08 12:26:27 2019 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,513 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-#pragma lib "/$M/lib/ape/libz.a"
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- * Even better than compiling with -DZ_PREFIX would be to use configure to set
- * this permanently in zconf.h using "./configure --zprefix".
- */
-#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
-# define Z_PREFIX_SET
-
-/* all linked symbols */
-# define _dist_code z__dist_code
-# define _length_code z__length_code
-# define _tr_align z__tr_align
-# define _tr_flush_bits z__tr_flush_bits
-# define _tr_flush_block z__tr_flush_block
-# define _tr_init z__tr_init
-# define _tr_stored_block z__tr_stored_block
-# define _tr_tally z__tr_tally
-# define adler32 z_adler32
-# define adler32_combine z_adler32_combine
-# define adler32_combine64 z_adler32_combine64
-# ifndef Z_SOLO
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
-# endif
-# define crc32 z_crc32
-# define crc32_combine z_crc32_combine
-# define crc32_combine64 z_crc32_combine64
-# define deflate z_deflate
-# define deflateBound z_deflateBound
-# define deflateCopy z_deflateCopy
-# define deflateEnd z_deflateEnd
-# define deflateInit2_ z_deflateInit2_
-# define deflateInit_ z_deflateInit_
-# define deflateParams z_deflateParams
-# define deflatePending z_deflatePending
-# define deflatePrime z_deflatePrime
-# define deflateReset z_deflateReset
-# define deflateResetKeep z_deflateResetKeep
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateSetHeader z_deflateSetHeader
-# define deflateTune z_deflateTune
-# define deflate_copyright z_deflate_copyright
-# define get_crc_table z_get_crc_table
-# ifndef Z_SOLO
-# define gz_error z_gz_error
-# define gz_intmax z_gz_intmax
-# define gz_strwinerror z_gz_strwinerror
-# define gzbuffer z_gzbuffer
-# define gzclearerr z_gzclearerr
-# define gzclose z_gzclose
-# define gzclose_r z_gzclose_r
-# define gzclose_w z_gzclose_w
-# define gzdirect z_gzdirect
-# define gzdopen z_gzdopen
-# define gzeof z_gzeof
-# define gzerror z_gzerror
-# define gzflush z_gzflush
-# define gzgetc z_gzgetc
-# define gzgetc_ z_gzgetc_
-# define gzgets z_gzgets
-# define gzoffset z_gzoffset
-# define gzoffset64 z_gzoffset64
-# define gzopen z_gzopen
-# define gzopen64 z_gzopen64
-# ifdef _WIN32
-# define gzopen_w z_gzopen_w
-# endif
-# define gzprintf z_gzprintf
-# define gzvprintf z_gzvprintf
-# define gzputc z_gzputc
-# define gzputs z_gzputs
-# define gzread z_gzread
-# define gzrewind z_gzrewind
-# define gzseek z_gzseek
-# define gzseek64 z_gzseek64
-# define gzsetparams z_gzsetparams
-# define gztell z_gztell
-# define gztell64 z_gztell64
-# define gzungetc z_gzungetc
-# define gzwrite z_gzwrite
-# endif
-# define inflate z_inflate
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define inflateBackInit_ z_inflateBackInit_
-# define inflateCopy z_inflateCopy
-# define inflateEnd z_inflateEnd
-# define inflateGetHeader z_inflateGetHeader
-# define inflateInit2_ z_inflateInit2_
-# define inflateInit_ z_inflateInit_
-# define inflateMark z_inflateMark
-# define inflatePrime z_inflatePrime
-# define inflateReset z_inflateReset
-# define inflateReset2 z_inflateReset2
-# define inflateSetDictionary z_inflateSetDictionary
-# define inflateGetDictionary z_inflateGetDictionary
-# define inflateSync z_inflateSync
-# define inflateSyncPoint z_inflateSyncPoint
-# define inflateUndermine z_inflateUndermine
-# define inflateResetKeep z_inflateResetKeep
-# define inflate_copyright z_inflate_copyright
-# define inflate_fast z_inflate_fast
-# define inflate_table z_inflate_table
-# ifndef Z_SOLO
-# define uncompress z_uncompress
-# endif
-# define zError z_zError
-# ifndef Z_SOLO
-# define zcalloc z_zcalloc
-# define zcfree z_zcfree
-# endif
-# define zlibCompileFlags z_zlibCompileFlags
-# define zlibVersion z_zlibVersion
-
-/* all zlib typedefs in zlib.h and zconf.h */
-# define Byte z_Byte
-# define Bytef z_Bytef
-# define alloc_func z_alloc_func
-# define charf z_charf
-# define free_func z_free_func
-# ifndef Z_SOLO
-# define gzFile z_gzFile
-# endif
-# define gz_header z_gz_header
-# define gz_headerp z_gz_headerp
-# define in_func z_in_func
-# define intf z_intf
-# define out_func z_out_func
-# define uInt z_uInt
-# define uIntf z_uIntf
-# define uLong z_uLong
-# define uLongf z_uLongf
-# define voidp z_voidp
-# define voidpc z_voidpc
-# define voidpf z_voidpf
-
-/* all zlib structs in zlib.h and zconf.h */
-# define gz_header_s z_gz_header_s
-# define internal_state z_internal_state
-
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-# define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-# define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-# define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-# ifndef WIN32
-# define WIN32
-# endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-# ifndef SYS16BIT
-# define SYS16BIT
-# endif
-# endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-# define MAXSEG_64K
-#endif
-#ifdef MSDOS
-# define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-# ifndef STDC
-# define STDC
-# endif
-# if __STDC_VERSION__ >= 199901L
-# ifndef STDC99
-# define STDC99
-# endif
-# endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-# define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
-# define STDC
-#endif
-
-#ifndef STDC
-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-# define const /* note: need a more gentle solution here */
-# endif
-#endif
-
-#if defined(ZLIB_CONST) && !defined(z_const)
-# define z_const const
-#else
-# define z_const
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-# define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- (1 << (windowBits+2)) + (1 << (memLevel+9))
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(args) ()
-# endif
-#endif
-
-#ifndef Z_ARG /* function prototypes for stdarg */
-# if defined(STDC) || defined(Z_HAVE_STDARG_H)
-# define Z_ARG(args) args
-# else
-# define Z_ARG(args) ()
-# endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-# if defined(M_I86SM) || defined(M_I86MM)
- /* MSC small or medium model */
-# define SMALL_MEDIUM
-# ifdef _MSC_VER
-# define FAR _far
-# else
-# define FAR far
-# endif
-# endif
-# if (defined(__SMALL__) || defined(__MEDIUM__))
- /* Turbo C small or medium model */
-# define SMALL_MEDIUM
-# ifdef __BORLANDC__
-# define FAR _far
-# else
-# define FAR far
-# endif
-# endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
- /* If building or using zlib as a DLL, define ZLIB_DLL.
- * This is not mandatory, but it offers a little performance increase.
- */
-# ifdef ZLIB_DLL
-# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-# ifdef ZLIB_INTERNAL
-# define ZEXTERN extern __declspec(dllexport)
-# else
-# define ZEXTERN extern __declspec(dllimport)
-# endif
-# endif
-# endif /* ZLIB_DLL */
- /* If building or using zlib with the WINAPI/WINAPIV calling convention,
- * define ZLIB_WINAPI.
- * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
- */
-# ifdef ZLIB_WINAPI
-# ifdef FAR
-# undef FAR
-# endif
-# include <windows.h>
- /* No need for _export, use ZLIB.DEF instead. */
- /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-# define ZEXPORT WINAPI
-# ifdef WIN32
-# define ZEXPORTVA WINAPIV
-# else
-# define ZEXPORTVA FAR CDECL
-# endif
-# endif
-#endif
-
-#if defined (__BEOS__)
-# ifdef ZLIB_DLL
-# ifdef ZLIB_INTERNAL
-# define ZEXPORT __declspec(dllexport)
-# define ZEXPORTVA __declspec(dllexport)
-# else
-# define ZEXPORT __declspec(dllimport)
-# define ZEXPORTVA __declspec(dllimport)
-# endif
-# endif
-#endif
-
-#ifndef ZEXTERN
-# define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-# define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-# define ZEXPORTVA
-#endif
-
-#ifndef FAR
-# define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char Byte; /* 8 bits */
-#endif
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
- typedef void const *voidpc;
- typedef void FAR *voidpf;
- typedef void *voidp;
-#else
- typedef Byte const *voidpc;
- typedef Byte FAR *voidpf;
- typedef Byte *voidp;
-#endif
-
-#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
-# include <limits.h>
-# if (UINT_MAX == 0xffffffffUL)
-# define Z_U4 unsigned
-# elif (ULONG_MAX == 0xffffffffUL)
-# define Z_U4 unsigned long
-# elif (USHRT_MAX == 0xffffffffUL)
-# define Z_U4 unsigned short
-# endif
-#endif
-
-#ifdef Z_U4
- typedef Z_U4 z_crc_t;
-#else
- typedef unsigned long z_crc_t;
-#endif
-
-#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
-# define Z_HAVE_UNISTD_H
-#endif
-
-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
-# define Z_HAVE_STDARG_H
-#endif
-
-#ifdef STDC
-# ifndef Z_SOLO
-# include <sys/types.h> /* for off_t */
-# endif
-#endif
-
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-# ifndef Z_SOLO
-# include <stdarg.h> /* for va_list */
-# endif
-#endif
-
-#ifdef _WIN32
-# ifndef Z_SOLO
-# include <stddef.h> /* for wchar_t */
-# endif
-#endif
-
-/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
- * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
- * though the former does not conform to the LFS document), but considering
- * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
- * equivalently requesting no 64-bit operations
- */
-#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
-# undef _LARGEFILE64_SOURCE
-#endif
-
-#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
-# define Z_HAVE_UNISTD_H
-#endif
-#ifndef Z_SOLO
-# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
-# endif
-# ifndef z_off_t
-# define z_off_t off_t
-# endif
-# endif
-#endif
-
-#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
-# define Z_LFS64
-#endif
-
-#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
-# define Z_LARGE64
-#endif
-
-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
-# define Z_WANT64
-#endif
-
-#if !defined(SEEK_SET) && !defined(Z_SOLO)
-# define SEEK_SET 0 /* Seek from beginning of file. */
-# define SEEK_CUR 1 /* Seek from current position. */
-# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
-#endif
-
-#ifndef z_off_t
-# define z_off_t long
-#endif
-
-#if !defined(_WIN32) && defined(Z_LARGE64)
-# define z_off64_t off64_t
-#else
-# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
-# define z_off64_t __int64
-# else
-# define z_off64_t z_off_t
-# endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
- #pragma map(deflateInit_,"DEIN")
- #pragma map(deflateInit2_,"DEIN2")
- #pragma map(deflateEnd,"DEEND")
- #pragma map(deflateBound,"DEBND")
- #pragma map(inflateInit_,"ININ")
- #pragma map(inflateInit2_,"ININ2")
- #pragma map(inflateEnd,"INEND")
- #pragma map(inflateSync,"INSY")
- #pragma map(inflateSetDictionary,"INSEDI")
- #pragma map(compressBound,"CMBND")
- #pragma map(inflate_table,"INTABL")
- #pragma map(inflate_fast,"INFA")
- #pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/zlib/files/zconf.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ape-libs/zlib/files/zconf.patch Wed Feb 12 14:27:10 2020 -0400
@@ -0,0 +1,11 @@
+--- a/zconf.h Mon Feb 10 14:26:36 2020
++++ b/zconf.h Mon Feb 10 14:55:57 2020
+@@ -8,6 +8,8 @@
+ #ifndef ZCONF_H
+ #define ZCONF_H
+
++#pragma lib "/$M/lib/ape/libz.a"
++
+ /*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/zlib/manifest
--- a/ape-libs/zlib/manifest Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/zlib/manifest Wed Feb 12 14:27:10 2020 -0400
@@ -1,1 +1,1 @@
-ecc93190eaaa5b8ddffd4237f668f8465b0f53f2b11713aa794ef03cd0a36620 zlib-1.2.7.tar.gz
+c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 zlib-1.2.11.tar.gz
diff -r 5b0a83ca7639 -r 261facc89bfe ape-libs/zlib/mkfile
--- a/ape-libs/zlib/mkfile Sun Dec 08 12:26:27 2019 -0800
+++ b/ape-libs/zlib/mkfile Wed Feb 12 14:27:10 2020 -0400
@@ -2,7 +2,7 @@
OWNER='Jens Staal <staal1978@gmail.com>'
DESCRIPTION='zlib compression library for APE'
-VERSION=1.2.7
+VERSION=1.2.11
WEBSOURCE=https://ftp.osuosl.org/pub/libpng/src/archive/gz/zlib/zlib-$VERSION.tar.gz
BUILDPATH=work/zlib-$VERSION