#ifndef _UNISTD_H #define _UNISTD_H /* see Posix standard -- 1003.1 sect 2.10 */ #ifndef F_OK /* file access stuff */ #define F_OK 0 #define X_OK 1 #define W_OK 2 #define R_OK 4 #endif #ifndef SEEK_SET /* lseek() origins */ #define SEEK_SET 0 /* from beginning of file */ #define SEEK_CUR 1 /* from current location */ #define SEEK_END 2 /* from end of file */ #endif /* 1003.1 section 8.2.1.2 */ #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #if 0 extern void _exit(int); /* of course it exits, but don't use it */ #endif extern int access(const char *name, int amode); extern int chdir(const char *pathname); extern int close(int handle); extern int dup(int handle); extern int dup2(int handle1, int handle2); /* not a standard function */ extern long fsize(char *name); extern char *getcwd(char *buffer, int size); /* not a standard function */ extern void cwd(char *buffer); /* not a standard function */ int getopt(int argc, char **argv, char *optstring) extern int isatty(int handle); extern long lseek(int handle, long offset, int origin)); #if 0 /* not a standard function */ extern char *mktemp(char *pattern); #endif extern int rmdir(const char *pathname); extern int read(int handle, void *data, int length); /* not a standard function */ extern long lread(int handle, void *data, long length)); /* not a standard function */ extern unsigned sleep(unsigned int seconds); /* not a standard function */ extern int stime(long *rawtime); /* not a standard function */ extern long tell(int handle); extern int unlink(char *filename); extern int write(int handle, const void *data, int length)); /* not a standard function */ extern long lwrite(int handle, const void *data, long length)); /* not a standard function */ extern void usleep (unsigned long usec)); /* * fork exec wait * not at all standard but replacements for fork/exec... pairs * with no Mint running; same arguments as for standard exec functions */ int forkl(char *program, char *arg0, ...); int forkv(char *program, char **argv); int forklp(char *program, char *arg0, ...); int forkvp(char *program, char **argv); int forkle(char *program, char *arg0, ...); int forklpe(char *program, char *arg0, ...); int forkve(char *program, char **argv, char **envp); int forkvpe(char *program, char **argv, char **envp); /* provided for compatibility with older versions, * although the names have changed!! */ int forkvep(char *program, **argv, *envp); int forkvpep(char *program, **argv, *envp); int wait(int *rvp); #endif /* _UNISTD_H */