Changeset View
Changeset View
Standalone View
Standalone View
contrib/zlib/gzguts.h
/* gzguts.h -- zlib internal header definitions for gz* operations | /* gzguts.h -- zlib internal header definitions for gz* operations | ||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler | * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler | ||||
* For conditions of distribution and use, see copyright notice in zlib.h | * For conditions of distribution and use, see copyright notice in zlib.h | ||||
*/ | */ | ||||
#ifdef _LARGEFILE64_SOURCE | #ifdef _LARGEFILE64_SOURCE | ||||
# ifndef _LARGEFILE_SOURCE | # ifndef _LARGEFILE_SOURCE | ||||
delphij: (similar to crc32.h -- I think we can upstream this but are these changes really needed?) | |||||
# define _LARGEFILE_SOURCE 1 | # define _LARGEFILE_SOURCE 1 | ||||
# endif | # endif | ||||
# ifdef _FILE_OFFSET_BITS | # ifdef _FILE_OFFSET_BITS | ||||
# undef _FILE_OFFSET_BITS | # undef _FILE_OFFSET_BITS | ||||
# endif | # endif | ||||
#endif | #endif | ||||
#ifdef HAVE_HIDDEN | #ifdef HAVE_HIDDEN | ||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) | # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) | ||||
#else | #else | ||||
# define ZLIB_INTERNAL | # define ZLIB_INTERNAL | ||||
#endif | #endif | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include "zlib.h" | #include "zlib.h" | ||||
#ifdef STDC | #ifdef STDC | ||||
# include <string.h> | # include <string.h> | ||||
# if !defined(NO_GZIP) | |||||
# include <stdlib.h> | # include <stdlib.h> | ||||
# endif | |||||
# include <limits.h> | # include <limits.h> | ||||
#endif | #endif | ||||
#ifndef _POSIX_SOURCE | #ifndef _POSIX_SOURCE | ||||
# define _POSIX_SOURCE | # define _POSIX_SOURCE | ||||
#endif | #endif | ||||
#if !defined(NO_GZIP) | |||||
#include <fcntl.h> | # include <fcntl.h> | ||||
#endif | |||||
#ifdef _WIN32 | #ifdef _WIN32 | ||||
# include <stddef.h> | # include <stddef.h> | ||||
#endif | #endif | ||||
#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) | #if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) | ||||
# include <io.h> | # include <io.h> | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
/* gz* functions always use library allocation functions */ | /* gz* functions always use library allocation functions */ | ||||
#ifndef STDC | #ifndef STDC | ||||
extern voidp malloc OF((uInt size)); | extern voidp malloc OF((uInt size)); | ||||
extern void free OF((voidpf ptr)); | extern void free OF((voidpf ptr)); | ||||
#endif | #endif | ||||
/* get errno and strerror definition */ | /* get errno and strerror definition */ | ||||
#if !defined(NO_GZIP) | |||||
#if defined UNDER_CE | # if defined UNDER_CE | ||||
# include <windows.h> | # include <windows.h> | ||||
# define zstrerror() gz_strwinerror((DWORD)GetLastError()) | # define zstrerror() gz_strwinerror((DWORD)GetLastError()) | ||||
#else | # else | ||||
# ifndef NO_STRERROR | # ifndef NO_STRERROR | ||||
# include <errno.h> | # include <errno.h> | ||||
# define zstrerror() strerror(errno) | # define zstrerror() strerror(errno) | ||||
# else | # else | ||||
# define zstrerror() "stdio error (consult errno)" | # define zstrerror() "stdio error (consult errno)" | ||||
# endif | |||||
# endif | # endif | ||||
#endif | #endif | ||||
/* provide prototypes for these when building zlib without LFS */ | /* provide prototypes for these when building zlib without LFS */ | ||||
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 | #if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 | ||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); | ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); | ||||
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); | ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); | ||||
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); | ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |
(similar to crc32.h -- I think we can upstream this but are these changes really needed?)