]> pd.if.org Git - pdclib/blobdiff - limits.h
Cosmetics (moving Id tag to top, adding Name tag, adjusting limits.h from enquire...
[pdclib] / limits.h
index 65cdae7310982f68cdd8a210fa0218a26e1acedf..1dfb7908e6b318a119901abbb57cc61d2af12751 100644 (file)
--- a/limits.h
+++ b/limits.h
@@ -1,53 +1,42 @@
-#ifndef _PDCLIB_LIMITS_H
-#define _PDCLIB_LIMITS_H _PDCLIB_LIMITS_H
-
 /* $Id$ */
 
+/* Release: $Name$ */
+
 /* 7.10 Sizes of integer types <limits.h>
 
    This file is part of the Public Domain C Library (PDCLib).
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
-/* Defined to 1 as multibyte characters are not supported yet. */
+#ifndef _PDCLIB_LIMITS_H
+#define _PDCLIB_LIMITS_H _PDCLIB_LIMITS_H
+
+#ifndef _PDCLIB_INT_H
+#define _PDCLIB_INT_H _PDCLIB_INT_H
+#include <_PDCLIB_int.h>
+#endif
+
+/* TODO: Defined to 1 as multibyte characters are not supported yet. */
 #define MB_LEN_MAX 1
 
-#define LLONG_MIN  (-0x7fffffffffffffff - 1)
-#define LLONG_MAX  0x7fffffffffffffff
-#define ULLONG_MAX 0xffffffffffffffff
-
-/* Produced by enquire version 5.1a, CWI, Amsterdam
-   http://www.cwi.nl/~steven/enquire.html  */
-
-   /* Number of bits in a storage unit */
-#define CHAR_BIT 8
-   /* Maximum char */
-#define CHAR_MAX 127
-   /* Minimum char */
-#define CHAR_MIN (-128)
-   /* Maximum signed char */
-#define SCHAR_MAX 127
-   /* Minimum signed char */
-#define SCHAR_MIN (-128)
-   /* Maximum unsigned char (minimum is always 0) */
-#define UCHAR_MAX 255
-   /* Maximum short */
-#define SHRT_MAX 32767
-   /* Minimum short */
-#define SHRT_MIN (-32768)
-   /* Maximum int */
-#define INT_MAX 2147483647
-   /* Minimum int */
-#define INT_MIN (-2147483647-1)
-   /* Maximum long */
-#define LONG_MAX 2147483647L
-   /* Minimum long */
-#define LONG_MIN (-2147483647L-1L)
-   /* Maximum unsigned short (minimum is always 0) */
-#define USHRT_MAX 65535
-   /* Maximum unsigned int (minimum is always 0) */
-#define UINT_MAX 4294967295U
-   /* Maximum unsigned long (minimum is always 0) */
-#define ULONG_MAX 4294967295UL
+#define LLONG_MIN  _PDCLIB_LLONG_MIN
+#define LLONG_MAX  _PDCLIB_LLONG_MAX
+#define ULLONG_MAX _PDCLIB_ULLONG_MAX
+
+#define CHAR_BIT   _PDCLIB_CHAR_BIT
+#define CHAR_MAX   _PDCLIB_CHAR_MAX
+#define CHAR_MIN   _PDCLIB_CHAR_MIN
+#define SCHAR_MAX  _PDCLIB_SCHAR_MAX
+#define SCHAR_MIN  _PDCLIB_SCHAR_MIN
+#define UCHAR_MAX  _PDCLIB_UCHAR_MAX
+#define SHRT_MAX   _PDCLIB_SHRT_MAX
+#define SHRT_MIN   _PDCLIB_SHRT_MIN
+#define INT_MAX    _PDCLIB_INT_MAX
+#define INT_MIN    _PDCLIB_INT_MIN
+#define LONG_MAX   _PDCLIB_LONG_MAX
+#define LONG_MIN   _PDCLIB_LONG_MIN
+#define USHRT_MAX  _PDCLIB_USHRT_MAX
+#define UINT_MAX   _PDCLIB_UINT_MAX
+#define ULONG_MAX  _PDCLIB_ULONG_MAX
 
 #endif