diff options
author | alex <alex@FreeBSD.org> | 1998-01-08 00:27:34 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1998-01-08 00:27:34 +0000 |
commit | 6734c6448e85c13b81bb87a6069a04da403892ff (patch) | |
tree | da2924ad70562445e7c21ed3217313ff8f134a4c | |
parent | 0ff0dd536e5e01a184b9933d4f9909c353a533da (diff) | |
download | FreeBSD-src-6734c6448e85c13b81bb87a6069a04da403892ff.zip FreeBSD-src-6734c6448e85c13b81bb87a6069a04da403892ff.tar.gz |
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
-rw-r--r-- | sys/i386/include/ansi.h | 5 | ||||
-rw-r--r-- | 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 964955f..cf51319 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 767a1be..68dfcaf 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 */ |