int len;
int err;
int ifd = fileno(in);
- caddr_t buf; /* mmap'ed buffer for the entire input file */
+ char *buf; /* mmap'ed buffer for the entire input file */
off_t buf_len; /* length of the input file */
struct stat sb;
if (buf_len <= 0) return Z_ERRNO;
/* Now do the actual mmap: */
- buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
- if (buf == (caddr_t)(-1)) return Z_ERRNO;
+ buf = mmap((char *) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
+ if (buf == (char *)(-1)) return Z_ERRNO;
/* Compress the whole file at once: */
- len = PREFIX(gzwrite)(out, (char *)buf, (unsigned)buf_len);
+ len = PREFIX(gzwrite)(out, buf, (unsigned)buf_len);
if (len != (int)buf_len) error(PREFIX(gzerror)(out, &err));