00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __POSIX_POSIX_H__
00011 #define __POSIX_POSIX_H__ 1
00012
00013
00014
00015 #include <posix/fdesc.h>
00016 #include <posix/dir.h>
00017 #include <posix/fork.h>
00018 #include <posix/nlist.h>
00019 #include <posix/sig.h>
00020 #include <posix/execve.h>
00021 #include <posix/gethostname.h>
00022 #include <posix/mmap.h>
00023
00024
00025 pid_t getpid(void);
00026 pid_t getppid(void);
00027 int setpgrp(pid_t pid, pid_t pgrp);
00028 pid_t getpgrp();
00029 pid_t getpgid(pid_t pid);
00030 int getrlimit(int resource, struct rlimit *rlp);
00031 int setrlimit(int resource, const struct rlimit *rlp);
00032 int kill(pid_t pid, int signum);
00033 int raise(int signum);
00034 int killpg(pid_t pgrp, int sig);
00035 int pause(void);
00036 int nice(int incr);
00037
00038
00039 int access(const char *path, int mode);
00040 int chdir(const char *path);
00041 int chmod(const char *path, mode_t mode);
00042 int close(int);
00043 int creat(const char *path, mode_t mode);
00044 int dup(int oldd);
00045 int dup2(int oldd, int newd);
00046 int fchdir(int fd);
00047 int fchmod(int d, mode_t mode);
00048 int fcntl(int fd, int cmd, ...);
00049 int fstat(int fd, struct stat *sb);
00050 int ftruncate(int d, off_t length);
00051 int ioctl(int d, unsigned long request, void *argp);
00052 int isatty(int d);
00053 int link(const char *path1, const char *path2);
00054 int symlink(const char *name1, const char *name2);
00055 int lstat(const char *path, struct stat *sb);
00056 int mount(const char *type, const char *dir, int flags, void *data);
00057 int open_i(int gate, const char *path, int flags, mode_t mode);
00058 int open(const char *path, int flags, ...);
00059 int readlink(const char *path, char *buf, size_t bufsiz);
00060 int rename(char *oldpath, char *newpath);
00061 int stat(const char *path, struct stat *sb);
00062 int truncate(const char *path, off_t length);
00063 int umount(const char *dir);
00064 int unlink(const char *path);
00065 mode_t umask(mode_t numask);
00066 off_t lseek(int d, off_t offset, int whence);
00067 ssize_t read(int, void *, size_t);
00068 ssize_t readv(int, struct iovec *, int);
00069 ssize_t write(int, const void *, size_t);
00070 ssize_t writev(int, const struct iovec *, int);
00071 int chown(const char *path, uid_t owner, gid_t group);
00072 int lchown(const char *path, uid_t owner, gid_t group);
00073 int fchown(int fd, uid_t owner, gid_t group);
00074 int utimes(const char *path, const struct timeval *times);
00075 int lutimes(const char *path, const struct timeval *times);
00076 int futimes(int fd, const struct timeval *times);
00077 int utime(const char *file, const struct utimbuf *timep);
00078 int geterr(int fd);
00079
00080
00081 int gethostname(char *name, size_t namelen);
00082 int sethostname(const char *name, size_t namelen);
00083 int getdomainname(char *name, size_t namelen);
00084 int setdomainname(const char *name, size_t namelen);
00085 char *getprogname(void);
00086 void setprogname(const char *s);
00087 const char *strerror(int err);
00088 void abort(void);
00089 int getdtablesize();
00090
00091 #define PATH_MAX 1024
00092
00093 #endif