Install msysDVLPR-1.0.0-alpha-1
[msysgit.git] / include / sys / config.h
blobd8b33cfce510a12e48e333aaf86581f4f989c680
1 #ifndef __SYS_CONFIG_H__
2 #define __SYS_CONFIG_H__
4 /* exceptions first */
5 /* ??? Why is much of this stuff duplicated with machine/ieeefp.h? */
6 #if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) || defined(__W65__) || defined (__H8300S__)
7 #define _FLOAT_ARG float
8 #define __SMALL_BITFIELDS
9 #define _DOUBLE_IS_32BITS
10 #define __IEEE_BIG_ENDIAN
11 /* ??? This conditional is true for the h8500 and the w65, defining H8300
12 in those cases probably isn't the right thing to do. */
13 #define H8300 1
14 #endif
16 #ifdef __W65__
17 #define _DOUBLE_IS_32BITS
18 #define __SMALL_BITFIELDS
19 #define __IEEE_BIG_ENDIAN
20 #undef INT_MAX
21 #undef UINT_MAX
22 #define INT_MAX 32767
23 #define UINT_MAX 65535
25 #endif
27 /* 16 bit integer machines */
28 #if defined(__Z8001__) || defined(__Z8002__) || defined(__H8300__) || defined(__H8500__) || defined(__W65__) || defined (__H8300H__) || defined (__H8300S__) || defined (__mn10200__) || defined (__AVR__)
30 #undef INT_MAX
31 #undef UINT_MAX
32 #define INT_MAX 32767
33 #define UINT_MAX 65535
34 #endif
36 #if defined(__D10V__)
37 #undef INT_MAX
38 #undef UINT_MAX
39 #define INT_MAX __INT_MAX__
40 #define UINT_MAX (__INT_MAX__ * 2U + 1)
41 #define _DOUBLE_IS_32BITS
42 #define _POINTER_INT short
43 #define __IEEE_BIG_ENDIAN
44 #endif
46 #ifdef ___AM29K__
47 #define _FLOAT_RET double
48 #endif
50 #ifdef __i386__
51 #ifndef __unix__
52 /* in other words, go32 */
53 #define _FLOAT_RET double
54 #endif
55 #endif
57 #ifdef __M32R__
58 #define __IEEE_BIG_ENDIAN
59 #endif
61 #ifdef __m68k__
62 /* This is defined in machine/ieeefp.h; need to check is it redundant here? */
63 #define __IEEE_BIG_ENDIAN
64 #endif
66 #ifdef __mn10300__
67 #define __IEEE_LITTLE_ENDIAN
68 #endif
70 #ifdef __mn10200__
71 #define _DOUBLE_IS_32BITS
72 #define __SMALL_BITFIELDS
73 #define __IEEE_LITTLE_ENDIAN
74 #endif
76 #ifdef __AVR__
77 #define _DOUBLE_IS_32BITS
78 #define __SMALL_BITFIELDS
79 #define __IEEE_LITTLE_ENDIAN
80 #define _POINTER_INT short
81 #endif
83 #ifdef __TIC80__
84 #define __IEEE_LITTLE_ENDIAN
85 #endif
87 #ifdef __v850
88 #define __IEEE_LITTLE_ENDIAN
89 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
90 #endif
92 #ifdef __D30V__
93 #define __IEEE_BIG_ENDIAN
94 #endif
96 /* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
97 #if defined(__PPC__) && defined(_CALL_SYSV)
98 #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
99 #endif
101 #ifdef __sparc__
102 #ifdef __LITTLE_ENDIAN_DATA__
103 #define __IEEE_LITTLE_ENDIAN
104 #else
105 #define __IEEE_BIG_ENDIAN
106 #endif
107 #endif
109 #if INT_MAX == 32767
110 typedef long int __int32_t;
111 typedef unsigned long int __uint32_t;
112 #else
113 typedef int __int32_t;
114 typedef unsigned int __uint32_t;
115 #endif
117 #ifndef _POINTER_INT
118 #define _POINTER_INT long
119 #endif
121 #undef __RAND_MAX
122 #if INT_MAX == 32767
123 #define __RAND_MAX 32767
124 #else
125 #define __RAND_MAX 0x7fffffff
126 #endif
129 #if defined(__CYGWIN__) || defined(__MSYS__)
130 #define __FILENAME_MAX__ (260 - 1 /* NUL */)
131 #define _READ_WRITE_RETURN_TYPE _ssize_t
132 #if defined(__INSIDE_CYGWIN__) || defined(__INSIDE_MSYS__) || defined(_COMPILING_NEWLIB)
133 #define __IMPORT
134 #else
135 #define __IMPORT __declspec(dllimport)
136 #endif
137 #endif
139 #if defined(__rtems__)
140 #define __FILENAME_MAX__ 255
141 #define _READ_WRITE_RETURN_TYPE _ssize_t
142 #endif
144 #ifndef __IMPORT
145 #define __IMPORT
146 #endif
148 /* Define return type of read/write routines. In POSIX, the return type
149 for read()/write() is "ssize_t" but legacy newlib code has been using
150 "int" for some time. If not specified, "int" is defaulted. */
151 #ifndef _READ_WRITE_RETURN_TYPE
152 #define _READ_WRITE_RETURN_TYPE int
153 #endif
155 #endif /* __SYS_CONFIG_H__ */