summaryrefslogtreecommitdiff
path: root/libc/include/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/unistd.h')
-rw-r--r--libc/include/unistd.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
new file mode 100644
index 0000000..c96f710
--- /dev/null
+++ b/libc/include/unistd.h
@@ -0,0 +1,37 @@
+/* unistd.h <ndf@linux.mit.edu> */
+#include <features.h>
+#include <sys/types.h>
+
+#ifndef __UNISTD_H
+#define __UNISTD_H
+
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+extern int close __P ((int));
+extern size_t read __P ((int __fd, char * __buf, size_t __nbytes));
+extern size_t write __P ((int __fd, __const char * __buf, size_t __n));
+extern off_t lseek __P ((int __fd, off_t __n, int __whence));
+extern int pipe __P ((int __pipedes[2]));
+extern unsigned int alarm __P ((unsigned int __seconds));
+extern unsigned int sleep __P ((unsigned int __seconds));
+extern int pause __P ((void));
+extern char* crypt __P((__const char *__key, __const char *__salt));
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+
+#ifndef R_OK
+#define R_OK 4 /* Test for read permission. */
+#define W_OK 2 /* Test for write permission. */
+#define X_OK 1 /* Test for execute permission. */
+#define F_OK 0 /* Test for existence. */
+#endif
+
+#endif /* __UNISTD_H */
+
+