Go to the documentation of this file.
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);
65 sprintf(
buf,
"unknown win32 error (%ld)",
error);
68 SetLastError(lasterr);
89 state->strm.avail_in = 0;
133 #ifndef NO_GZCOMPRESS
201 len = strlen((
const char *)
path);
202 state->path = (
char *)malloc(
len + 1);
203 if (
state->path == NULL) {
215 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
216 (void)snprintf(
state->path,
len + 1,
"%s", (
const char *)
path);
230 (cloexec ? O_CLOEXEC : 0) |
234 (O_WRONLY | O_CREAT |
236 (exclusive ? O_EXCL : 0) |
243 state->fd = fd > -1 ? fd : (
245 fd == -2 ? _wopen(
path, oflag, 0666) :
247 open((
const char *)
path, oflag, 0666));
248 if (
state->fd == -1) {
295 if (fd == -1 || (
path = (
char *)malloc(7 + 3 *
sizeof(
int))) == NULL)
297 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
298 (void)snprintf(
path, 7 + 3 *
sizeof(
int),
"<fd:%d>", fd);
300 sprintf(
path,
"<fd:%d>", fd);
332 if (
state->size != 0)
395 else if (
state->seek)
410 state->strm.avail_in = 0;
549 *errnum =
state->err;
587 if (
state->msg != NULL) {
607 if ((
state->msg = (
char *)malloc(strlen(
state->path) + strlen(
msg) + 3)) ==
612 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
613 (void)snprintf(
state->msg, strlen(
state->path) + strlen(
msg) + 3,
617 strcat(
state->msg,
": ");
z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence)
#define Z_DEFAULT_COMPRESSION
const grpc_generator::File * file
void gz_reset OF((gz_statep))
gzFile ZEXPORT gzopen(char *path, const char *mode) const
z_off64_t ZEXPORT gzoffset64(gzFile file)
z_off_t ZEXPORT gzoffset(gzFile file)
z_off_t ZEXPORT gztell(gzFile file)
int ZEXPORT gzeof(gzFile file)
void gz_reset(gz_statep state)
unsigned ZLIB_INTERNAL gz_intmax()
int ZEXPORT gzrewind(gzFile file)
z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence)
gzFile ZEXPORT gzopen64(char *path, const char *mode) const
void ZEXPORT gzclearerr(gzFile file)
gzFile ZEXPORT gzdopen(int fd, const char *mode)
const char *ZEXPORT gzerror(gzFile file, int *errnum)
UniquePtr< SSL_SESSION > ret
void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg)
int ZEXPORT gzbuffer(gzFile file, unsigned size)
z_off64_t ZEXPORT gztell64(gzFile file)
static struct rpc_state state
gzFile gz_open(void *path, int fd, const char *mode) const
#define Z_DEFAULT_STRATEGY
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:59