9#ifndef SQUID_COMPAT_UNISTD_H
10#define SQUID_COMPAT_UNISTD_H
26int xopen(
const char *filename,
int oflag,
int pmode = 0);
29int xread(
int fd,
void * buf,
size_t bufSize);
32int xwrite(
int fd,
const void * buf,
size_t bufSize);
34#if _SQUID_WINDOWS_ || _SQUID_MINGW_
36#if !defined(_PATH_DEVNULL)
37#define _PATH_DEVNULL "NUL"
51 return gethostname(name, nameLength);
55xopen(
const char *filename,
int oflag,
int pmode)
57 return open(filename, oflag, pmode);
61xread(
int fd,
void * buf,
size_t bufSize)
63 return read(fd, buf, bufSize);
67xwrite(
int fd,
const void * buf,
size_t bufSize)
69 return write(fd, buf, bufSize);
int xread(int fd, void *buf, size_t bufSize)
POSIX read(2) equivalent.
int xwrite(int fd, const void *buf, size_t bufSize)
POSIX write(2) equivalent.
int xclose(int fd)
POSIX close(2) equivalent.
int xgethostname(char *name, size_t nameLength)
POSIX gethostname(2) equivalent.
int xopen(const char *filename, int oflag, int pmode=0)
POSIX open(2) equivalent.