diff --git a/cpu/msp430/msp430def.h b/cpu/msp430/msp430def.h index b07a0514e..7f95473c7 100644 --- a/cpu/msp430/msp430def.h +++ b/cpu/msp430/msp430def.h @@ -50,7 +50,9 @@ #else /* __MSPGCC__ */ #include #include +#if !defined(MSP430_MEMCPY_WORKAROUND) && (__GNUC__ < 4) #define MSP430_MEMCPY_WORKAROUND 1 +#endif #endif /* __MSPGCC__ */ #define CC_CONF_INLINE inline @@ -110,26 +112,9 @@ spl_t splhigh_(void); void *w_memcpy(void *out, const void *in, size_t n); #define memcpy(dest, src, count) w_memcpy(dest, src, count) -/* #define memcpy(dest, src, count) do { \ */ -/* if(count == 2) { \ */ -/* *((uint8_t *)dest) = *((uint8_t *)src); \ */ -/* *((uint8_t *)dest + 1) = *((uint8_t *)src + 1); \ */ -/* } else { \ */ -/* memcpy(dest, src, count); \ */ -/* } \ */ -/* } while(0) */ - void *w_memset(void *out, int value, size_t n); #define memset(dest, value, count) w_memset(dest, value, count) -/* #define memset(dest, value, count) do { \ */ -/* if(count == 2) { \ */ -/* *((uint8_t *)dest) = (uint8_t)value; \ */ -/* *((uint8_t *)dest + 1) = (uint8_t)value; \ */ -/* } else { \ */ -/* memset(dest, value, count); \ */ -/* } \ */ -/* } while(0) */ #endif /* memcpy */ #endif /* __GNUC__ && __MSP430__ && MSP430_MEMCPY_WORKAROUND */ diff --git a/platform/esb/contiki-conf.h b/platform/esb/contiki-conf.h index 15a17989c..a577b7fe0 100644 --- a/platform/esb/contiki-conf.h +++ b/platform/esb/contiki-conf.h @@ -18,7 +18,6 @@ #define BV(x) (1 << x) #else #define CC_CONF_INLINE inline -#define MSP430_MEMCPY_WORKAROUND 1 #endif #define HAVE_STDINT_H diff --git a/platform/jcreate/platform-jcreate-conf.h b/platform/jcreate/platform-jcreate-conf.h index 7845301dd..620127f6b 100644 --- a/platform/jcreate/platform-jcreate-conf.h +++ b/platform/jcreate/platform-jcreate-conf.h @@ -63,7 +63,6 @@ #define CC_CONF_INLINE inline #define HAVE_STDINT_H -#define MSP430_MEMCPY_WORKAROUND 1 #include "msp430def.h" diff --git a/platform/sentilla-usb/platform-sentilla-usb-conf.h b/platform/sentilla-usb/platform-sentilla-usb-conf.h index 68e52d646..67bbee5a7 100644 --- a/platform/sentilla-usb/platform-sentilla-usb-conf.h +++ b/platform/sentilla-usb/platform-sentilla-usb-conf.h @@ -62,7 +62,6 @@ #define CC_CONF_INLINE inline #define HAVE_STDINT_H -#define MSP430_MEMCPY_WORKAROUND 1 #include "msp430def.h" diff --git a/platform/z1/platform-conf.h b/platform/z1/platform-conf.h index 496f49295..a8f4ce19a 100644 --- a/platform/z1/platform-conf.h +++ b/platform/z1/platform-conf.h @@ -73,7 +73,6 @@ #define CLIF #define HAVE_STDINT_H -#define MSP430_MEMCPY_WORKAROUND 1 #include "msp430def.h" /* XXX Temporary place for defines that are lacking in mspgcc4's gpio.h */ diff --git a/platform/z1sp/platform-conf.h b/platform/z1sp/platform-conf.h index 063811eff..c25d822d9 100644 --- a/platform/z1sp/platform-conf.h +++ b/platform/z1sp/platform-conf.h @@ -62,7 +62,6 @@ #define CC_CONF_INLINE inline #define HAVE_STDINT_H -#define MSP430_MEMCPY_WORKAROUND 1 #include "msp430def.h" /* XXX Temporary place for defines that are lacking in mspgcc4's gpio.h */