--- /dev/null
+#ifndef __STDDEF_H
+#define __STDDEF_H
+
+#define NULL ((void *)0)
+
+typedef unsigned long size_t;
+typedef long ptrdiff_t;
+
+#define offsetof(s,m) (size_t)&(((s *)0)->m)
+
+#endif /* __STDDEF_H */
#ifndef __STDLIB_H
#define __STDLIB_H
+#include <stddef.h>
+
#define PRINTF_ZEROPAD 1 /* pad with zero */
#define PRINTF_SIGN 2 /* unsigned/signed long */
#define PRINTF_PLUS 4 /* show plus */
#define PRINTF_SPECIAL 32 /* 0x */
#define PRINTF_LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
-typedef unsigned long size_t;
-typedef long ptrdiff_t;
-
-#define NULL ((void *)0)
-
#define likely(x) x
#define unlikely(x) x