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
This commit is contained in:
Alexander Langer 1998-01-08 00:27:34 +00:00
parent 00bbf86dd5
commit eb794faa90
2 changed files with 20 additions and 2 deletions

View File

@ -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

View File

@ -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 */