summaryrefslogtreecommitdiff
path: root/os/port/lib.h
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-04-07 09:40:13 +0000
committerCharles.Forsyth <devnull@localhost>2007-04-07 09:40:13 +0000
commitb5eeadad52f7e620402f85c9606f45be13323b8d (patch)
tree1c6edd4b3d7fc9277266c66b4dab2593f66b19a0 /os/port/lib.h
parent9dc22068e29604f4b484e746112a9a4efe6fd57f (diff)
20070407-1039 os/port changes
Diffstat (limited to 'os/port/lib.h')
-rw-r--r--os/port/lib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/os/port/lib.h b/os/port/lib.h
index d6af4fa5..c9414b5a 100644
--- a/os/port/lib.h
+++ b/os/port/lib.h
@@ -2,6 +2,9 @@
/*
* functions (possibly) linked in, complete, from libc.
*/
+#define nelem(n) (sizeof(n)/sizeof(n[0]))
+#define offsetof(s, m) (ulong)(&(((s*)0)->m))
+#define assert(x) if(x){}else _assert("x")
/*
* mem routines