From b5f0874cd96ee2a62aabc645b9626c2749cb6a01 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 26 Mar 2012 12:54:45 +0200 Subject: initial pintos checkin --- pintos-progos/lib/stddef.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pintos-progos/lib/stddef.h (limited to 'pintos-progos/lib/stddef.h') diff --git a/pintos-progos/lib/stddef.h b/pintos-progos/lib/stddef.h new file mode 100644 index 0000000..4e74fa6 --- /dev/null +++ b/pintos-progos/lib/stddef.h @@ -0,0 +1,12 @@ +#ifndef __LIB_STDDEF_H +#define __LIB_STDDEF_H + +#define NULL ((void *) 0) +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER) + +/* GCC predefines the types we need for ptrdiff_t and size_t, + so that we don't have to guess. */ +typedef __PTRDIFF_TYPE__ ptrdiff_t; +typedef __SIZE_TYPE__ size_t; + +#endif /* lib/stddef.h */ -- cgit v1.2.3