Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1989-1996 Microsoft Corporation
  3. Module Name:
  4. unistd.h
  5. Abstract:
  6. This module contains the "symbolic constants and structures referenced
  7. elsewhere in the standard" IEEE P1003.1/Draft 13.
  8. --*/
  9. #ifndef _UNISTD_
  10. #define _UNISTD_
  11. #include <sys/types.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define STDIN_FILENO 0
  16. #define STDOUT_FILENO 1
  17. #define STDERR_FILENO 2
  18. /*
  19. * Section 2.9.1
  20. */
  21. #define F_OK 00
  22. #define X_OK 01
  23. #define W_OK 02
  24. #define R_OK 04
  25. /*
  26. * Section 2.9.2
  27. */
  28. #define SEEK_SET 0
  29. #define SEEK_CUR 1
  30. #define SEEK_END 2
  31. /*
  32. * Section 2.9.3
  33. */
  34. #define _POSIX_JOB_CONTROL
  35. #define _POSIX_VERSION 199009L
  36. #define _POSIX_SAVED_IDS
  37. /*
  38. * Section 2.9.4
  39. */
  40. #define _POSIX_CHOWN_RESTRICTED 1
  41. #define _POSIX_NO_TRUNC 1
  42. #define _POSIX_VDISABLE 0
  43. /*
  44. * Section 4.8.1
  45. * sysconf 'name' values
  46. */
  47. #define _SC_ARG_MAX 1
  48. #define _SC_CHILD_MAX 2
  49. #define _SC_CLK_TCK 3
  50. #define _SC_NGROUPS_MAX 4
  51. #define _SC_OPEN_MAX 5
  52. #define _SC_JOB_CONTROL 6
  53. #define _SC_SAVED_IDS 7
  54. #define _SC_STREAM_MAX 8
  55. #define _SC_TZNAME_MAX 9
  56. #define _SC_VERSION 10
  57. /*
  58. * Section 5.7.1
  59. * pathconf and fpathconf 'name' values
  60. */
  61. #define _PC_LINK_MAX 1
  62. #define _PC_MAX_CANON 2
  63. #define _PC_MAX_INPUT 3
  64. #define _PC_NAME_MAX 4
  65. #define _PC_PATH_MAX 5
  66. #define _PC_PIPE_BUF 6
  67. #define _PC_CHOWN_RESTRICTED 7
  68. #define _PC_NO_TRUNC 8
  69. #define _PC_VDISABLE 9
  70. #ifndef NULL
  71. #define NULL ((void *)0)
  72. #endif
  73. /*
  74. * Function Prototypes
  75. */
  76. pid_t __cdecl fork(void);
  77. int __cdecl execl(const char *, const char *, ...);
  78. int __cdecl execv(const char *, char * const []);
  79. int __cdecl execle(const char *, const char *arg, ...);
  80. int __cdecl execve(const char *, char * const [], char * const []);
  81. int __cdecl execlp(const char *, const char *, ...);
  82. int __cdecl execvp(const char *, char * const []);
  83. #if _MSC_VER >= 1200
  84. __declspec(noreturn) void __cdecl _exit(int);
  85. #else
  86. void __cdecl _exit(int);
  87. #endif
  88. unsigned int __cdecl alarm(unsigned int);
  89. int __cdecl pause(void);
  90. unsigned int __cdecl sleep(unsigned int);
  91. pid_t __cdecl getpid(void);
  92. pid_t __cdecl getppid(void);
  93. uid_t __cdecl getuid(void);
  94. uid_t __cdecl geteuid(void);
  95. gid_t __cdecl getgid(void);
  96. gid_t __cdecl getegid(void);
  97. int __cdecl setuid(uid_t);
  98. int __cdecl setgid(gid_t);
  99. int __cdecl getgroups(int gidsetsize, gid_t grouplist[]);
  100. char *__cdecl getlogin(void);
  101. pid_t __cdecl getpgrp(void);
  102. pid_t __cdecl setsid(void);
  103. int __cdecl setpgid(pid_t, pid_t);
  104. struct utsname;
  105. int __cdecl uname(struct utsname *);
  106. time_t __cdecl time(time_t *);
  107. char * __cdecl getenv(const char *);
  108. char * __cdecl ctermid(char *s);
  109. char * __cdecl ttyname(int);
  110. int __cdecl isatty(int);
  111. long __cdecl sysconf(int);
  112. int __cdecl chdir(const char *);
  113. char * __cdecl getcwd(char *, size_t);
  114. int __cdecl link(const char *, const char *);
  115. int __cdecl unlink(const char *);
  116. int __cdecl rmdir(const char *);
  117. int __cdecl rename(const char *, const char *);
  118. int __cdecl access(const char *, int);
  119. int __cdecl chown(const char *, uid_t, gid_t);
  120. struct utimbuf;
  121. int __cdecl utime(const char *, const struct utimbuf *);
  122. long __cdecl pathconf(const char *, int);
  123. long __cdecl fpathconf(int, int);
  124. int __cdecl pipe(int *);
  125. int __cdecl dup(int);
  126. int __cdecl dup2(int, int);
  127. int __cdecl close(int);
  128. ssize_t __cdecl read(int, void *, unsigned int);
  129. ssize_t __cdecl write(int, const void *, unsigned int);
  130. off_t __cdecl lseek(int, off_t, int);
  131. char * __cdecl cuserid(char *);
  132. #ifdef __cplusplus
  133. }
  134. #endif
  135. #endif /* _UNISTD_ */