1 #ifndef __SYS_CONFIG_H__
2 #define __SYS_CONFIG_H__
4 #include <machine/ieeefp.h> /* floating point macros */
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. */
14 /* 16 bit integer machines */
15 #if defined(__Z8001__) || defined(__Z8002__) || defined(__H8500__) || defined(__W65__) || defined (__mn10200__) || defined (__AVR__)
20 #define UINT_MAX 65535
23 #if defined (__H8300__) || defined (__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
24 #define __SMALL_BITFIELDS
28 #define INT_MAX __INT_MAX__
29 #define UINT_MAX (__INT_MAX__ * 2U + 1)
32 #if defined (__xc16x__) || defined (__xc16xL__) || defined (__xc16xS__)
33 #define __SMALL_BITFIELDS
37 #define __SMALL_BITFIELDS
41 #define __SMALL_BITFIELDS
44 #define INT_MAX __INT_MAX__
45 #define UINT_MAX (__INT_MAX__ * 2U + 1)
46 #define _POINTER_INT short
49 #if defined(__mc68hc11__) || defined(__mc68hc12__) || defined(__mc68hc1x__)
52 #define INT_MAX __INT_MAX__
53 #define UINT_MAX (__INT_MAX__ * 2U + 1)
54 #define _POINTER_INT short
58 #define _FLOAT_RET double
63 /* in other words, go32 */
64 #define _FLOAT_RET double
66 #if defined(__linux__) || defined(__RDOS__)
67 /* we want the reentrancy structure to be returned by a function */
68 #define __DYNAMIC_REENT__
70 #define _HAVE_SYSTYPES
71 #define _READ_WRITE_RETURN_TYPE _ssize_t
72 #define __LARGE64_FILES 1
73 /* we use some glibc header files so turn on glibc large file feature */
74 #define _LARGEFILE64_SOURCE 1
79 #define __SMALL_BITFIELDS
83 #define __SMALL_BITFIELDS
84 #define _POINTER_INT short
88 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
91 /* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
93 #if defined(_CALL_SYSV)
94 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
97 #define _LONG_DOUBLE double
101 /* Configure small REENT structure for Xilinx MicroBlaze platforms */
102 #if defined (__MICROBLAZE__)
106 /* Xilinx XMK uses Unix98 mutex */
108 #define _UNIX98_THREAD_MUTEX_ATTRIBUTES
112 #if defined(__mips__) && !defined(__rtems__)
113 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
117 #define __SMALL_BITFIELDS
120 #define INT_MAX __INT_MAX__
121 #define UINT_MAX (__INT_MAX__ * 2U + 1)
122 #define MALLOC_ALIGNMENT 8
123 #define _POINTER_INT short
124 #define __BUFSIZ__ 16
128 #define __SMALL_BITFIELDS
131 #define INT_MAX __INT_MAX__
132 #define UINT_MAX (__INT_MAX__ * 2U + 1)
133 #define MALLOC_ALIGNMENT 8
134 #if defined(__r8c_cpu__) || defined(__m16c_cpu__)
135 #define _POINTER_INT short
137 #define _POINTER_INT long
139 #define __BUFSIZ__ 16
141 #endif /* __m32c__ */
144 #define MALLOC_ALIGNMENT 16
145 #define __CUSTOM_FILE_IO__
148 /* This block should be kept in sync with GCC's limits.h. The point
149 of having these definitions here is to not include limits.h, which
150 would pollute the user namespace, while still using types of the
151 the correct widths when deciding how to define __int32_t and
155 # define __INT_MAX__ INT_MAX
157 # define __INT_MAX__ 2147483647
163 # define __LONG_MAX__ LONG_MAX
165 # if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) \
166 || defined (__sparcv9)
167 # define __LONG_MAX__ 9223372036854775807L
169 # define __LONG_MAX__ 2147483647L
170 # endif /* __alpha__ || sparc64 */
173 /* End of block that should be kept in sync with GCC's limits.h. */
176 #define _POINTER_INT long
180 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
183 #if __INT_MAX__ == 32767
184 #define __RAND_MAX 32767
186 #define __RAND_MAX 0x7fffffff
189 #if defined(__CYGWIN__)
190 ////////////////////////////////////////////////////////#include <cygwin/config.h>
191 #define __LINUX_ERRNO_EXTENSIONS__ 1
192 #define _MB_EXTENDED_CHARSETS_ALL 1
193 #if !defined (__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
194 #define __USE_XOPEN2K 1
198 #if defined(__rtems__)
199 #define __FILENAME_MAX__ 255
200 #define _READ_WRITE_RETURN_TYPE _ssize_t
211 /* Define return type of read/write routines. In POSIX, the return type
212 for read()/write() is "ssize_t" but legacy newlib code has been using
213 "int" for some time. If not specified, "int" is defaulted. */
214 #ifndef _READ_WRITE_RETURN_TYPE
215 #define _READ_WRITE_RETURN_TYPE int
218 #ifndef __WCHAR_MAX__
219 #if __INT_MAX__ == 32767 || defined (_WIN32)
220 #define __WCHAR_MAX__ 0xffffu
224 /* See if small reent asked for at configuration time and
225 is not chosen by the platform by default. */
226 #ifdef _WANT_REENT_SMALL
232 /* If _MB_EXTENDED_CHARSETS_ALL is set, we want all of the extended
233 charsets. The extended charsets add a few functions and a couple
234 of tables of a few K each. */
235 #ifdef _MB_EXTENDED_CHARSETS_ALL
236 #define _MB_EXTENDED_CHARSETS_ISO 1
237 #define _MB_EXTENDED_CHARSETS_WINDOWS 1
240 #endif /* __SYS_CONFIG_H__ */