summaryrefslogtreecommitdiffstats
path: root/sys/sys/stdint.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 /sys/sys/stdint.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 'sys/sys/stdint.h')
-rw-r--r--sys/sys/stdint.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h
index d7ee353..1697271 100644
--- a/sys/sys/stdint.h
+++ b/sys/sys/stdint.h
@@ -34,15 +34,45 @@
#include <machine/ansi.h>
#include <machine/limits.h>
+#ifndef _INT8_T_DECLARED
typedef __int8_t int8_t;
+#define _INT8_T_DECLARED
+#endif
+
+#ifndef _INT16_T_DECLARED
typedef __int16_t int16_t;
+#define _INT16_T_DECLARED
+#endif
+
+#ifndef _INT32_T_DECLARED
typedef __int32_t int32_t;
+#define _INT32_T_DECLARED
+#endif
+
+#ifndef _INT64_T_DECLARED
typedef __int64_t int64_t;
+#define _INT64_T_DECLARED
+#endif
+#ifndef _UINT8_T_DECLARED
typedef __uint8_t uint8_t;
+#define _UINT8_T_DECLARED
+#endif
+
+#ifndef _UINT16_T_DECLARED
typedef __uint16_t uint16_t;
+#define _UINT16_T_DECLARED
+#endif
+
+#ifndef _UINT32_T_DECLARED
typedef __uint32_t uint32_t;
+#define _UINT32_T_DECLARED
+#endif
+
+#ifndef _UINT64_T_DECLARED
typedef __uint64_t uint64_t;
+#define _UINT64_T_DECLARED
+#endif
typedef __int_least8_t int_least8_t;
typedef __int_least16_t int_least16_t;
@@ -67,8 +97,11 @@ typedef __uint_fast64_t uint_fast64_t;
typedef __intmax_t intmax_t;
typedef __uintmax_t uintmax_t;
+#ifndef _INTPTR_T_DECLARED
typedef __intptr_t intptr_t;
typedef __uintptr_t uintptr_t;
+#define _INTPTR_T_DECLARED
+#endif
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
#define INT8_C(c) __INT8_C(c)
OpenPOWER on IntegriCloud