Go to the documentation of this file.
29 #ifndef _COMPILER_PORT_H
30 #define _COMPILER_PORT_H
38 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
52 #if !defined(R_TYPEDEFS_H) && !defined(USE_CHIBIOS_2)
67 #if defined(__C32_LEGACY_LIBC__)
77 #elif defined(__MCUXPRESSO)
84 #elif defined(__CWCC__)
98 #elif defined(IDF_VER)
113 #define PRIuTIME "lu"
115 #elif defined(__linux__) || defined(__FreeBSD__)
116 #define PRIuSIZE "zu"
117 #define PRIXSIZE "zX"
118 #define PRIuTIME "lu"
120 #elif defined(_WIN32)
121 #define PRIuSIZE "Iu"
122 #define PRIXSIZE "IX"
123 #define PRIuTIME "lu"
125 #elif defined(__GNUC__) && defined(_NANO_FORMATTED_IO) && (_NANO_FORMATTED_IO != 0)
145 #define PRIuTIME "lu"
149 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
150 int vsnprintf(
char *dest,
size_t size,
const char *format, va_list ap);
153 #elif defined(__GNUC__) && defined(__PPC_EABI__)
154 typedef uint32_t time_t;
155 int strcasecmp(
const char *s1,
const char *s2);
156 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
159 #elif defined(__GNUC__)
160 int strcasecmp(
const char *s1,
const char *s2);
161 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
164 #elif defined(__TASKING__)
167 #elif defined(__XC32)
168 #define sprintf _sprintf
169 int sprintf(
char *str,
const char *format, ...);
170 int strcasecmp(
const char *s1,
const char *s2);
171 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
174 #elif defined(__CWCC__)
175 typedef uint32_t time_t;
176 int strcasecmp(
const char *s1,
const char *s2);
177 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
180 #elif defined(__CCRX__)
181 int strcasecmp(
const char *s1,
const char *s2);
182 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
185 #elif defined(__TI_ARM__)
186 int strcasecmp(
const char *s1,
const char *s2);
187 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
192 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
193 #undef __packed_struct
194 #define __packed_struct struct __attribute__((packed))
195 #undef __packed_union
196 #define __packed_union union __attribute__((packed))
198 #elif defined(__GNUC__)
199 #undef __packed_struct
200 #define __packed_struct struct __attribute__((__packed__))
201 #undef __packed_union
202 #define __packed_union union __attribute__((__packed__))
204 #elif defined(__CC_ARM)
206 #undef __packed_struct
207 #define __packed_struct __packed struct
208 #undef __packed_union
209 #define __packed_union __packed union
211 #elif defined(__IAR_SYSTEMS_ICC__)
212 #undef __packed_struct
213 #define __packed_struct __packed struct
214 #undef __packed_union
215 #define __packed_union __packed union
217 #elif defined(__TASKING__)
218 #undef __packed_struct
219 #define __packed_struct struct __packed__
220 #undef __packed_union
221 #define __packed_union union __packed__
223 #elif defined(__CWCC__)
224 #undef __packed_struct
225 #define __packed_struct struct
226 #undef __packed_union
227 #define __packed_union union
229 #elif defined(__CCRX__)
230 #undef __packed_struct
231 #define __packed_struct struct
232 #undef __packed_union
233 #define __packed_union union
235 #elif defined(__TI_ARM__)
236 #undef __packed_struct
237 #define __packed_struct struct __attribute__((__packed__))
238 #undef __packed_union
239 #define __packed_union union __attribute__((__packed__))
241 #elif defined(_WIN32)
243 #undef __packed_struct
244 #define __packed_struct struct
245 #undef __packed_union
246 #define __packed_union union
251 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
252 #define __weak_func __attribute__((weak))
254 #elif defined(__GNUC__)
255 #define __weak_func __attribute__((weak))
257 #elif defined(__CC_ARM)
258 #define __weak_func __weak
260 #elif defined(__IAR_SYSTEMS_ICC__)
261 #define __weak_func __weak
263 #elif defined(__TASKING__)
264 #define __weak_func __attribute__((weak))
266 #elif defined(__CWCC__)
269 #elif defined(__CCRX__)
272 #elif defined(__TI_ARM__)
273 #define __weak_func __attribute__((weak))
275 #elif defined(_WIN32)
#define strtok_r(str, delim, p)