vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

unistd.h (1146B)


      1 #ifndef _UNISTD_H_
      2 #define _UNISTD_H_
      3 
      4 #include <stdint.h>
      5 #include <sys/types.h>
      6 
      7 #define STDIN_FILENO	0
      8 #define STDOUT_FILENO	1
      9 #define STDERR_FILENO	2
     10 
     11 #ifndef SEEK_SET
     12 #define SEEK_SET	0
     13 #define SEEK_CUR	1
     14 #define SEEK_END	2
     15 #endif
     16 
     17 
     18 // File and directory operations
     19 int unlink(const char *path);
     20 int remove(const char *path);
     21 int rmdir(const char *path);
     22 
     23 // File I/O
     24 ssize_t read(int fd, void *buf, size_t size);
     25 ssize_t write(int fd, const void *buf, size_t size);
     26 off_t lseek(int fildes, off_t offset, int whence);
     27 
     28 // File descriptor handling
     29 int dup(int oldfd);
     30 int dup2(int oldfd, int newfd);
     31 void *sbrk(intptr_t increment);
     32 int close(int);
     33 
     34 void _exit(int status);
     35 int execl(const char *path, const char *arg, ...);
     36 int execv(const char *path, char *const argv[]);
     37 int execve(const char *path, char *const argv[], char *const env[]);
     38 int execlp(const char *path, const char *arg, ...);
     39 int execvp(const char *path, char *const argv[]);
     40 
     41 extern char **environ;
     42 
     43 char *getcwd(char*, size_t);
     44 
     45 uid_t getuid(void);
     46 uid_t geteuid(void);
     47 gid_t getgid(void);
     48 gid_t getegid(void);
     49 pid_t getpid(void);
     50 
     51 pid_t fork(void);
     52 
     53 #endif	// _UNISTD_H_