]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/zstd/zlibWrapper/gzcompatibility.h
Update zstd to 1.3.0
[FreeBSD/FreeBSD.git] / contrib / zstd / zlibWrapper / gzcompatibility.h
1 /**
2  * Copyright (c) 2016-present, Przemyslaw Skibinski, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  */
9
10
11
12 #if ZLIB_VERNUM <= 0x1240
13 ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
14 ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
15 ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); 
16 ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
17  
18 #if !defined(_WIN32) && defined(Z_LARGE64)
19 #  define z_off64_t off64_t
20 #else
21 #  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
22 #    define z_off64_t __int64
23 #  else
24 #    define z_off64_t z_off_t
25 #  endif
26 #endif
27 #endif
28
29
30 #if ZLIB_VERNUM <= 0x1250
31 struct gzFile_s {
32     unsigned have;
33     unsigned char *next;
34     z_off64_t pos;
35 };
36 #endif
37
38
39 #if ZLIB_VERNUM <= 0x1270
40 #if defined(_WIN32) && !defined(Z_SOLO)
41 #    include <stddef.h>         /* for wchar_t */ 
42 ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
43                                             const char *mode));
44 #endif
45 #endif
46
47
48 #if ZLIB_VERNUM < 0x12B0
49 #ifdef Z_SOLO
50    typedef unsigned long z_size_t;
51 #else
52 #  define z_longlong long long
53 #  if defined(NO_SIZE_T)
54      typedef unsigned NO_SIZE_T z_size_t;
55 #  elif defined(STDC)
56 #    include <stddef.h>
57      typedef size_t z_size_t;
58 #  else
59      typedef unsigned long z_size_t;
60 #  endif
61 #  undef z_longlong
62 #endif
63 ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
64                                      gzFile file));
65 ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
66                                       z_size_t nitems, gzFile file));
67 #endif