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)
48 #if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)
50 typedef int32_t
int_t;
52 typedef int16_t int8_t;
53 typedef uint16_t uint8_t;
60 #if defined(__ADSPSC5xx__)
62 #elif !defined(R_TYPEDEFS_H) && !defined(USE_CHIBIOS_2)
77 #if defined(__C32_LEGACY_LIBC__)
87 #elif defined(__MCUXPRESSO)
94 #elif defined(__CWCC__)
108 #elif defined(IDF_VER)
123 #define PRIuTIME "lu"
125 #elif defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)
132 #define PRIuTIME "lu"
134 #elif defined(__linux__) || defined(__FreeBSD__)
135 #define PRIuSIZE "zu"
136 #define PRIXSIZE "zX"
137 #define PRIuTIME "lu"
139 #elif defined(_WIN32)
140 #define PRIuSIZE "Iu"
141 #define PRIXSIZE "IX"
142 #define PRIuTIME "lu"
144 #elif defined(__GNUC__) && defined(_NANO_FORMATTED_IO) && (_NANO_FORMATTED_IO != 0)
164 #define PRIuTIME "lu"
168 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
169 int vsnprintf(
char *dest,
size_t size,
const char *format, va_list ap);
172 #elif defined(__GNUC__) && defined(__PPC_EABI__)
173 typedef uint32_t time_t;
174 int strcasecmp(
const char *s1,
const char *s2);
175 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
178 #elif defined(__GNUC__)
179 int strcasecmp(
const char *s1,
const char *s2);
180 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
183 #elif defined(__TASKING__)
186 #elif defined(__XC32)
187 #define sprintf _sprintf
188 int sprintf(
char *str,
const char *format, ...);
189 int strcasecmp(
const char *s1,
const char *s2);
190 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
193 #elif defined(__CWCC__)
194 typedef uint32_t time_t;
195 int strcasecmp(
const char *s1,
const char *s2);
196 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
199 #elif defined(__CCRX__)
200 int strcasecmp(
const char *s1,
const char *s2);
201 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
204 #elif defined(__TI_COMPILER_VERSION__)
205 int strcasecmp(
const char *s1,
const char *s2);
206 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
211 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
212 #undef __packed_struct
213 #define __packed_struct struct __attribute__((packed))
214 #undef __packed_union
215 #define __packed_union union __attribute__((packed))
217 #elif defined(__GNUC__)
218 #undef __packed_struct
219 #define __packed_struct struct __attribute__((__packed__))
220 #undef __packed_union
221 #define __packed_union union __attribute__((__packed__))
223 #elif defined(__CC_ARM)
225 #undef __packed_struct
226 #define __packed_struct __packed struct
227 #undef __packed_union
228 #define __packed_union __packed union
230 #elif defined(__IAR_SYSTEMS_ICC__)
231 #undef __packed_struct
232 #define __packed_struct __packed struct
233 #undef __packed_union
234 #define __packed_union __packed union
236 #elif defined(__TASKING__)
237 #undef __packed_struct
238 #define __packed_struct struct __packed__
239 #undef __packed_union
240 #define __packed_union union __packed__
242 #elif defined(__CWCC__)
243 #undef __packed_struct
244 #define __packed_struct struct
245 #undef __packed_union
246 #define __packed_union union
248 #elif defined(__CCRX__)
249 #undef __packed_struct
250 #define __packed_struct struct
251 #undef __packed_union
252 #define __packed_union union
254 #elif defined(__TI_COMPILER_VERSION__)
255 #undef __packed_struct
256 #define __packed_struct struct __attribute__((__packed__))
257 #undef __packed_union
258 #define __packed_union union __attribute__((__packed__))
260 #elif defined(_WIN32)
262 #undef __packed_struct
263 #define __packed_struct struct
264 #undef __packed_union
265 #define __packed_union union
270 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
271 #define __weak_func __attribute__((weak))
273 #elif defined(__GNUC__)
274 #define __weak_func __attribute__((weak))
276 #elif defined(__CC_ARM)
277 #define __weak_func __weak
279 #elif defined(__IAR_SYSTEMS_ICC__)
280 #define __weak_func __weak
282 #elif defined(__TASKING__)
283 #define __weak_func __attribute__((weak))
285 #elif defined(__CWCC__)
288 #elif defined(__CCRX__)
291 #elif defined(__TI_COMPILER_VERSION__)
292 #define __weak_func __attribute__((weak))
294 #elif defined(_WIN32)
#define strtok_r(str, delim, p)