00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _ABLE_CLIB_UNISTD_H
00030 #define _ABLE_CLIB_UNISTD_H 1
00031
00032 #include <sys/time.h>
00033
00034
00035
00036 #include <sys/select.h>
00037
00047 extern int close(int fd);
00048
00064 extern int dup2(int oldfd, int newfd);
00065
00082 extern int dup(int oldfd);
00083
00095 extern int pipe(int *pipefd);
00096
00113 extern ssize_t read(int fd, void *data, size_t size);
00114
00131 extern ssize_t write(int fd, const void *data, size_t size);
00132
00149 extern off64_t lseek64(int fd, off64_t off, int whence);
00150
00167 extern off_t lseek(int fd, off_t offset, int whence);
00168
00179 extern ssize_t readlink(const char *path, char *buf, size_t bufsiz);
00180
00183 extern char *getcwd(char *buf, size_t size);
00184
00185 #if ! defined(__STDIO_H)
00186 #define SEEK_SET (0)
00187 #define SEEK_CUR (1)
00188 #define SEEK_END (2)
00189 #endif
00190
00191
00192
00193
00194 #define R_OK 4
00195 #define W_OK 2
00196 #define X_OK 1
00197 #define F_OK 0
00198
00201 extern void _exit(int status);
00202
00220 extern int getopt(int argc, char * const *argv, const char *options);
00221
00222
00223 extern char *optarg;
00224 extern int opterr;
00225 extern int optind;
00226 extern int optopt;
00238 extern int access(const char *pathname, int mode);
00239
00245 extern int isatty(int desc);
00246
00252 extern unsigned int sleep(unsigned int seconds);
00253
00254 #endif