summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2001-11-02 18:05:43 +0000
committermike <mike@FreeBSD.org>2001-11-02 18:05:43 +0000
commit3df91ed4db51c6be4fddae3f156823f0bd491a4c (patch)
tree937d4736faa17a6c2aad33562ef0c9e5702ed854 /sys/i386
parenta7cf9dee8f2c4a3ed37613951634d40b9fb66203 (diff)
downloadFreeBSD-src-3df91ed4db51c6be4fddae3f156823f0bd491a4c.zip
FreeBSD-src-3df91ed4db51c6be4fddae3f156823f0bd491a4c.tar.gz
o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>. o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99. o Remove <sys/inttypes.h>. o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h to reflect new location of integer types in <sys/stdint.h>. o Remove previously symbolicly linked <inttypes.h>, instead create a new file. o Add MD headers <machine/_inttypes.h> from NetBSD. o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and include <machine/_inttypes.h> in <inttypes.h>, to fill in the remaining requirements for <inttypes.h>. o Add additional integer types in <machine/ansi.h> and <machine/limits.h> which are included via <sys/stdint.h>. Partially obtain from: NetBSD Tested on: alpha, i386 Discussed on: freebsd-standards@bostonradio.org Reviewed by: bde, fenner, obrien, wollman
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/_inttypes.h220
-rw-r--r--sys/i386/include/_limits.h108
-rw-r--r--sys/i386/include/ansi.h34
-rw-r--r--sys/i386/include/limits.h108
4 files changed, 470 insertions, 0 deletions
diff --git a/sys/i386/include/_inttypes.h b/sys/i386/include/_inttypes.h
new file mode 100644
index 0000000..e02a4a5
--- /dev/null
+++ b/sys/i386/include/_inttypes.h
@@ -0,0 +1,220 @@
+/*-
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Klaus Klein.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $
+ * $FreeBSD$
+ */
+
+#ifndef _MACHINE_INTTYPES_H_
+#define _MACHINE_INTTYPES_H_
+
+/*
+ * Macros for format specifiers.
+ */
+
+/* fprintf(3) macros for signed integers. */
+
+#define PRId8 "d" /* int8_t */
+#define PRId16 "d" /* int16_t */
+#define PRId32 "d" /* int32_t */
+#define PRId64 "lld" /* int64_t */
+#define PRIdLEAST8 "d" /* int_least8_t */
+#define PRIdLEAST16 "d" /* int_least16_t */
+#define PRIdLEAST32 "d" /* int_least32_t */
+#define PRIdLEAST64 "lld" /* int_least64_t */
+#define PRIdFAST8 "d" /* int_fast8_t */
+#define PRIdFAST16 "d" /* int_fast16_t */
+#define PRIdFAST32 "d" /* int_fast32_t */
+#define PRIdFAST64 "lld" /* int_fast64_t */
+#define PRIdMAX "lld" /* intmax_t */
+#define PRIdPTR "d" /* intptr_t */
+
+#define PRIi8 "i" /* int8_t */
+#define PRIi16 "i" /* int16_t */
+#define PRIi32 "i" /* int32_t */
+#define PRIi64 "lli" /* int64_t */
+#define PRIiLEAST8 "i" /* int_least8_t */
+#define PRIiLEAST16 "i" /* int_least16_t */
+#define PRIiLEAST32 "i" /* int_least32_t */
+#define PRIiLEAST64 "lli" /* int_least64_t */
+#define PRIiFAST8 "i" /* int_fast8_t */
+#define PRIiFAST16 "i" /* int_fast16_t */
+#define PRIiFAST32 "i" /* int_fast32_t */
+#define PRIiFAST64 "lli" /* int_fast64_t */
+#define PRIiMAX "lli" /* intmax_t */
+#define PRIiPTR "i" /* intptr_t */
+
+/* fprintf(3) macros for unsigned integers. */
+
+#define PRIo8 "o" /* uint8_t */
+#define PRIo16 "o" /* uint16_t */
+#define PRIo32 "o" /* uint32_t */
+#define PRIo64 "llo" /* uint64_t */
+#define PRIoLEAST8 "o" /* uint_least8_t */
+#define PRIoLEAST16 "o" /* uint_least16_t */
+#define PRIoLEAST32 "o" /* uint_least32_t */
+#define PRIoLEAST64 "llo" /* uint_least64_t */
+#define PRIoFAST8 "o" /* uint_fast8_t */
+#define PRIoFAST16 "o" /* uint_fast16_t */
+#define PRIoFAST32 "o" /* uint_fast32_t */
+#define PRIoFAST64 "llo" /* uint_fast64_t */
+#define PRIoMAX "llo" /* uintmax_t */
+#define PRIoPTR "o" /* uintptr_t */
+
+#define PRIu8 "u" /* uint8_t */
+#define PRIu16 "u" /* uint16_t */
+#define PRIu32 "u" /* uint32_t */
+#define PRIu64 "llu" /* uint64_t */
+#define PRIuLEAST8 "u" /* uint_least8_t */
+#define PRIuLEAST16 "u" /* uint_least16_t */
+#define PRIuLEAST32 "u" /* uint_least32_t */
+#define PRIuLEAST64 "llu" /* uint_least64_t */
+#define PRIuFAST8 "u" /* uint_fast8_t */
+#define PRIuFAST16 "u" /* uint_fast16_t */
+#define PRIuFAST32 "u" /* uint_fast32_t */
+#define PRIuFAST64 "llu" /* uint_fast64_t */
+#define PRIuMAX "llu" /* uintmax_t */
+#define PRIuPTR "u" /* uintptr_t */
+
+#define PRIx8 "x" /* uint8_t */
+#define PRIx16 "x" /* uint16_t */
+#define PRIx32 "x" /* uint32_t */
+#define PRIx64 "llx" /* uint64_t */
+#define PRIxLEAST8 "x" /* uint_least8_t */
+#define PRIxLEAST16 "x" /* uint_least16_t */
+#define PRIxLEAST32 "x" /* uint_least32_t */
+#define PRIxLEAST64 "llx" /* uint_least64_t */
+#define PRIxFAST8 "x" /* uint_fast8_t */
+#define PRIxFAST16 "x" /* uint_fast16_t */
+#define PRIxFAST32 "x" /* uint_fast32_t */
+#define PRIxFAST64 "llx" /* uint_fast64_t */
+#define PRIxMAX "llx" /* uintmax_t */
+#define PRIxPTR "x" /* uintptr_t */
+
+#define PRIX8 "X" /* uint8_t */
+#define PRIX16 "X" /* uint16_t */
+#define PRIX32 "X" /* uint32_t */
+#define PRIX64 "llX" /* uint64_t */
+#define PRIXLEAST8 "X" /* uint_least8_t */
+#define PRIXLEAST16 "X" /* uint_least16_t */
+#define PRIXLEAST32 "X" /* uint_least32_t */
+#define PRIXLEAST64 "llX" /* uint_least64_t */
+#define PRIXFAST8 "X" /* uint_fast8_t */
+#define PRIXFAST16 "X" /* uint_fast16_t */
+#define PRIXFAST32 "X" /* uint_fast32_t */
+#define PRIXFAST64 "llX" /* uint_fast64_t */
+#define PRIXMAX "llX" /* uintmax_t */
+#define PRIXPTR "X" /* uintptr_t */
+
+/* fscanf(3) macros for signed integers. */
+
+#define SCNd8 "hhd" /* int8_t */
+#define SCNd16 "hd" /* int16_t */
+#define SCNd32 "d" /* int32_t */
+#define SCNd64 "lld" /* int64_t */
+#define SCNdLEAST8 "hhd" /* int_least8_t */
+#define SCNdLEAST16 "hd" /* int_least16_t */
+#define SCNdLEAST32 "d" /* int_least32_t */
+#define SCNdLEAST64 "lld" /* int_least64_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 */
+#define SCNdPTR "d" /* intptr_t */
+
+#define SCNi8 "hhi" /* int8_t */
+#define SCNi16 "hi" /* int16_t */
+#define SCNi32 "i" /* int32_t */
+#define SCNi64 "lli" /* int64_t */
+#define SCNiLEAST8 "hhi" /* int_least8_t */
+#define SCNiLEAST16 "hi" /* int_least16_t */
+#define SCNiLEAST32 "i" /* int_least32_t */
+#define SCNiLEAST64 "lli" /* int_least64_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 */
+#define SCNiPTR "i" /* intptr_t */
+
+/* fscanf(3) macros for unsigned integers. */
+
+#define SCNo8 "hho" /* uint8_t */
+#define SCNo16 "ho" /* uint16_t */
+#define SCNo32 "o" /* uint32_t */
+#define SCNo64 "llo" /* uint64_t */
+#define SCNoLEAST8 "hho" /* uint_least8_t */
+#define SCNoLEAST16 "ho" /* uint_least16_t */
+#define SCNoLEAST32 "o" /* uint_least32_t */
+#define SCNoLEAST64 "llo" /* uint_least64_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 */
+#define SCNoPTR "o" /* uintptr_t */
+
+#define SCNu8 "hhu" /* uint8_t */
+#define SCNu16 "hu" /* uint16_t */
+#define SCNu32 "u" /* uint32_t */
+#define SCNu64 "llu" /* uint64_t */
+#define SCNuLEAST8 "hhu" /* uint_least8_t */
+#define SCNuLEAST16 "hu" /* uint_least16_t */
+#define SCNuLEAST32 "u" /* uint_least32_t */
+#define SCNuLEAST64 "llu" /* uint_least64_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 */
+#define SCNuPTR "u" /* uintptr_t */
+
+#define SCNx8 "hhx" /* uint8_t */
+#define SCNx16 "hx" /* uint16_t */
+#define SCNx32 "x" /* uint32_t */
+#define SCNx64 "llx" /* uint64_t */
+#define SCNxLEAST8 "hhx" /* uint_least8_t */
+#define SCNxLEAST16 "hx" /* uint_least16_t */
+#define SCNxLEAST32 "x" /* uint_least32_t */
+#define SCNxLEAST64 "llx" /* uint_least64_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 */
+#define SCNxPTR "x" /* uintptr_t */
+
+#endif /* !_MACHINE_INTTYPES_H_ */
diff --git a/sys/i386/include/_limits.h b/sys/i386/include/_limits.h
index 0e96312..dcf2ba4 100644
--- a/sys/i386/include/_limits.h
+++ b/sys/i386/include/_limits.h
@@ -101,6 +101,114 @@
#define QUAD_MAX LLONG_MAX /* max value for a quad_t */
#define QUAD_MIN LLONG_MIN /* min value for a quad_t */
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.1 Limits of exact-width integer types
+ */
+/* Minimum values of exact-width signed integer types. */
+#define INT8_MIN (-0x7f-1)
+#define INT16_MIN (-0x7fff-1)
+#define INT32_MIN (-0x7fffffff-1)
+#define INT64_MIN (-0x7fffffffffffffffLL-1)
+
+/* Maximum values of exact-width signed integer types. */
+#define INT8_MAX 0x7f
+#define INT16_MAX 0x7fff
+#define INT32_MAX 0x7fffffff
+#define INT64_MAX 0x7fffffffffffffffLL
+
+/* Maximum values of exact-width unsigned integer types. */
+#define UINT8_MAX 0xff
+#define UINT16_MAX 0xffff
+#define UINT32_MAX 0xffffffffU
+#define UINT64_MAX 0xffffffffffffffffULL
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.2 Limits of minimum-width integer types
+ */
+/* Minimum values of minimum-width signed integer types. */
+#define INT_LEAST8_MIN SCHAR_MIN
+#define INT_LEAST16_MIN SHRT_MIN
+#define INT_LEAST32_MIN INT_MIN
+#define INT_LEAST64_MIN LLONG_MIN
+
+/* Maximum values of minimum-width signed integer types. */
+#define INT_LEAST8_MAX SCHAR_MAX
+#define INT_LEAST16_MAX SHRT_MAX
+#define INT_LEAST32_MAX INT_MAX
+#define INT_LEAST64_MAX LLONG_MAX
+
+/* Maximum values of minimum-width unsigned integer types. */
+#define UINT_LEAST8_MAX UCHAR_MAX
+#define UINT_LEAST16_MAX USHRT_MAX
+#define UINT_LEAST32_MAX UINT_MAX
+#define UINT_LEAST64_MAX ULLONG_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.3 Limits of fastest minimum-width integer types
+ */
+/* Minimum values of fastest minimum-width signed integer types. */
+#define INT_FAST8_MIN INT_MIN
+#define INT_FAST16_MIN INT_MIN
+#define INT_FAST32_MIN INT_MIN
+#define INT_FAST64_MIN LLONG_MIN
+
+/* Maximum values of fastest minimum-width signed integer types. */
+#define INT_FAST8_MAX INT_MAX
+#define INT_FAST16_MAX INT_MAX
+#define INT_FAST32_MAX INT_MAX
+#define INT_FAST64_MAX LLONG_MAX
+
+/* Maximum values of fastest minimum-width unsigned integer types. */
+#define UINT_FAST8_MAX UINT_MAX
+#define UINT_FAST16_MAX UINT_MAX
+#define UINT_FAST32_MAX UINT_MAX
+#define UINT_FAST64_MAX ULLONG_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.4 Limits of integer types capable of holding object pointers
+ */
+#define INTPTR_MIN INT_MIN
+#define INTPTR_MAX INT_MAX
+#define UINTPTR_MAX UINT_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.5 Limits of greatest-width integer types
+ */
+#define INTMAX_MIN LLONG_MIN
+#define INTMAX_MAX LLONG_MAX
+#define UINTMAX_MAX ULLONG_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.3 Limits of other integer types
+ */
+/* Limits of ptrdiff_t. */
+#define PTRDIFF_MIN INT_MIN
+#define PTRDIFF_MAX INT_MAX
+
+/* Limits of sig_atomic_t. */
+#define SIG_ATOMIC_MIN INT_MIN
+#define SIG_ATOMIC_MAX INT_MAX
+
+/* Limit of size_t. */
+#define SIZE_MAX UINT_MAX
+
+#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
+/* Limits of wchar_t. */
+#define WCHAR_MIN INT_MIN
+#define WCHAR_MAX INT_MAX
+
+/* Limits of wint_t. */
+#define WINT_MIN INT_MIN
+#define WINT_MAX INT_MAX
+#endif
+#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_POSIX_SOURCE */
#endif /* !_ANSI_SOURCE */
diff --git a/sys/i386/include/ansi.h b/sys/i386/include/ansi.h
index 64ea12b..b1de8ae 100644
--- a/sys/i386/include/ansi.h
+++ b/sys/i386/include/ansi.h
@@ -147,6 +147,40 @@ typedef unsigned int __uint32_t;
typedef int __intptr_t;
typedef unsigned int __uintptr_t;
+typedef __signed char __int_least8_t;
+typedef unsigned char __uint_least8_t;
+typedef short __int_least16_t;
+typedef unsigned short __uint_least16_t;
+typedef int __int_least32_t;
+typedef unsigned int __uint_least32_t;
+typedef __int64_t __int_least64_t;
+typedef __uint64_t __uint_least64_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;
+typedef __int64_t __int_fast64_t;
+typedef __uint64_t __uint_fast64_t;
+
+typedef __int64_t __intmax_t;
+typedef __uint64_t __uintmax_t;
+
+#define __INT8_C(c) (c)
+#define __INT16_C(c) (c)
+#define __INT32_C(c) (c)
+#define __INT64_C(c) (c ## LL)
+
+#define __UINT8_C(c) (c)
+#define __UINT16_C(c) (c)
+#define __UINT32_C(c) (c ## U)
+#define __UINT64_C(c) (c ## ULL)
+
+#define __INTMAX_C(c) (c ## LL)
+#define __UINTMAX_C(c) (c ## ULL)
+
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
diff --git a/sys/i386/include/limits.h b/sys/i386/include/limits.h
index 0e96312..dcf2ba4 100644
--- a/sys/i386/include/limits.h
+++ b/sys/i386/include/limits.h
@@ -101,6 +101,114 @@
#define QUAD_MAX LLONG_MAX /* max value for a quad_t */
#define QUAD_MIN LLONG_MIN /* min value for a quad_t */
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.1 Limits of exact-width integer types
+ */
+/* Minimum values of exact-width signed integer types. */
+#define INT8_MIN (-0x7f-1)
+#define INT16_MIN (-0x7fff-1)
+#define INT32_MIN (-0x7fffffff-1)
+#define INT64_MIN (-0x7fffffffffffffffLL-1)
+
+/* Maximum values of exact-width signed integer types. */
+#define INT8_MAX 0x7f
+#define INT16_MAX 0x7fff
+#define INT32_MAX 0x7fffffff
+#define INT64_MAX 0x7fffffffffffffffLL
+
+/* Maximum values of exact-width unsigned integer types. */
+#define UINT8_MAX 0xff
+#define UINT16_MAX 0xffff
+#define UINT32_MAX 0xffffffffU
+#define UINT64_MAX 0xffffffffffffffffULL
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.2 Limits of minimum-width integer types
+ */
+/* Minimum values of minimum-width signed integer types. */
+#define INT_LEAST8_MIN SCHAR_MIN
+#define INT_LEAST16_MIN SHRT_MIN
+#define INT_LEAST32_MIN INT_MIN
+#define INT_LEAST64_MIN LLONG_MIN
+
+/* Maximum values of minimum-width signed integer types. */
+#define INT_LEAST8_MAX SCHAR_MAX
+#define INT_LEAST16_MAX SHRT_MAX
+#define INT_LEAST32_MAX INT_MAX
+#define INT_LEAST64_MAX LLONG_MAX
+
+/* Maximum values of minimum-width unsigned integer types. */
+#define UINT_LEAST8_MAX UCHAR_MAX
+#define UINT_LEAST16_MAX USHRT_MAX
+#define UINT_LEAST32_MAX UINT_MAX
+#define UINT_LEAST64_MAX ULLONG_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.3 Limits of fastest minimum-width integer types
+ */
+/* Minimum values of fastest minimum-width signed integer types. */
+#define INT_FAST8_MIN INT_MIN
+#define INT_FAST16_MIN INT_MIN
+#define INT_FAST32_MIN INT_MIN
+#define INT_FAST64_MIN LLONG_MIN
+
+/* Maximum values of fastest minimum-width signed integer types. */
+#define INT_FAST8_MAX INT_MAX
+#define INT_FAST16_MAX INT_MAX
+#define INT_FAST32_MAX INT_MAX
+#define INT_FAST64_MAX LLONG_MAX
+
+/* Maximum values of fastest minimum-width unsigned integer types. */
+#define UINT_FAST8_MAX UINT_MAX
+#define UINT_FAST16_MAX UINT_MAX
+#define UINT_FAST32_MAX UINT_MAX
+#define UINT_FAST64_MAX ULLONG_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.4 Limits of integer types capable of holding object pointers
+ */
+#define INTPTR_MIN INT_MIN
+#define INTPTR_MAX INT_MAX
+#define UINTPTR_MAX UINT_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.5 Limits of greatest-width integer types
+ */
+#define INTMAX_MIN LLONG_MIN
+#define INTMAX_MAX LLONG_MAX
+#define UINTMAX_MAX ULLONG_MAX
+
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.3 Limits of other integer types
+ */
+/* Limits of ptrdiff_t. */
+#define PTRDIFF_MIN INT_MIN
+#define PTRDIFF_MAX INT_MAX
+
+/* Limits of sig_atomic_t. */
+#define SIG_ATOMIC_MIN INT_MIN
+#define SIG_ATOMIC_MAX INT_MAX
+
+/* Limit of size_t. */
+#define SIZE_MAX UINT_MAX
+
+#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
+/* Limits of wchar_t. */
+#define WCHAR_MIN INT_MIN
+#define WCHAR_MAX INT_MAX
+
+/* Limits of wint_t. */
+#define WINT_MIN INT_MIN
+#define WINT_MAX INT_MAX
+#endif
+#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_POSIX_SOURCE */
#endif /* !_ANSI_SOURCE */
OpenPOWER on IntegriCloud