aboutsummaryrefslogtreecommitdiffstats
path: root/include/unistd.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-02 17:49:40 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-02 17:49:40 +0200
commitc8390a6ca33fe0d7271392e27342ae3576414fe9 (patch)
treeb603a100aa31a5e4f1a42e222b21748a300bf8a3 /include/unistd.h
parentadd EXIT_SUCCESS and EXIT_FAILURE (diff)
downloadslibc-c8390a6ca33fe0d7271392e27342ae3576414fe9.tar.gz
slibc-c8390a6ca33fe0d7271392e27342ae3576414fe9.tar.bz2
slibc-c8390a6ca33fe0d7271392e27342ae3576414fe9.tar.xz
add intptr_t, useconds_t, NULL and STD*_FILENO to unistd.h
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include/unistd.h')
-rw-r--r--include/unistd.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 85c34d5..f651867 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -29,10 +29,39 @@
#define __NEED_off_t /* TODO not implement */
#define __NEED_pid_t /* TODO not implement */
#define __NEED_ptrdiff_t
+#define __NEED_intptr_t
+#define __NEED_useconds_t /* TODO not implement */
#include <bits/types.h>
/**
+ * `NULL`'s canonical header is <stddef.h>.
+ */
+#ifndef NULL
+# define NULL ((void*)0)
+#endif
+
+
+/**
+ * The file descriptor for stdin.
+ * The file with input.
+ */
+#define STDIN_FILENO 0
+
+/**
+ * The file descriptor for stdout.
+ * The file for output.
+ */
+#define STDOUT_FILENO 1
+
+/**
+ * The file descriptor for stderr.
+ * The file for error messages and warnings.
+ */
+#define STDERR_FILENO 2
+
+
+/**
* Set the high end of the calling process's
* data segment.
*