]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Update to allow header files to be processed via standard gcc and not have to run...
authorklueska <klueska>
Thu, 27 Mar 2008 00:52:02 +0000 (00:52 +0000)
committerklueska <klueska>
Thu, 27 Mar 2008 00:52:02 +0000 (00:52 +0000)
tos/system/tos.h
tos/types/TinyError.h

index 25ec7569946c10a3f1c59c918d183f5f3575b2c3..ec49a208ff0ca21128e40fec961b742e75d031a7 100644 (file)
@@ -30,9 +30,11 @@ uint16_t TOS_NODE_ID = 1;
    transfer in interfaces. See TEP 3 for more discussion. */
 #define PASS
 
+#ifdef NESC
 struct @atmostonce { };
 struct @atleastonce { };
 struct @exactlyonce { };
+#endif
 
 /* This platform_bootstrap macro exists in accordance with TEP
    107. A platform may override this through a platform.h file. */
index 02249bc2db5ca56d6f537598becec9de4dbd50e5..c2ed2bfab8c9b13f2ed60d9465def147a1f56e34 100644 (file)
 #ifndef TINY_ERROR_H_INCLUDED
 #define TINY_ERROR_H_INCLUDED
 
+#ifdef NESC
+#define NESC_COMBINE(x) @combine(x)
+#else
+#define NESC_COMBINE(x)
+#endif
+
 enum {
   SUCCESS        = 0,          
   FAIL           = 1,           // Generic condition: backwards compatible
@@ -44,7 +50,7 @@ enum {
   EALREADY       = 9,           // The device state you are requesting is already set
 };
 
-typedef uint8_t error_t @combine("ecombine");
+typedef uint8_t error_t NESC_COMBINE("ecombine");
 
 error_t ecombine(error_t r1, error_t r2)
 /* Returns: r1 if r1 == r2, FAIL otherwise. This is the standard error