OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [include/] [limits.h] - Blame information for rev 455

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#ifndef _LIBC_LIMITS_H_
2
# define _LIBC_LIMITS_H_        1
3
 
4
#include <newlib.h>
5
 
6
# ifdef _MB_LEN_MAX
7
#  define MB_LEN_MAX    _MB_LEN_MAX
8
# else
9
#  define MB_LEN_MAX    1
10
# endif
11
 
12
/* Maximum number of positional arguments, if _WANT_IO_POS_ARGS.  */
13
# ifndef NL_ARGMAX
14
#  define NL_ARGMAX 32
15
# endif
16
 
17
/* if do not have #include_next support, then we
18
   have to define the limits here. */
19
# if !defined __GNUC__ || __GNUC__ < 2
20
 
21
#  ifndef _LIMITS_H
22
#   define _LIMITS_H    1
23
 
24
#   include <sys/config.h>
25
 
26
/* Number of bits in a `char'.  */
27
#   undef CHAR_BIT
28
#   define CHAR_BIT 8
29
 
30
/* Minimum and maximum values a `signed char' can hold.  */
31
#   undef SCHAR_MIN
32
#   define SCHAR_MIN (-128)
33
#   undef SCHAR_MAX
34
#   define SCHAR_MAX 127
35
 
36
/* Maximum value an `unsigned char' can hold.  (Minimum is 0).  */
37
#   undef UCHAR_MAX
38
#   define UCHAR_MAX 255
39
 
40
/* Minimum and maximum values a `char' can hold.  */
41
#   ifdef __CHAR_UNSIGNED__
42
#    undef CHAR_MIN
43
#    define CHAR_MIN 0
44
#    undef CHAR_MAX
45
#    define CHAR_MAX 255
46
#   else
47
#    undef CHAR_MIN
48
#    define CHAR_MIN (-128)
49
#    undef CHAR_MAX
50
#    define CHAR_MAX 127
51
#   endif
52
 
53
/* Minimum and maximum values a `signed short int' can hold.  */
54
#   undef SHRT_MIN
55
/* For the sake of 16 bit hosts, we may not use -32768 */
56
#   define SHRT_MIN (-32767-1)
57
#   undef SHRT_MAX
58
#   define SHRT_MAX 32767
59
 
60
/* Maximum value an `unsigned short int' can hold.  (Minimum is 0).  */
61
#   undef USHRT_MAX
62
#   define USHRT_MAX 65535
63
 
64
/* Minimum and maximum values a `signed int' can hold.  */
65
#   ifndef __INT_MAX__
66
#    define __INT_MAX__ 2147483647
67
#   endif
68
#   undef INT_MIN
69
#   define INT_MIN (-INT_MAX-1)
70
#   undef INT_MAX
71
#   define INT_MAX __INT_MAX__
72
 
73
/* Maximum value an `unsigned int' can hold.  (Minimum is 0).  */
74
#   undef UINT_MAX
75
#   define UINT_MAX (INT_MAX * 2U + 1)
76
 
77
/* Minimum and maximum values a `signed long int' can hold.
78
   (Same as `int').  */
79
#   ifndef __LONG_MAX__
80
#    if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
81
#     define __LONG_MAX__ 9223372036854775807L
82
#    else
83
#     define __LONG_MAX__ 2147483647L
84
#    endif /* __alpha__ || sparc64 */
85
#   endif
86
#   undef LONG_MIN
87
#   define LONG_MIN (-LONG_MAX-1)
88
#   undef LONG_MAX
89
#   define LONG_MAX __LONG_MAX__
90
 
91
/* Maximum value an `unsigned long int' can hold.  (Minimum is 0).  */
92
#   undef ULONG_MAX
93
#   define ULONG_MAX (LONG_MAX * 2UL + 1)
94
 
95
#   ifndef __LONG_LONG_MAX__
96
#    define __LONG_LONG_MAX__ 9223372036854775807LL
97
#   endif
98
 
99
#   if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
100
/* Minimum and maximum values a `signed long long int' can hold.  */
101
#    undef LLONG_MIN
102
#    define LLONG_MIN (-LLONG_MAX-1)
103
#    undef LLONG_MAX
104
#    define LLONG_MAX __LONG_LONG_MAX__
105
 
106
/* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
107
#    undef ULLONG_MAX
108
#    define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
109
#   endif
110
 
111
#  if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
112
/* Minimum and maximum values a `signed long long int' can hold.  */
113
#    undef LONG_LONG_MIN
114
#    define LONG_LONG_MIN (-LONG_LONG_MAX-1)
115
#    undef LONG_LONG_MAX
116
#    define LONG_LONG_MAX __LONG_LONG_MAX__
117
 
118
/* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
119
#    undef ULONG_LONG_MAX
120
#    define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
121
#   endif
122
 
123
#  endif /* _LIMITS_H  */
124
# endif  /* GCC 2.  */
125
 
126
#endif   /* !_LIBC_LIMITS_H_ */
127
 
128
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
129
/* `_GCC_LIMITS_H_' is what GCC's file defines.  */
130
# include_next <limits.h>
131
#endif /* __GNUC__ && !_GCC_LIMITS_H_ */
132
 
133
#ifndef _POSIX2_RE_DUP_MAX
134
/* The maximum number of repeated occurrences of a regular expression
135
 *    permitted when using the interval notation `\{M,N\}'.  */
136
#define _POSIX2_RE_DUP_MAX              255
137
#endif /* _POSIX2_RE_DUP_MAX  */
138
 
139
#ifndef ARG_MAX
140
#define ARG_MAX         4096
141
#endif
142
 
143
#ifndef PATH_MAX
144
#define PATH_MAX        4096
145
#endif
146
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.