Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
limits.h
Go to the documentation of this file.
1
29#ifndef _RWSTD_LIMITS_H_INCLUDED
30#define _RWSTD_LIMITS_H_INCLUDED
31
32
33#include <rw/_defs.h>
34
35
36#if !defined (_RWSTD_NO_PURE_C_HEADERS) || defined (_RWSTD_NO_LIMITS_H)
37
38// 18.2.2, p2
39#ifndef CHAR_BIT
40# define CHAR_BIT _RWSTD_CHAR_BIT
41#endif // CHAR_BIT
42
43#ifndef CHAR_MAX
44# define CHAR_MAX _RWSTD_CHAR_MAX
45#endif // CHAR_MAX
46
47#ifndef CHAR_MIN
48# define CHAR_MIN _RWSTD_CHAR_MIN
49#endif // CHAR_MIN
50
51#ifndef SCHAR_MAX
52# define SCHAR_MAX _RWSTD_SCHAR_MAX
53#endif // SCHAR_MAX
54
55#ifndef SCHAR_MIN
56# define SCHAR_MIN _RWSTD_SCHAR_MIN
57#endif // SCHAR_MIN
58
59#ifndef UCHAR_MAX
60# define UCHAR_MAX _RWSTD_UCHAR_MAX
61#endif // UCHAR_MAX
62
63#ifndef SHRT_MAX
64# define SHRT_MAX _RWSTD_SHRT_MAX
65#endif // SHRT_MAX
66
67#ifndef SHRT_MIN
68# define SHRT_MIN _RWSTD_SHRT_MIN
69#endif // SHRT_MIN
70
71#ifndef USHRT_MAX
72# define USHRT_MAX _RWSTD_USHRT_MAX
73#endif // USHRT_MAX
74
75#ifndef INT_MAX
76# define INT_MAX _RWSTD_INT_MAX
77#endif // INT_MAX
78
79#ifndef INT_MIN
80# define INT_MIN _RWSTD_INT_MIN
81#endif // INT_MIN
82
83#ifndef UINT_MAX
84# define UINT_MAX _RWSTD_UINT_MAX
85#endif // UINT_MAX
86
87#ifndef LONG_MAX
88# define LONG_MAX _RWSTD_LONG_MAX
89#endif // LONG_MAX
90
91#ifndef LONG_MIN
92# define LONG_MIN _RWSTD_LONG_MIN
93#endif // LONG_MIN
94
95#ifndef ULONG_MAX
96# define ULONG_MAX _RWSTD_ULONG_MAX
97#endif // ULONG_MAX
98
99#ifndef MB_LEN_MAX
100# define MB_LEN_MAX _RWSTD_MB_LEN_MAX
101#endif // MB_LEN_MAX
102
103#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
104
105# if __GNUC__ > 2
106# pragma GCC system_header
107# endif
108
109# ifdef __GNUC__
110 // use the gcc extension to #include the compiler's <limits.h>
111# include_next <limits.h>
112
113 // include the same file again to get it to #include the system
114 // <limits.h> (presumably residing /usr/include/)
115# define _GCC_NEXT_LIMITS_H
116# include_next <limits.h>
117# else
118# include _RWSTD_ANSI_C_LIMITS_H
119# endif // gcc
120
121#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
122
123#if defined (__hpux__) || defined (__hpux) || defined (hpux)
124# ifndef _POSIX_PATH_MAX
125# define _POSIX_PATH_MAX 255
126# endif // _POSIX_PATH_MAX
127#endif // HP-UX
128
129#if (MB_LEN_MAX != _RWSTD_MB_LEN_MAX)
130# undef MB_LEN_MAX
131# define MB_LEN_MAX _RWSTD_MB_LEN_MAX
132#endif // MB_LEN_MAX
133
134#endif // _RWSTD_LIMITS_H_INCLUDED