[Library] Update zlibng (#1255)

* Update zlibng

* Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone

* I'm dumb, missing / in path

* Mackal helps with a dumb gitignore issue

* Adding all the files, not sure what's ignoring them and im tired of looking

* Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now
This commit is contained in:
Alex
2021-02-23 17:00:26 -08:00
committed by GitHub
parent e6dee96266
commit 2957f5084d
184 changed files with 22029 additions and 11703 deletions
+15 -27
View File
@@ -14,12 +14,12 @@
# endif
#endif
#if defined(HAVE_INTERNAL)
# define ZLIB_INTERNAL __attribute__((visibility ("internal")))
#elif defined(HAVE_HIDDEN)
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#if defined(HAVE_VISIBILITY_INTERNAL)
# define Z_INTERNAL __attribute__((visibility ("internal")))
#elif defined(HAVE_VISIBILITY_HIDDEN)
# define Z_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
# define Z_INTERNAL
#endif
#include <stdio.h>
@@ -29,12 +29,12 @@
#include <fcntl.h>
#if defined(ZLIB_COMPAT)
# include "zlib.h"
# include "zlib.h"
#else
# include "zlib-ng.h"
# include "zlib-ng.h"
#endif
#ifdef WIN32
#ifdef _WIN32
# include <stddef.h>
#endif
@@ -42,11 +42,8 @@
# include <unistd.h> /* for lseek(), read(), close(), write(), unlink() */
#endif
#if defined(_MSC_VER) || defined(WIN32)
#if defined(_WIN32)
# include <io.h>
#endif
#if defined(_WIN32) || defined(__MINGW__)
# define WIDECHAR
#endif
@@ -58,7 +55,7 @@
#endif
/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
#if !defined(STDC99) && !defined(__CYGWIN__) && !defined(__MINGW__) && defined(WIN32)
#if !defined(STDC99) && !defined(__CYGWIN__) && !defined(__MINGW__) && defined(_WIN32)
# if !defined(vsnprintf)
# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
# define vsnprintf _vsnprintf
@@ -81,14 +78,6 @@
# define zstrerror() "stdio error (consult errno)"
#endif
/* provide prototypes for these when building zlib without LFS */
#if (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) && defined(WITH_GZFILEOP)
ZEXTERN gzFile ZEXPORT PREFIX(gzopen64)(const char *, const char *);
ZEXTERN z_off64_t ZEXPORT PREFIX(gzseek64)(gzFile, z_off64_t, int);
ZEXTERN z_off64_t ZEXPORT PREFIX(gztell64)(gzFile);
ZEXTERN z_off64_t ZEXPORT PREFIX(gzoffset64)(gzFile);
#endif
/* default memLevel */
#if MAX_MEM_LEVEL >= 8
# define DEF_MEM_LEVEL 8
@@ -98,10 +87,8 @@
/* default i/o buffer size -- double this for output when reading (this and
twice this must be able to fit in an unsigned type) */
#if defined(S390_DFLTCC_DEFLATE) || defined(S390_DFLTCC_INFLATE)
#define GZBUFSIZE 262144 /* DFLTCC works faster with larger buffers */
#else
#define GZBUFSIZE 8192
#ifndef GZBUFSIZE
# define GZBUFSIZE 8192
#endif
/* gzip modes, also provide a little integrity check on the passed structure */
@@ -139,6 +126,7 @@ typedef struct {
/* just for writing */
int level; /* compression level */
int strategy; /* compression strategy */
int reset; /* true if a reset is pending after a Z_FINISH */
/* seek request */
z_off64_t skip; /* amount to skip (already rewound if backwards) */
int seek; /* true if seek request pending */
@@ -151,7 +139,7 @@ typedef struct {
typedef gz_state *gz_statep;
/* shared functions */
void ZLIB_INTERNAL gz_error(gz_state *, int, const char *);
void Z_INTERNAL gz_error(gz_state *, int, const char *);
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
value -- needed when comparing unsigned to z_off64_t, which is signed
@@ -159,7 +147,7 @@ void ZLIB_INTERNAL gz_error(gz_state *, int, const char *);
#ifdef INT_MAX
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
#else
unsigned ZLIB_INTERNAL gz_intmax(void);
unsigned Z_INTERNAL gz_intmax(void);
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
#endif