8 #if defined(_WIN32) && !defined(__BORLANDC__)
9 # define LSEEK _lseeki64
11 #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
12 # define LSEEK lseek64
36 static char buf[1024];
39 DWORD lasterr = GetLastError();
40 DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
41 | FORMAT_MESSAGE_ALLOCATE_BUFFER,
51 && msgbuf[chars - 2] ==
'\r' && msgbuf[chars - 1] ==
'\n') {
56 if (chars >
sizeof (
buf) - 1) {
57 chars =
sizeof (
buf) - 1;
61 wcstombs(
buf, msgbuf, chars + 1);
68 SetLastError(lasterr);
89 state->strm.avail_in = 0;
133 #ifndef NO_GZCOMPRESS
201 len = strlen((
const char *)
path);
215 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
236 (exclusive ?
O_EXCL : 0) |
245 fd == -2 ? _wopen(
path, oflag, 0666) :
247 open((
const char *)
path, oflag, 0666));
248 if (
state->fd == -1) {
297 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
332 if (
state->size != 0)
395 else if (
state->seek)
410 state->strm.avail_in = 0;
549 *errnum =
state->err;
612 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
617 strcat(
state->msg,
": ");
static static fork const void static count static fd const char const char static newpath const char static path const char path
void ZEXPORT gzclearerr(gzFile file)
z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence)
int ZEXPORT gzrewind(gzFile file)
z_off64_t ZEXPORT gztell64(gzFile file)
void gz_reset(gz_statep state)
unsigned ZLIB_INTERNAL gz_intmax()
gzFile gz_open(void *path, int fd, const char *mode) const
gzFile ZEXPORT gzopen64(char *path, const char *mode) const
z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence)
gzFile ZEXPORT gzopen(char *path, const char *mode) const
int ZEXPORT gzeof(gzFile file)
void gz_reset OF((gz_statep))
gzFile ZEXPORT gzdopen(int fd, const char *mode)
z_off64_t ZEXPORT gzoffset64(gzFile file)
z_off_t ZEXPORT gzoffset(gzFile file)
const char *ZEXPORT gzerror(gzFile file, int *errnum)
void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg)
z_off_t ZEXPORT gztell(gzFile file)
int ZEXPORT gzbuffer(gzFile file, unsigned size)
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * malloc(size_t size)
static struct sockaddr static addrlen static backlog const void msg
void error(const char *msg)
static const z80_opcode fd[]
#define Z_DEFAULT_STRATEGY
#define Z_DEFAULT_COMPRESSION