Change {u,}int_fast{8,16}_t to 32-bit types, as the previous minimum-

width implementation was a rather poor choice.  Per discussion with
Charles Hannum.

Note: While this is technically an ABI change I believe it is a
change that we can afford at this time (and to be pulled up to
2.0).  The types are not widely used yet, and a survey of pkgsrc
has not shown uses that would be adversely affected by it.
This commit is contained in:
kleink 2004-05-21 22:52:06 +00:00
parent 4c2512fd51
commit dd80e25e65
3 changed files with 23 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_fmtio.h,v 1.4 2003/05/30 11:07:38 kleink Exp $ */
/* $NetBSD: int_fmtio.h,v 1.5 2004/05/21 22:52:06 kleink Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -147,8 +147,8 @@
#define SCNdLEAST16 "hd" /* int_least16_t */
#define SCNdLEAST32 "d" /* int_least32_t */
#define SCNdLEAST64 "lld" /* int_least64_t */
#define SCNdFAST8 "hhd" /* int_fast8_t */
#define SCNdFAST16 "hd" /* int_fast16_t */
#define SCNdFAST8 "d" /* int_fast8_t */
#define SCNdFAST16 "d" /* int_fast16_t */
#define SCNdFAST32 "d" /* int_fast32_t */
#define SCNdFAST64 "lld" /* int_fast64_t */
#define SCNdMAX "lld" /* intmax_t */
@ -162,8 +162,8 @@
#define SCNiLEAST16 "hi" /* int_least16_t */
#define SCNiLEAST32 "i" /* int_least32_t */
#define SCNiLEAST64 "lli" /* int_least64_t */
#define SCNiFAST8 "hhi" /* int_fast8_t */
#define SCNiFAST16 "hi" /* int_fast16_t */
#define SCNiFAST8 "i" /* int_fast8_t */
#define SCNiFAST16 "i" /* int_fast16_t */
#define SCNiFAST32 "i" /* int_fast32_t */
#define SCNiFAST64 "lli" /* int_fast64_t */
#define SCNiMAX "lli" /* intmax_t */
@ -179,8 +179,8 @@
#define SCNoLEAST16 "ho" /* uint_least16_t */
#define SCNoLEAST32 "o" /* uint_least32_t */
#define SCNoLEAST64 "llo" /* uint_least64_t */
#define SCNoFAST8 "hho" /* uint_fast8_t */
#define SCNoFAST16 "ho" /* uint_fast16_t */
#define SCNoFAST8 "o" /* uint_fast8_t */
#define SCNoFAST16 "o" /* uint_fast16_t */
#define SCNoFAST32 "o" /* uint_fast32_t */
#define SCNoFAST64 "llo" /* uint_fast64_t */
#define SCNoMAX "llo" /* uintmax_t */
@ -194,8 +194,8 @@
#define SCNuLEAST16 "hu" /* uint_least16_t */
#define SCNuLEAST32 "u" /* uint_least32_t */
#define SCNuLEAST64 "llu" /* uint_least64_t */
#define SCNuFAST8 "hhu" /* uint_fast8_t */
#define SCNuFAST16 "hu" /* uint_fast16_t */
#define SCNuFAST8 "u" /* uint_fast8_t */
#define SCNuFAST16 "u" /* uint_fast16_t */
#define SCNuFAST32 "u" /* uint_fast32_t */
#define SCNuFAST64 "llu" /* uint_fast64_t */
#define SCNuMAX "llu" /* uintmax_t */
@ -209,8 +209,8 @@
#define SCNxLEAST16 "hx" /* uint_least16_t */
#define SCNxLEAST32 "x" /* uint_least32_t */
#define SCNxLEAST64 "llx" /* uint_least64_t */
#define SCNxFAST8 "hhx" /* uint_fast8_t */
#define SCNxFAST16 "hx" /* uint_fast16_t */
#define SCNxFAST8 "x" /* uint_fast8_t */
#define SCNxFAST16 "x" /* uint_fast16_t */
#define SCNxFAST32 "x" /* uint_fast32_t */
#define SCNxFAST64 "llx" /* uint_fast64_t */
#define SCNxMAX "llx" /* uintmax_t */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_limits.h,v 1.3 2004/05/08 21:51:49 kleink Exp $ */
/* $NetBSD: int_limits.h,v 1.4 2004/05/21 22:52:06 kleink Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -86,20 +86,20 @@
/* 7.18.2.3 Limits of fastest minimum-width integer types */
/* minimum values of fastest minimum-width signed integer types */
#define INT_FAST8_MIN (-0x7f-1) /* int_fast8_t */
#define INT_FAST16_MIN (-0x7fff-1) /* int_fast16_t */
#define INT_FAST8_MIN (-0x7fffffff-1) /* int_fast8_t */
#define INT_FAST16_MIN (-0x7fffffff-1) /* int_fast16_t */
#define INT_FAST32_MIN (-0x7fffffff-1) /* int_fast32_t */
#define INT_FAST64_MIN (-0x7fffffffffffffffLL-1) /* int_fast64_t */
/* maximum values of fastest minimum-width signed integer types */
#define INT_FAST8_MAX 0x7f /* int_fast8_t */
#define INT_FAST16_MAX 0x7fff /* int_fast16_t */
#define INT_FAST8_MAX 0x7fffffff /* int_fast8_t */
#define INT_FAST16_MAX 0x7fffffff /* int_fast16_t */
#define INT_FAST32_MAX 0x7fffffff /* int_fast32_t */
#define INT_FAST64_MAX 0x7fffffffffffffffLL /* int_fast64_t */
/* maximum values of fastest minimum-width unsigned integer types */
#define UINT_FAST8_MAX 0xffU /* uint_fast8_t */
#define UINT_FAST16_MAX 0xffffU /* uint_fast16_t */
#define UINT_FAST8_MAX 0xffffffffU /* uint_fast8_t */
#define UINT_FAST16_MAX 0xffffffffU /* uint_fast16_t */
#define UINT_FAST32_MAX 0xffffffffU /* uint_fast32_t */
#define UINT_FAST64_MAX 0xffffffffffffffffULL /* uint_fast64_t */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_mwgwtypes.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ */
/* $NetBSD: int_mwgwtypes.h,v 1.3 2004/05/21 22:52:06 kleink Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -63,10 +63,10 @@ typedef unsigned long long int uint_least64_t;
/* 7.18.1.3 Fastest minimum-width integer types */
typedef __signed char int_fast8_t;
typedef unsigned char uint_fast8_t;
typedef short int int_fast16_t;
typedef unsigned short int uint_fast16_t;
typedef int int_fast8_t;
typedef unsigned int uint_fast8_t;
typedef int int_fast16_t;
typedef unsigned int uint_fast16_t;
typedef int int_fast32_t;
typedef unsigned int uint_fast32_t;
#ifdef __COMPILER_INT64__