+#ifndef ANNOTS_STAGE1_INCLUDED
+#define ANNOTS_STAGE1_INCLUDED
+
#if NESC >= 130
struct @bound @deputy_scope() @macro("__DEPUTY_BOUND") { void *lo, *hi; };
#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
+#ifndef ANNOTS_STAGE2_INCLUDED
+#define ANNOTS_STAGE2_INCLUDED
+
#ifdef SAFE_TINYOS
#define __DEPUTY_BOUND(__lo,__hi) __attribute__((bounds((__lo),(__hi))))
#define __DEPUTY_NONNULL(__n) __attribute__((nonnull))
#define __DEPUTY_TRUSTEDBLOCK __blockattribute__((trusted))
-#else
+#else
#define __DEPUTY_BOUND(__lo,__hi)
#define __DEPUTY_COUNT(__n)
#define __DEPUTY_NONNULL(__n)
#define __DEPUTY_TRUSTEDBLOCK
-#endif
+#endif
+
+#endif
+