From f40d43ad1a8690cf3ad71a7e4e81f6a3312c3e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Tue, 18 Feb 2003 18:42:43 +0000 Subject: Define u_char et al. from . The __dietlibc_u_char mechanism is here to ensure we are not redefining types, if we were to compile programs with -D_BSD_SOURCE (u_char et al. are defined in int that case). --- mdk-stage1/dietlibc/include/rpc/types.h | 10 ++++++++++ mdk-stage1/dietlibc/include/sys/types.h | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/mdk-stage1/dietlibc/include/rpc/types.h b/mdk-stage1/dietlibc/include/rpc/types.h index 0e4f0b0e7..d4be65e38 100644 --- a/mdk-stage1/dietlibc/include/rpc/types.h +++ b/mdk-stage1/dietlibc/include/rpc/types.h @@ -59,6 +59,16 @@ typedef unsigned long rpcport_t; #ifndef makedev /* ie, we haven't already included it */ #include #endif + +# ifndef __dietlibc_u_char_defined +typedef char* caddr_t; +typedef uint32_t u_long; +typedef unsigned char u_char; +typedef unsigned short u_short; +typedef unsigned int u_int; +# define __dietlibc_u_char_defined +#endif + #include #include diff --git a/mdk-stage1/dietlibc/include/sys/types.h b/mdk-stage1/dietlibc/include/sys/types.h index 6bd483e50..eadc1bb65 100644 --- a/mdk-stage1/dietlibc/include/sys/types.h +++ b/mdk-stage1/dietlibc/include/sys/types.h @@ -101,21 +101,24 @@ typedef unsigned short sa_family_t; #ifdef _BSD_SOURCE /* die, BSD, die! */ +typedef uint16_t nshort; +typedef uint32_t ntime; +typedef uint32_t nlong; +typedef uint32_t ulong; +typedef uint16_t n_short; +typedef uint32_t n_time; +typedef uint32_t n_long; +# ifndef __dietlibc_u_char_defined typedef char* caddr_t; +typedef uint32_t u_long; typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; +# define __dietlibc_u_char_defined +# endif typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; -typedef uint32_t u_long; -typedef uint32_t n_long; -typedef uint32_t n_time; -typedef uint16_t n_short; -typedef uint32_t ulong; -typedef uint32_t nlong; -typedef uint32_t ntime; -typedef uint16_t nshort; #endif #ifdef _GNU_SOURCE -- cgit v1.2.1