]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/common.h
refactor path functions, working do_rm()
[z180-stamp.git] / include / common.h
index dea638aa7d0261f808890992a4065a4d30317e85..eb38853cbe96ad0f8870df023a1bd32691079949 100644 (file)
@@ -9,6 +9,14 @@
 
 #include <stdio.h>
 #include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
+
+#define USED __attribute__((used))
+#define UNUSED __attribute__((unused))
 
 #ifdef __AVR__
 #include <avr/io.h>
@@ -30,10 +38,13 @@ struct bits {
 
 #define SBIT(port,pin) ((*(volatile struct bits*)&port).b##pin)
 
-//TODO:
+//GCC bug PR61443
 //  Known to work: 4.8.4, 4.9.1
 //  Known to fail: 4.8.3, 4.9.0
+
+#if (GCC_VERSION < 40804) || (GCC_VERSION == 40900)
 #define GCC_BUG_61443 1
+#endif /* PR61443 */
 
 #else
 // TODO: stm32