Fix redefinition of io function
Now it should work fine with any gcc version. Old one produces error like in #657 Signed-off-by: Alexey 'Alexxy' Shvetsov <alexxyum@gmail.com>
This commit is contained in:
parent
9b939f4a3a
commit
805464db23
|
@ -153,11 +153,37 @@ static inline int platform_hwversion(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Use newlib provided integer only stdio functions */
|
||||
#define sscanf siscanf
|
||||
#define sprintf siprintf
|
||||
#define vasprintf vasiprintf
|
||||
#define snprintf sniprintf
|
||||
/*
|
||||
* Use newlib provided integer only stdio functions
|
||||
*/
|
||||
|
||||
/* sscanf */
|
||||
#ifdef sscanf
|
||||
#undef sscanf
|
||||
#define sscanf siscanf
|
||||
#else
|
||||
#define sscanf siscanf
|
||||
#endif
|
||||
/* sprintf */
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#define sprintf siprintf
|
||||
#else
|
||||
#define sprintf siprintf
|
||||
#endif
|
||||
/* vasprintf */
|
||||
#ifdef vasprintf
|
||||
#undef vasprintf
|
||||
#define vasprintf vasiprintf
|
||||
#else
|
||||
#define vasprintf vasiprintf
|
||||
#endif
|
||||
/* snprintf */
|
||||
#ifdef snprintf
|
||||
#undef snprintf
|
||||
#define snprintf sniprintf
|
||||
#else
|
||||
#define snprintf sniprintf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -153,11 +153,38 @@ static inline int platform_hwversion(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Use newlib provided integer only stdio functions */
|
||||
/*
|
||||
* Use newlib provided integer only stdio functions
|
||||
*/
|
||||
|
||||
/* sscanf */
|
||||
#ifdef sscanf
|
||||
#undef sscanf
|
||||
#define sscanf siscanf
|
||||
#else
|
||||
#define sscanf siscanf
|
||||
#endif
|
||||
/* sprintf */
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#define sprintf siprintf
|
||||
#else
|
||||
#define sprintf siprintf
|
||||
#endif
|
||||
/* vasprintf */
|
||||
#ifdef vasprintf
|
||||
#undef vasprintf
|
||||
#define vasprintf vasiprintf
|
||||
#else
|
||||
#define vasprintf vasiprintf
|
||||
#endif
|
||||
/* snprintf */
|
||||
#ifdef snprintf
|
||||
#undef snprintf
|
||||
#define snprintf sniprintf
|
||||
#else
|
||||
#define snprintf sniprintf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -178,10 +178,37 @@ int usbuart_debug_write(const char *buf, size_t len);
|
|||
#define SET_IDLE_STATE(state) {gpio_set_val(LED_PORT, LED_IDLE_RUN, state);}
|
||||
#define SET_ERROR_STATE(state) {gpio_set_val(LED_PORT, LED_ERROR, state);}
|
||||
|
||||
/* Use newlib provided integer only stdio functions */
|
||||
/*
|
||||
* Use newlib provided integer only stdio functions
|
||||
*/
|
||||
|
||||
/* sscanf */
|
||||
#ifdef sscanf
|
||||
#undef sscanf
|
||||
#define sscanf siscanf
|
||||
#else
|
||||
#define sscanf siscanf
|
||||
#endif
|
||||
/* sprintf */
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#define sprintf siprintf
|
||||
#define snprintf sniprintf
|
||||
#else
|
||||
#define sprintf siprintf
|
||||
#endif
|
||||
/* vasprintf */
|
||||
#ifdef vasprintf
|
||||
#undef vasprintf
|
||||
#define vasprintf vasiprintf
|
||||
#else
|
||||
#define vasprintf vasiprintf
|
||||
#endif
|
||||
/* snprintf */
|
||||
#ifdef snprintf
|
||||
#undef snprintf
|
||||
#define snprintf sniprintf
|
||||
#else
|
||||
#define snprintf sniprintf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -148,11 +148,39 @@ extern uint16_t led_idle_run;
|
|||
|
||||
extern uint32_t detect_rev(void);
|
||||
|
||||
/* Use newlib provided integer only stdio functions */
|
||||
/*
|
||||
* Use newlib provided integer only stdio functions
|
||||
*/
|
||||
|
||||
/* sscanf */
|
||||
#ifdef sscanf
|
||||
#undef sscanf
|
||||
#define sscanf siscanf
|
||||
#else
|
||||
#define sscanf siscanf
|
||||
#endif
|
||||
/* sprintf */
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#define sprintf siprintf
|
||||
#else
|
||||
#define sprintf siprintf
|
||||
#endif
|
||||
/* vasprintf */
|
||||
#ifdef vasprintf
|
||||
#undef vasprintf
|
||||
#define vasprintf vasiprintf
|
||||
#else
|
||||
#define vasprintf vasiprintf
|
||||
#endif
|
||||
/* snprintf */
|
||||
#ifdef snprintf
|
||||
#undef snprintf
|
||||
#define snprintf sniprintf
|
||||
#else
|
||||
#define snprintf sniprintf
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -154,11 +154,38 @@ extern void set_idle_state(int state);
|
|||
|
||||
extern uint8_t detect_rev(void);
|
||||
|
||||
/* Use newlib provided integer only stdio functions */
|
||||
/*
|
||||
* Use newlib provided integer only stdio functions
|
||||
*/
|
||||
|
||||
/* sscanf */
|
||||
#ifdef sscanf
|
||||
#undef sscanf
|
||||
#define sscanf siscanf
|
||||
#else
|
||||
#define sscanf siscanf
|
||||
#endif
|
||||
/* sprintf */
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#define sprintf siprintf
|
||||
#else
|
||||
#define sprintf siprintf
|
||||
#endif
|
||||
/* vasprintf */
|
||||
#ifdef vasprintf
|
||||
#undef vasprintf
|
||||
#define vasprintf vasiprintf
|
||||
#else
|
||||
#define vasprintf vasiprintf
|
||||
#endif
|
||||
/* snprintf */
|
||||
#ifdef snprintf
|
||||
#undef snprintf
|
||||
#define snprintf sniprintf
|
||||
#else
|
||||
#define snprintf sniprintf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue