summaryrefslogtreecommitdiffstats
path: root/include/unistd.h
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-04-01 08:12:25 +0000
committermike <mike@FreeBSD.org>2002-04-01 08:12:25 +0000
commitbeecc37c73ebf8cf27e26fe5fc3a80fd02535ac4 (patch)
treeeff013810ee5bdc57f51e401f7ec54272cb4fafe /include/unistd.h
parentf4cfa354ba07ca7cd849efb0cff903ac831f247a (diff)
downloadFreeBSD-src-beecc37c73ebf8cf27e26fe5fc3a80fd02535ac4.zip
FreeBSD-src-beecc37c73ebf8cf27e26fe5fc3a80fd02535ac4.tar.gz
o Implement <sys/_types.h>, a new header for storing types that are
MI, not required to be a fixed size, and used in multiple headers. This will grow in time, as more things move here from <sys/types.h> and <machine/ansi.h>. o Add missing type definitions (uint16_t and uint32_t) to <arpa/inet.h> and <netinet/in.h>. o Reduce pollution in <sys/types.h> by using `#if _FOO_T_DECLARED' widgets to avoid including <sys/stdint.h>. o Add some missing type definitions to <unistd.h> and note the ones that still need to be added. o Make use of <sys/_types.h> primitives in <grp.h> and <sys/types.h>. Reviewed by: bde
Diffstat (limited to 'include/unistd.h')
-rw-r--r--include/unistd.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 3819e57..5538d11 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -38,8 +38,33 @@
#define _UNISTD_H_
#include <sys/cdefs.h>
-#include <sys/types.h>
+#include <sys/types.h> /* XXX adds too much pollution. */
#include <sys/unistd.h>
+#include <sys/_types.h>
+
+#ifdef _BSD_GID_T_
+typedef _BSD_GID_T_ gid_t;
+#undef _BSD_GID_T_
+#endif
+
+#ifdef _BSD_SIZE_T_
+typedef _BSD_SIZE_T_ size_t;
+#undef _BSD_SIZE_T_
+#endif
+
+#ifdef _BSD_SSIZE_T_
+typedef _BSD_SSIZE_T_ ssize_t;
+#undef _BSD_SSIZE_T_
+#endif
+
+#ifdef _BSD_UID_T_
+typedef _BSD_UID_T_ uid_t;
+#undef _BSD_UID_T_
+#endif
+
+/*
+ * XXX missing type definitions for off_t, pid_t and useconds_t.
+ */
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
OpenPOWER on IntegriCloud