diff options
Diffstat (limited to 'posix/sys')
-rw-r--r-- | posix/sys/times.h | 2 | ||||
-rw-r--r-- | posix/sys/types.h | 29 | ||||
-rw-r--r-- | posix/sys/utsname.h | 5 | ||||
-rw-r--r-- | posix/sys/wait.h | 8 |
4 files changed, 29 insertions, 15 deletions
diff --git a/posix/sys/times.h b/posix/sys/times.h index eea9e3502c..6f2838d6f1 100644 --- a/posix/sys/times.h +++ b/posix/sys/times.h @@ -21,8 +21,8 @@ */ #ifndef _SYS_TIMES_H - #define _SYS_TIMES_H 1 + #include <features.h> #define __need_clock_t diff --git a/posix/sys/types.h b/posix/sys/types.h index ffeeee1ff0..f49c996a04 100644 --- a/posix/sys/types.h +++ b/posix/sys/types.h @@ -21,13 +21,13 @@ */ #ifndef _SYS_TYPES_H - #define _SYS_TYPES_H 1 + #include <features.h> __BEGIN_DECLS -#include <gnu/types.h> +#include <bits/types.h> #ifdef __USE_BSD typedef __u_char u_char; @@ -80,16 +80,25 @@ typedef unsigned int uint; #if !defined (__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 7 +/* These types are defined by the ISO C 9x header <inttypes.h>. */ +#ifndef __int8_t_defined +#define __int8_t_defined typedef char int8_t; -typedef unsigned char u_int8_t; typedef short int int16_t; -typedef unsigned short int u_int16_t; typedef int int32_t; -typedef unsigned int u_int32_t; #ifdef __GNUC__ typedef long long int int64_t; +#endif +#endif + +/* But these were defined by ISO C without the first `_'. */ +typedef unsigned char u_int8_t; +typedef unsigned short int u_int16_t; +typedef unsigned int u_int32_t; +#ifdef __GNUC__ typedef unsigned long long int u_int64_t; #endif + typedef int register_t; #else @@ -100,13 +109,17 @@ typedef int register_t; #define __u_intN_t(N, MODE) \ typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE))) +#ifndef __int8_t_defined +#define __int8_t_defined __intN_t (8, __QI__); -__u_intN_t (8, __QI__); __intN_t (16, __HI__); -__u_intN_t (16, __HI__); __intN_t (32, __SI__); -__u_intN_t (32, __SI__); __intN_t (64, __DI__); +#endif + +__u_intN_t (8, __QI__); +__u_intN_t (16, __HI__); +__u_intN_t (32, __SI__); __u_intN_t (64, __DI__); typedef int register_t __attribute__ ((__mode__ (__word__))); diff --git a/posix/sys/utsname.h b/posix/sys/utsname.h index e9891609bc..bebef5d456 100644 --- a/posix/sys/utsname.h +++ b/posix/sys/utsname.h @@ -21,13 +21,14 @@ */ #ifndef _SYS_UTSNAME_H - #define _SYS_UTSNAME_H 1 + #include <features.h> __BEGIN_DECLS -#include <utsnamelen.h> +#include <bits/utsname.h> + #ifndef _UTSNAME_NODENAME_LENGTH #define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH #endif diff --git a/posix/sys/wait.h b/posix/sys/wait.h index a13b825638..f573d778f7 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -21,17 +21,17 @@ */ #ifndef _SYS_WAIT_H - #define _SYS_WAIT_H 1 + #include <features.h> __BEGIN_DECLS -#include <gnu/types.h> +#include <bits/types.h> /* This will define the `W*' macros for the flag bits to `waitpid', `wait3', and `wait4'. */ -#include <waitflags.h> +#include <bits/waitflags.h> #ifdef __USE_BSD @@ -79,7 +79,7 @@ typedef union #endif /* Use BSD. */ /* This will define all the `__W*' macros. */ -#include <waitstatus.h> +#include <bits/waitstatus.h> #define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status)) #define WTERMSIG(status) __WTERMSIG(__WAIT_INT(status)) |