From b5eeadad52f7e620402f85c9606f45be13323b8d Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Sat, 7 Apr 2007 09:40:13 +0000 Subject: 20070407-1039 os/port changes --- os/port/lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'os/port/lib.h') 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 -- cgit v1.2.3