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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [limits.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
2
This file is part of the GNU C Library.
3
 
4
The GNU C Library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public License as
6
published by the Free Software Foundation; either version 2 of the
7
License, or (at your option) any later version.
8
 
9
The GNU C Library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
Library General Public License for more details.
13
 
14
You should have received a copy of the GNU Library General Public
15
License along with the GNU C Library; see the file COPYING.LIB.  If
16
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17
Cambridge, MA 02139, USA.  */
18
 
19
/*
20
 *      ANSI Standard: 4.14/2.2.4.2 Limits of integral types    <limits.h>
21
 */
22
 
23
#ifndef _LIMITS_H
24
 
25
#define _LIMITS_H       1
26
#include <features.h>
27
 
28
#ifdef  __USE_POSIX
29
/* POSIX adds things to <limits.h>.  */
30
#include <posix1_lim.h>
31
#endif
32
 
33
#ifdef  __USE_POSIX2
34
#include <posix2_lim.h>
35
#endif
36
 
37
 
38
/* Only if gcc 2.x is used and -traditional is not used, we can use
39
 * #include_next.
40
#if     __GNUC__ >= 2 && __STDC__
41
 */
42
#if     __GNUC__ >= 2
43
 
44
 /* Have we done that? */
45
# if !defined(_GCC_LIMITS_H_) && !defined(_GCC_LIMITS_H)
46
  /* Get the compiler's limits.h, which defines all the ANSI
47
   * constants.
48
   */
49
  /* This tells it not to look for another.  */
50
# define _LIBC_LIMITS_H
51
# define _LIBC_LIMITS_H_
52
# include_next <limits.h>
53
# endif
54
 
55
#else   /* Not GCC 2.  */
56
 
57
/* We don't have #include_next.
58
   Define ANSI <limits.h> for standard 32-bit words.  */
59
 
60
/* These assume 8-bit `char's, 16-bit `short int's,
61
   and 32-bit `int's and `long int's.  */
62
 
63
/* Number of bits in a `char'.  */
64
#define CHAR_BIT        8
65
 
66
/* Maximum length of any multibyte character in any locale.
67
   Locale-writers should change this as necessary.  */
68
#define MB_LEN_MAX      1
69
 
70
/* Minimum and maximum values a `signed char' can hold.  */
71
#define SCHAR_MIN       (-128)
72
#define SCHAR_MAX       127
73
 
74
/* Maximum value an `unsigned char' can hold.  (Minimum is 0.)  */
75
#ifdef  __STDC__
76
#define UCHAR_MAX       255U
77
#else
78
#define UCHAR_MAX       255
79
#endif
80
 
81
/* Minimum and maximum values a `char' can hold.  */
82
#ifdef __CHAR_UNSIGNED__
83
#define CHAR_MIN        0
84
#define CHAR_MAX        UCHAR_MAX
85
#else
86
#define CHAR_MIN        SCHAR_MIN
87
#define CHAR_MAX        SCHAR_MAX
88
#endif
89
 
90
/* Minimum and maximum values a `signed short int' can hold.  */
91
#define SHRT_MIN        (-32768)
92
#define SHRT_MAX        32767
93
 
94
/* Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  */
95
#define USHRT_MAX       65535
96
 
97
/* Minimum and maximum values a `signed int' can hold.  */
98
#define INT_MIN (- INT_MAX - 1)
99
#define INT_MAX 2147483647
100
 
101
/* Maximum value an `unsigned int' can hold.  (Minimum is 0.)  */
102
#ifdef  __STDC__
103
#define UINT_MAX        4294967295U
104
#else
105
#define UINT_MAX        4294967295
106
#endif
107
 
108
/* Minimum and maximum values a `signed long int' can hold.  */
109
#define LONG_MIN        INT_MIN
110
#define LONG_MAX        INT_MAX
111
 
112
/* Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  */
113
#define ULONG_MAX       UINT_MAX
114
 
115
#endif  /* GCC 2.  */
116
 
117
 
118
#ifndef RAND_MAX
119
/* The largest number rand will return (same as INT_MAX).  */
120
#define RAND_MAX        INT_MAX
121
#endif
122
 
123
#ifdef __SVR4_I386_ABI_L1__
124
 
125
#define NL_ARGMAX       9
126
#define NL_LANGMAX      14
127
#define NL_MSGMAX       32767
128
#define NL_NMAX         1
129
#define NL_SETMAX       255
130
#define NL_TEXTMAX      255
131
#define NZERO           20
132
 
133
#define WORD_BIT        32
134
#define LONG_BIT        32
135
 
136
#define FCHR_MAX        1048576
137
 
138
#endif /* __SVR4_I386_ABI_L1__ */
139
 
140
#endif  /* limits.h  */

powered by: WebSVN 2.1.0

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