Path: blob/main/sys/contrib/zstd/zlibWrapper/gzcompatibility.h
48254 views
/*1* Copyright (c) 2016-2021, Przemyslaw Skibinski, Yann Collet, Facebook, Inc.2* All rights reserved.3*4* This source code is licensed under both the BSD-style license (found in the5* LICENSE file in the root directory of this source tree) and the GPLv2 (found6* in the COPYING file in the root directory of this source tree).7* You may select, at your option, one of the above-listed licenses.8*/9101112#if ZLIB_VERNUM <= 0x124013ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));14ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));15ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));16ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));1718#if !defined(_WIN32) && defined(Z_LARGE64)19# define z_off64_t off64_t20#else21# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)22# define z_off64_t __int6423# else24# define z_off64_t z_off_t25# endif26#endif27#endif282930#if ZLIB_VERNUM <= 0x125031struct gzFile_s {32unsigned have;33unsigned char *next;34z_off64_t pos;35};36#endif373839#if ZLIB_VERNUM <= 0x127040#if defined(_WIN32) && !defined(Z_SOLO)41# include <stddef.h> /* for wchar_t */42ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,43const char *mode));44#endif45#endif464748#if ZLIB_VERNUM < 0x12B049#ifdef Z_SOLO50typedef unsigned long z_size_t;51#else52# define z_longlong long long53# if defined(NO_SIZE_T)54typedef unsigned NO_SIZE_T z_size_t;55# elif defined(STDC)56# include <stddef.h>57typedef size_t z_size_t;58# else59typedef unsigned long z_size_t;60# endif61# undef z_longlong62#endif63ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,64gzFile file));65ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,66z_size_t nitems, gzFile file));67#endif686970