Remove prog_char, for compliance with gcc 4.6.1

This commit is contained in:
maniacbug
2012-01-17 22:05:11 -08:00
parent 205d4b5cc1
commit f6e59b9de8
5 changed files with 160 additions and 145 deletions

View File

@@ -37,11 +37,13 @@ extern HardwareSPI SPI;
#endif
// Avoid spurious warnings
#if 1
#if ! defined( NATIVE ) && defined( ARDUINO )
#undef PROGMEM
#define PROGMEM __attribute__(( section(".progmem.data") ))
#undef PSTR
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
#endif
#endif
// Progmem is Arduino-specific
@@ -49,7 +51,7 @@ extern HardwareSPI SPI;
#include <avr/pgmspace.h>
#define PRIPSTR "%S"
#else
typedef char const prog_char;
typedef char const char;
typedef uint16_t prog_uint16_t;
#define PSTR(x) (x)
#define printf_P printf