From eb794faa900add03c36a958bb3172f7d8e878ff1 Mon Sep 17 00:00:00 2001 From: Alexander Langer Date: Thu, 8 Jan 1998 00:27:34 +0000 Subject: [PATCH] Define integer types added by POSIX.1g. We already had int8_t, int16_t, and int32_t -- this adds their unsigned counterparts uint8_t, uint16_t, and uint32_t. Bruce has noted that C9x also defines these types (in a different file), so this may have to be revisited with some ifdefs at a later date. Reviewed by: bde --- sys/i386/include/ansi.h | 5 ++++- sys/sys/types.h | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/i386/include/ansi.h b/sys/i386/include/ansi.h index 964955f3bf86..cf5131992a91 100644 --- a/sys/i386/include/ansi.h +++ b/sys/i386/include/ansi.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ansi.h 8.2 (Berkeley) 1/4/94 - * $Id: ansi.h,v 1.12 1997/02/22 09:33:53 peter Exp $ + * $Id: ansi.h,v 1.13 1997/05/08 13:45:43 peter Exp $ */ #ifndef _MACHINE_ANSI_H_ @@ -55,6 +55,9 @@ #define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */ #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int +#define _BSD_UINT8_T_ unsigned char +#define _BSD_UINT16_T_ unsigned short +#define _BSD_UINT32_T_ unsigned int /* * Types which are fundamental to the implementation and must be used diff --git a/sys/sys/types.h b/sys/sys/types.h index 767a1bec35f4..68dfcaf75cb4 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)types.h 8.6 (Berkeley) 2/19/95 - * $Id: types.h,v 1.21 1997/05/08 13:50:36 peter Exp $ + * $Id: types.h,v 1.22 1997/12/31 01:22:01 alex Exp $ */ #ifndef _SYS_TYPES_H_ @@ -124,6 +124,21 @@ typedef _BSD_TIMER_T_ timer_t; #undef _BSD_TIMER_T_ #endif +#ifdef _BSD_UINT8_T_ +typedef _BSD_UINT8_T_ uint8_t; +#undef _BSD_UINT8_T_ +#endif + +#ifdef _BSD_UINT16_T_ +typedef _BSD_UINT16_T_ uint16_t; +#undef _BSD_UINT16_T_ +#endif + +#ifdef _BSD_UINT32_T_ +typedef _BSD_UINT32_T_ uint32_t; +#undef _BSD_UINT32_T_ +#endif + #ifndef _POSIX_SOURCE #define NBBY 8 /* number of bits in a byte */