Sfoglia il codice sorgente

Remove functions already defined in the standard library

Since newlib 2.2.0 itoa() and utoa() are declared in stdlib.h and redefining them makes the compiler unhappy
teensy4-core
Laurentiu Nicola 10 anni fa
parent
commit
4096258944
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      teensy3/avr_functions.h

+ 4
- 0
teensy3/avr_functions.h Vedi File

@@ -94,10 +94,14 @@ static inline void eeprom_update_block(const void *buf, void *addr, uint32_t len

char * ultoa(unsigned long val, char *buf, int radix);
char * ltoa(long val, char *buf, int radix);

#if defined(_NEWLIB_VERSION) && (__NEWLIB__ < 2 || __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 2)
static inline char * utoa(unsigned int val, char *buf, int radix) __attribute__((always_inline, unused));
static inline char * utoa(unsigned int val, char *buf, int radix) { return ultoa(val, buf, radix); }
static inline char * itoa(int val, char *buf, int radix) __attribute__((always_inline, unused));
static inline char * itoa(int val, char *buf, int radix) { return ltoa(val, buf, radix); }
#endif

char * dtostrf(float val, int width, unsigned int precision, char *buf);



Loading…
Annulla
Salva