]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
protect against multiple inclusion
authorregehr <regehr>
Sun, 17 Feb 2008 22:45:27 +0000 (22:45 +0000)
committerregehr <regehr>
Sun, 17 Feb 2008 22:45:27 +0000 (22:45 +0000)
tos/lib/safe/include/annots_stage1.h
tos/lib/safe/include/annots_stage2.h

index f6a71097a7ff877ed7dc704440143f60f18fde34..03e5f8d36a88328ed7c07f9dda05341507ee2e21 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef ANNOTS_STAGE1_INCLUDED
+#define ANNOTS_STAGE1_INCLUDED
+
 #if NESC >= 130
 
 struct @bound @deputy_scope() @macro("__DEPUTY_BOUND") { void *lo, *hi; }; 
@@ -21,13 +24,16 @@ struct @nonnull @deputy_scope() @macro("__DEPUTY_NONNULL") { };
 #define SINGLE                                 
 #define NONNULL                                
 
-#endif // NESC version check
+#endif 
 
 #ifdef SAFE_TINYOS
+
 #define TCAST(__type,__expr)                   ((__type)((void * __DEPUTY_TRUSTED __DEPUTY_COPYTYPE)(__expr)))
 #define __DEPUTY_TRUSTED                       __attribute__((trusted))
 #define __DEPUTY_COPYTYPE                      __attribute__((copytype))
 #else
 #define TCAST(__type,__expr)                   ((__type)(__expr))                
-#endif
+#endif 
+
+#endif // ANNOTS_STAGE1_INCLUDED
 
index b32702248cade13fae806cd6c599e6a34b8316e8..976bcc7682d4d91757b60414a3baa58362440570 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef ANNOTS_STAGE2_INCLUDED
+#define ANNOTS_STAGE2_INCLUDED
+
 #ifdef SAFE_TINYOS
 
 #define __DEPUTY_BOUND(__lo,__hi)              __attribute__((bounds((__lo),(__hi))))
@@ -6,7 +9,7 @@
 #define __DEPUTY_NONNULL(__n)                  __attribute__((nonnull))
 #define __DEPUTY_TRUSTEDBLOCK                  __blockattribute__((trusted))
 
-#else
+#else 
 
 #define __DEPUTY_BOUND(__lo,__hi)              
 #define __DEPUTY_COUNT(__n)                    
@@ -14,4 +17,7 @@
 #define __DEPUTY_NONNULL(__n)                  
 #define __DEPUTY_TRUSTEDBLOCK                  
 
-#endif
+#endif 
+
+#endif 
+