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(R_TYPEDEFS_H) && !defined(USE_CHIBIOS_2)
75 #if defined(__C32_LEGACY_LIBC__)
85 #elif defined(__MCUXPRESSO)
92 #elif defined(__CWCC__)
106 #elif defined(IDF_VER)
121 #define PRIuTIME "lu"
123 #elif defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)
130 #define PRIuTIME "lu"
132 #elif defined(__linux__) || defined(__FreeBSD__)
133 #define PRIuSIZE "zu"
134 #define PRIXSIZE "zX"
135 #define PRIuTIME "lu"
137 #elif defined(_WIN32)
138 #define PRIuSIZE "Iu"
139 #define PRIXSIZE "IX"
140 #define PRIuTIME "lu"
142 #elif defined(__GNUC__) && defined(_NANO_FORMATTED_IO) && (_NANO_FORMATTED_IO != 0)
162 #define PRIuTIME "lu"
166 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
167 int vsnprintf(
char *dest,
size_t size,
const char *format, va_list ap);
170 #elif defined(__GNUC__) && defined(__PPC_EABI__)
171 typedef uint32_t time_t;
172 int strcasecmp(
const char *s1,
const char *s2);
173 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
176 #elif defined(__GNUC__)
177 int strcasecmp(
const char *s1,
const char *s2);
178 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
181 #elif defined(__TASKING__)
184 #elif defined(__XC32)
185 #define sprintf _sprintf
186 int sprintf(
char *str,
const char *format, ...);
187 int strcasecmp(
const char *s1,
const char *s2);
188 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
191 #elif defined(__CWCC__)
192 typedef uint32_t time_t;
193 int strcasecmp(
const char *s1,
const char *s2);
194 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
197 #elif defined(__CCRX__)
198 int strcasecmp(
const char *s1,
const char *s2);
199 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
202 #elif defined(__TI_COMPILER_VERSION__)
203 int strcasecmp(
const char *s1,
const char *s2);
204 int strncasecmp(
const char *s1,
const char *s2,
size_t n);
209 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
210 #undef __packed_struct
211 #define __packed_struct struct __attribute__((packed))
212 #undef __packed_union
213 #define __packed_union union __attribute__((packed))
215 #elif defined(__GNUC__)
216 #undef __packed_struct
217 #define __packed_struct struct __attribute__((__packed__))
218 #undef __packed_union
219 #define __packed_union union __attribute__((__packed__))
221 #elif defined(__CC_ARM)
223 #undef __packed_struct
224 #define __packed_struct __packed struct
225 #undef __packed_union
226 #define __packed_union __packed union
228 #elif defined(__IAR_SYSTEMS_ICC__)
229 #undef __packed_struct
230 #define __packed_struct __packed struct
231 #undef __packed_union
232 #define __packed_union __packed union
234 #elif defined(__TASKING__)
235 #undef __packed_struct
236 #define __packed_struct struct __packed__
237 #undef __packed_union
238 #define __packed_union union __packed__
240 #elif defined(__CWCC__)
241 #undef __packed_struct
242 #define __packed_struct struct
243 #undef __packed_union
244 #define __packed_union union
246 #elif defined(__CCRX__)
247 #undef __packed_struct
248 #define __packed_struct struct
249 #undef __packed_union
250 #define __packed_union union
252 #elif defined(__TI_COMPILER_VERSION__)
253 #undef __packed_struct
254 #define __packed_struct struct __attribute__((__packed__))
255 #undef __packed_union
256 #define __packed_union union __attribute__((__packed__))
258 #elif defined(_WIN32)
260 #undef __packed_struct
261 #define __packed_struct struct
262 #undef __packed_union
263 #define __packed_union union
268 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
269 #define __weak_func __attribute__((weak))
271 #elif defined(__GNUC__)
272 #define __weak_func __attribute__((weak))
274 #elif defined(__CC_ARM)
275 #define __weak_func __weak
277 #elif defined(__IAR_SYSTEMS_ICC__)
278 #define __weak_func __weak
280 #elif defined(__TASKING__)
281 #define __weak_func __attribute__((weak))
283 #elif defined(__CWCC__)
286 #elif defined(__CCRX__)
289 #elif defined(__TI_COMPILER_VERSION__)
290 #define __weak_func __attribute__((weak))
292 #elif defined(_WIN32)
#define strtok_r(str, delim, p)