HelenOS sources
#ifndef POSIX_UNISTD_H_
#define POSIX_UNISTD_H_
#include <stddef.h>
#include <sys/types.h>
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#define _exit exit
#define STDIN_FILENO (fileno(stdin))
#define STDOUT_FILENO (fileno(stdout))
#define STDERR_FILENO (fileno(stderr))
#define F_OK 0
#define X_OK 1
#define W_OK 2
#define R_OK 4
__C_DECLS_BEGIN;
extern char *optarg;
extern int optind, opterr, optopt;
extern int getopt(int, char *const [], const char *);
extern char **environ;
extern unsigned int sleep(unsigned int);
extern char *getlogin(void);
extern int getlogin_r(char *name, size_t namesize);
extern int isatty(int fd);
extern char *getcwd(char *buf, size_t size);
extern int chdir(const char *path);
extern int getpagesize(void);
extern pid_t getpid(void);
extern uid_t getuid(void);
extern gid_t getgid(void);
extern int close(int fildes);
extern ssize_t read(int fildes, void *buf, size_t nbyte);
extern ssize_t write(int fildes, const void *buf, size_t nbyte);
extern int fsync(int fildes);
extern int rmdir(const char *path);
extern int unlink(const char *path);
extern int dup(int fildes);
extern int dup2(int fildes, int fildes2);
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
typedef int64_t off64_t;
extern off64_t lseek64(int fildes, off64_t offset, int whence);
extern int ftruncate64(int fildes, off64_t length);
#endif
#if _FILE_OFFSET_BITS == 64 && LONG_MAX == INT_MAX
#ifdef __GNUC__
extern off_t lseek(int fildes, off_t offset, int whence) __asm__("lseek64");
extern int ftruncate(int fildes, off_t length) __asm__("ftruncate64");
#else
extern off_t lseek64(int fildes, off_t offset, int whence);
extern int ftruncate64(int fildes, off_t length);
#define lseek lseek64
#define ftruncate ftruncate64
#endif
#else
extern off_t lseek(int fildes, off_t offset, int whence);
extern int ftruncate(int fildes, off_t length);
#endif
extern int access(const char *path, int amode);
enum {
_SC_PHYS_PAGES,
_SC_AVPHYS_PAGES,
_SC_PAGESIZE,
_SC_CLK_TCK
};
extern long sysconf(int name);
enum {
_PC_2_SYMLINKS,
_PC_ALLOC_SIZE_MIN,
_PC_ASYNC_IO,
_PC_CHOWN_RESTRICTED,
_PC_FILESIZEBITS,
_PC_LINK_MAX,
_PC_MAX_CANON,
_PC_MAX_INPUT,
_PC_NAME_MAX,
_PC_NO_TRUNC,
_PC_PATH_MAX,
_PC_PIPE_BUF,
_PC_PRIO_IO,
_PC_REC_INCR_XFER_SIZE,
_PC_REC_MIN_XFER_SIZE,
_PC_REC_XFER_ALIGN,
_PC_SYMLINK_MAX,
_PC_SYNC_IO,
_PC_VDISABLE
};
extern long pathconf(const char *path, int name);
extern pid_t fork(void);
extern int execv(const char *path, char *const argv[]);
extern int execvp(const char *file, char *const argv[]);
extern int pipe(int fildes[2]);
extern unsigned int alarm(unsigned int);
__C_DECLS_END;
#endif
HelenOS homepage, sources at GitHub