aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2024-07-10 17:05:02 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-07-10 22:35:17 +0200
commitc8567996129024d3ea0b6a31635bbb1d77e6e29c (patch)
tree822153585c1daf3330a53b7043361e139075633c /include
parent97c589d0919cbb5b11156fa973b803fca3275af8 (diff)
downloadgnumach-c8567996129024d3ea0b6a31635bbb1d77e6e29c.tar.gz
gnumach-c8567996129024d3ea0b6a31635bbb1d77e6e29c.tar.bz2
gnumach-c8567996129024d3ea0b6a31635bbb1d77e6e29c.zip
Include stddef.h in sys/types.h to get size_t and NULL.
Remove unnecessary definitions from sys/types.h. Message-ID: <oitneneybjishhqq7bgedkasrqqd6nq7vselruaacw27sbe47e@6rt3xbi7fnie>
Diffstat (limited to 'include')
-rw-r--r--include/sys/types.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/include/sys/types.h b/include/sys/types.h
index 8d5af37a..82b2e4d9 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -28,16 +28,7 @@
#include <mach/machine/vm_types.h>
#include <stdint.h>
-
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef unsigned long size_t;
-#endif
-
-#ifndef _SSIZE_T
-#define _SSIZE_T
-typedef integer_t ssize_t;
-#endif
+#include <stddef.h> /* for size_t and NULL */
typedef unsigned short dev_t; /* device id */
typedef unsigned long gid_t; /* group id */
@@ -50,15 +41,11 @@ typedef unsigned long uid_t; /* user id */
/* Symbols allowed but not required by POSIX */
-typedef char * caddr_t; /* address of a (signed) char */
-
#ifndef _TIME_T
#define _TIME_T
typedef unsigned long long time_t;
#endif
-#define RAND_MAX 0x7fffffff
-
/* Symbols not allowed by POSIX */
#ifndef _POSIX_SOURCE
@@ -71,18 +58,10 @@ typedef unsigned short u_short; /* unsigned short */
typedef unsigned int u_int; /* unsigned int */
typedef unsigned long u_long; /* unsigned long */
-typedef unsigned int daddr_t; /* disk address */
-
#define major(i) (((i) >> 8) & 0xFF)
#define minor(i) ((i) & 0xFF)
#define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
-#define NBBY 8
-
-#ifndef NULL
-#define NULL ((void *) 0) /* the null pointer */
-#endif
-
#endif /* _POSIX_SOURCE */
#endif /* _MACH_SA_SYS_TYPES_H_ */