unistd.h 581 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __GBLIBC_UNISTD_H_
  2. #define __GBLIBC_UNISTD_H_
  3. #include <sys/types.h>
  4. #undef STDOUT_FILENO
  5. #undef STDIN_FILENO
  6. #undef STDERR_FILENO
  7. #define STDOUT_FILENO (0)
  8. #define STDIN_FILENO (0)
  9. #define STDERR_FILENO (0)
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. ssize_t read(int fd, void* buf, size_t count);
  14. ssize_t write(int fd, const void* buf, size_t count);
  15. void __attribute__((noreturn)) _exit(int code);
  16. pid_t fork(void);
  17. int execve(const char* pathname, char* const argv[], char* const envp[]);
  18. unsigned int sleep(unsigned int seconds);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif