xref: /utopia/UTPA2-700.0.x/projects/tools/lint/aeon_include/sys/config.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 #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 #ifdef __linux__
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 #ifdef __xstormy16__
98 #define __SMALL_BITFIELDS
99 #undef INT_MAX
100 #undef UINT_MAX
101 #define INT_MAX __INT_MAX__
102 #define UINT_MAX (__INT_MAX__ * 2U + 1)
103 #define MALLOC_ALIGNMENT 8
104 #define _POINTER_INT short
105 #define __BUFSIZ__ 16
106 #define _REENT_SMALL
107 #endif
108 #ifdef __m32c__
109 #define __SMALL_BITFIELDS
110 #undef INT_MAX
111 #undef UINT_MAX
112 #define INT_MAX __INT_MAX__
113 #define UINT_MAX (__INT_MAX__ * 2U + 1)
114 #define MALLOC_ALIGNMENT 8
115 #if defined(__r8c_cpu__) || defined(__m16c_cpu__)
116 #define _POINTER_INT short
117 #else
118 #define _POINTER_INT long
119 #endif
120 #define __BUFSIZ__ 16
121 #define _REENT_SMALL
122 #endif /* __m32c__ */
123 
124 
125 /* This block should be kept in sync with GCC's limits.h.  The point
126    of having these definitions here is to not include limits.h, which
127    would pollute the user namespace, while still using types of the
128    the correct widths when deciding how to define __int32_t and
129    __int64_t.  */
130 #ifndef __INT_MAX__
131 # ifdef INT_MAX
132 #  define __INT_MAX__ INT_MAX
133 # else
134 #  define __INT_MAX__ 2147483647
135 # endif
136 #endif
137 
138 #ifndef __LONG_MAX__
139 # ifdef LONG_MAX
140 #  define __LONG_MAX__ LONG_MAX
141 # else
142 #  if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) \
143       || defined (__sparcv9)
144 #   define __LONG_MAX__ 9223372036854775807L
145 #  else
146 #   define __LONG_MAX__ 2147483647L
147 #  endif /* __alpha__ || sparc64 */
148 # endif
149 #endif
150 /* End of block that should be kept in sync with GCC's limits.h.  */
151 
152 #ifndef _POINTER_INT
153 #define _POINTER_INT long
154 #endif
155 
156 #ifdef __frv__
157 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
158 #endif
159 #undef __RAND_MAX
160 #if __INT_MAX__ == 32767
161 #define __RAND_MAX 32767
162 #else
163 #define __RAND_MAX 0x7fffffff
164 #endif
165 
166 #if defined(__CYGWIN__)
167 #include <cygwin/config.h>
168 #endif
169 
170 #if defined(__rtems__)
171 #define __FILENAME_MAX__ 255
172 #define _READ_WRITE_RETURN_TYPE _ssize_t
173 #endif
174 
175 #ifndef __IMPORT
176 #define __IMPORT
177 #endif
178 
179 /* Define return type of read/write routines.  In POSIX, the return type
180    for read()/write() is "ssize_t" but legacy newlib code has been using
181    "int" for some time.  If not specified, "int" is defaulted.  */
182 #ifndef _READ_WRITE_RETURN_TYPE
183 #define _READ_WRITE_RETURN_TYPE int
184 #endif
185 
186 #ifndef __WCHAR_MAX__
187 #if __INT_MAX__ == 32767 || defined (_WIN32)
188 #define __WCHAR_MAX__ 0xffffu
189 #endif
190 #endif
191 
192 #endif /* __SYS_CONFIG_H__ */
193