Print this page
remove support for non-ANSI compilation
@@ -18,19 +18,19 @@
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ *
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_INT_LIMITS_H
#define _SYS_INT_LIMITS_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
* of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
* Programming language - C.
*
@@ -78,13 +78,11 @@
*
* The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
* where the ABI specifies "char" as unsigned when the translation mode is
* not ANSI-C.
*/
-#if defined(_CHAR_IS_SIGNED) || defined(__STDC__)
#define INT8_MAX (127)
-#endif
#define INT16_MAX (32767)
#define INT32_MAX (2147483647)
#if defined(_LP64)
#define INT64_MAX (9223372036854775807L)
#elif defined(_LONGLONG_TYPE)
@@ -110,13 +108,11 @@
#define UINTMAX_MAX UINT64_MAX
#else
#define UINTMAX_MAX UINT32_MAX
#endif
-#if defined(_CHAR_IS_SIGNED) || defined(__STDC__)
#define INT_LEAST8_MAX INT8_MAX
-#endif
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#ifdef INT64_MAX
#define INT_LEAST64_MAX INT64_MAX
#endif
@@ -126,13 +122,11 @@
#define UINT_LEAST32_MAX UINT32_MAX
#ifdef UINT64_MAX
#define UINT_LEAST64_MAX UINT64_MAX
#endif
-#if defined(_CHAR_IS_SIGNED) || defined(__STDC__)
#define INT_FAST8_MAX INT8_MAX
-#endif
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MAX INT32_MAX
#ifdef INT64_MAX
#define INT_FAST64_MAX INT64_MAX
#endif
@@ -202,13 +196,11 @@
* when including <limits.h> that the suffix _MAX is reserved but not the
* suffix _MIN. However, until that issue is resolved....
*/
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6)
-#if defined(_CHAR_IS_SIGNED) || defined(__STDC__)
#define INT8_MIN (-128)
-#endif
#define INT16_MIN (-32767-1)
#define INT32_MIN (-2147483647-1)
#if defined(_LP64)
#define INT64_MIN (-9223372036854775807L-1)
#elif defined(_LONGLONG_TYPE)
@@ -219,22 +211,18 @@
#define INTMAX_MIN INT64_MIN
#else
#define INTMAX_MIN INT32_MIN
#endif
-#if defined(_CHAR_IS_SIGNED) || defined(__STDC__)
#define INT_LEAST8_MIN INT8_MIN
-#endif
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#ifdef INT64_MIN
#define INT_LEAST64_MIN INT64_MIN
#endif
-#if defined(_CHAR_IS_SIGNED) || defined(__STDC__)
#define INT_FAST8_MIN INT8_MIN
-#endif
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST32_MIN INT32_MIN
#ifdef INT64_MIN
#define INT_FAST64_MIN INT64_MIN
#endif