OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [include/] [sys/] [config.h] - Blame information for rev 158

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#ifndef __SYS_CONFIG_H__
2
#define __SYS_CONFIG_H__
3
 
4
#include <machine/ieeefp.h>  /* floating point macros */
5
 
6
/* exceptions first */
7
#if defined(__H8500__) || defined(__W65__)
8
#define __SMALL_BITFIELDS
9
/* ???  This conditional is true for the h8500 and the w65, defining H8300
10
   in those cases probably isn't the right thing to do.  */
11
#define H8300 1
12
#endif
13
 
14
/* 16 bit integer machines */
15
#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8500__) || defined(__W65__) || defined (__mn10200__) || defined (__AVR__)
16
 
17
#undef INT_MAX
18
#undef UINT_MAX
19
#define INT_MAX 32767
20
#define UINT_MAX 65535
21
#endif
22
 
23
#if defined (__H8300__) || defined (__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
24
#define __SMALL_BITFIELDS
25
#define H8300 1
26
#undef INT_MAX
27
#undef UINT_MAX
28
#define INT_MAX __INT_MAX__
29
#define UINT_MAX (__INT_MAX__ * 2U + 1)
30
#endif
31
 
32
#ifdef __W65__
33
#define __SMALL_BITFIELDS
34
#endif
35
 
36
#if defined(__D10V__)
37
#define __SMALL_BITFIELDS
38
#undef INT_MAX
39
#undef UINT_MAX
40
#define INT_MAX __INT_MAX__
41
#define UINT_MAX (__INT_MAX__ * 2U + 1)
42
#define _POINTER_INT short
43
#endif
44
 
45
#if defined(__mc68hc11__) || defined(__mc68hc12__) || defined(__mc68hc1x__)
46
#undef INT_MAX
47
#undef UINT_MAX
48
#define INT_MAX __INT_MAX__
49
#define UINT_MAX (__INT_MAX__ * 2U + 1)
50
#define _POINTER_INT short
51
#endif
52
 
53
#ifdef ___AM29K__
54
#define _FLOAT_RET double
55
#endif
56
 
57
#ifdef __i386__
58
#ifndef __unix__
59
/* in other words, go32 */
60
#define _FLOAT_RET double
61
#endif
62
#if defined(__linux__) || defined(__RDOS__)
63
/* we want the reentrancy structure to be returned by a function */
64
#define __DYNAMIC_REENT__
65
#define HAVE_GETDATE
66
#define _HAVE_SYSTYPES
67
#define _READ_WRITE_RETURN_TYPE _ssize_t
68
#define __LARGE64_FILES 1
69
/* we use some glibc header files so turn on glibc large file feature */
70
#define _LARGEFILE64_SOURCE 1
71
#endif
72
#endif
73
 
74
#ifdef __mn10200__
75
#define __SMALL_BITFIELDS
76
#endif
77
 
78
#ifdef __AVR__
79
#define __SMALL_BITFIELDS
80
#define _POINTER_INT short
81
#endif
82
 
83
#ifdef __v850
84
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
85
#endif
86
 
87
/* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
88
#if defined(__PPC__)
89
#if defined(_CALL_SYSV)
90
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
91
#endif
92
#ifdef __SPE__
93
#define _LONG_DOUBLE double
94
#endif
95
#endif
96
 
97
#if defined(__mips__) && !defined(__rtems__)
98
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
99
#endif
100
 
101
#ifdef __xstormy16__
102
#define __SMALL_BITFIELDS
103
#undef INT_MAX
104
#undef UINT_MAX
105
#define INT_MAX __INT_MAX__
106
#define UINT_MAX (__INT_MAX__ * 2U + 1)
107
#define MALLOC_ALIGNMENT 8
108
#define _POINTER_INT short
109
#define __BUFSIZ__ 16
110
#define _REENT_SMALL
111
#endif
112
#ifdef __m32c__
113
#define __SMALL_BITFIELDS
114
#undef INT_MAX
115
#undef UINT_MAX
116
#define INT_MAX __INT_MAX__
117
#define UINT_MAX (__INT_MAX__ * 2U + 1)
118
#define MALLOC_ALIGNMENT 8
119
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
120
#define _POINTER_INT short
121
#else
122
#define _POINTER_INT long
123
#endif
124
#define __BUFSIZ__ 16
125
#define _REENT_SMALL
126
#endif /* __m32c__ */
127
 
128
#ifdef __thumb2__
129
/* Thumb-2 based ARMv7M devices are really small.  */
130
#define _REENT_SMALL
131
#endif
132
 
133
#ifdef __SPU__
134
#define MALLOC_ALIGNMENT 16
135
#define __CUSTOM_FILE_IO__
136
#endif
137
 
138
/* This block should be kept in sync with GCC's limits.h.  The point
139
   of having these definitions here is to not include limits.h, which
140
   would pollute the user namespace, while still using types of the
141
   the correct widths when deciding how to define __int32_t and
142
   __int64_t.  */
143
#ifndef __INT_MAX__
144
# ifdef INT_MAX
145
#  define __INT_MAX__ INT_MAX
146
# else
147
#  define __INT_MAX__ 2147483647
148
# endif
149
#endif
150
 
151
#ifndef __LONG_MAX__
152
# ifdef LONG_MAX
153
#  define __LONG_MAX__ LONG_MAX
154
# else
155
#  if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) \
156
      || defined (__sparcv9)
157
#   define __LONG_MAX__ 9223372036854775807L
158
#  else
159
#   define __LONG_MAX__ 2147483647L
160
#  endif /* __alpha__ || sparc64 */
161
# endif
162
#endif
163
/* End of block that should be kept in sync with GCC's limits.h.  */
164
 
165
#ifndef _POINTER_INT
166
#define _POINTER_INT long
167
#endif
168
 
169
#ifdef __frv__
170
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
171
#endif
172
#undef __RAND_MAX
173
#if __INT_MAX__ == 32767
174
#define __RAND_MAX 32767
175
#else
176
#define __RAND_MAX 0x7fffffff
177
#endif
178
 
179
#if defined(__CYGWIN__)
180
#include <cygwin/config.h>
181
#endif
182
 
183
#if defined(__rtems__)
184
#define __FILENAME_MAX__ 255
185
#define _READ_WRITE_RETURN_TYPE _ssize_t
186
#endif
187
 
188
#ifndef __IMPORT
189
#define __IMPORT
190
#endif
191
 
192
/* Define return type of read/write routines.  In POSIX, the return type
193
   for read()/write() is "ssize_t" but legacy newlib code has been using
194
   "int" for some time.  If not specified, "int" is defaulted.  */
195
#ifndef _READ_WRITE_RETURN_TYPE
196
#define _READ_WRITE_RETURN_TYPE int
197
#endif
198
 
199
#ifndef __WCHAR_MAX__
200
#if __INT_MAX__ == 32767 || defined (_WIN32)
201
#define __WCHAR_MAX__ 0xffffu
202
#endif
203
#endif
204
 
205
/* See if small reent asked for at configuration time and
206
   is not chosen by the platform by default.  */
207
#ifdef _WANT_REENT_SMALL
208
#ifndef _REENT_SMALL
209
#define _REENT_SMALL
210
#endif
211
#endif
212
 
213
#endif /* __SYS_CONFIG_H__ */

powered by: WebSVN 2.1.0

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