home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1999 February
/
MACPOWER-1999-02.ISO.7z
/
MACPOWER-1999-02.ISO
/
9902⁄AMUG
/
UTILITY
/
mac06-0.95.sit
/
mac06-0.95
/
usr
/
include
/
unistd.h
< prev
next >
Wrap
Text File
|
1998-11-08
|
3KB
|
90 lines
/* mac06ゥ1997,98 by HNS/DSITRI hns@computer.org
** unistd.h
*/
#pragma once
#include "size_t.h"
#ifndef SEEK_SET
#define SEEK_SET (0)
#define SEEK_CUR (1)
#define SEEK_END (2)
#endif
#define STDIN_FILENO (0)
#define STDOUT_FILENO (1)
#define STDERR_FILENO (2)
#define R_OK (4)
#define W_OK (2)
#define X_OK (1)
#define F_OK (0)
#define L_ctermid 32
int _exit(int code);
int access(const char *name, int mode);
unsigned int alarm(unsigned int seconds);
int chdir(const char *name);
#ifndef _POSIX_SOURCE
int chroot(const char *name);
#endif
int close(int fd);
char *ctermid(char *buf);
int dup(int fd);
int dup2(int old, int nw);
int execl(const char *name, char *arg, ...);
int execle(const char *name, char *arg, ...); /* last is char **envp */
int execlp(const char *name, char *arg, ...);
int execv(const char *name, char *argv[]);
int execve(const char *name, char *argv[], char *envp[]);
int execvp(const char *name, char *argv[]);
int fork(void);
#ifndef _POSIX_SOURCE
int forkexec(const char *name, char *argv[], char *envp[], long fd[]);
int fsync(int fd);
#endif
char *getcwd(char *buf, int buflen);
int getuid(void);
int getgid(void);
char *getlogin(void);
int getpid(void);
int getppid(void);
int isatty(int fd);
int link(const char *old, const char *nw);
int lseek(int fd, long pos, int where);
#ifndef _POSIX_SOURCE
int mount(const char *name, const char *device, const char *filesys);
int nice(int prio);
#endif
int pause(void);
int pipe(int fd[2]);
ssize_t read(int fd, void *bfr, size_t len);
int rmdir(const char *name);
#ifndef _POSIX_SOURCE
char *searchpath(const char *p, const char *name, int mode);
#include "limits.h"
#include "string.h"
#define FD_SETSIZE OPEN_MAX
typedef unsigned long fd_set[FD_SETSIZE/8*sizeof(unsigned long)];
#define FD_CLR(fd, fdset) (fdset)[(fd)/(8*sizeof(fdset[0]))] &= ~(1<<((fd)&(8*sizeof(fdset[0])-1)))
#define FD_SET(fd, fdset) (fdset)[(fd)/(8*sizeof(fdset[0]))] |= (1<<((fd)&(8*sizeof(fdset[0])-1)))
#define FD_ISSET(fd, fdset) (((fdset)[(fd)/(8*sizeof(fdset[0]))] & (1<<((fd)&(8*sizeof(fdset[0])-1)))) != 0)
#define FD_ZERO(fdset) (memset(fdset, 0, sizeof(fdset)/sizeof((fdset)[0])))
int select(int nfds, fd_set rfds, fd_set wfds, fd_set efds, struct timeval *timeout);
#endif
int setgid();
int setuid();
unsigned int sleep(unsigned int seconds);
#ifndef _POSIX_SOURCE
int sync(void);
#endif
char *ttyname(int fd);
#ifndef _POSIX_SOURCE
int umount(const char *name);
#endif
int unlink(const char *name);
ssize_t write(int fd, const void *bfr, size_t len);
/* EOF */