From 8a6d48c0542876eb3acfc0970c0ab7872db08d5f Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Sun, 6 Dec 2009 05:26:23 +0100 Subject: check in the original version of dde linux26. --- libdde_linux26/contrib/include/linux/stddef.h | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libdde_linux26/contrib/include/linux/stddef.h (limited to 'libdde_linux26/contrib/include/linux/stddef.h') diff --git a/libdde_linux26/contrib/include/linux/stddef.h b/libdde_linux26/contrib/include/linux/stddef.h new file mode 100644 index 00000000..6a40c76b --- /dev/null +++ b/libdde_linux26/contrib/include/linux/stddef.h @@ -0,0 +1,28 @@ +#ifndef _LINUX_STDDEF_H +#define _LINUX_STDDEF_H + +#include + +#undef NULL +#if defined(__cplusplus) +#define NULL 0 +#else +#define NULL ((void *)0) +#endif + +#ifdef __KERNEL__ + +enum { + false = 0, + true = 1 +}; + +#undef offsetof +#ifdef __compiler_offsetof +#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) +#else +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif +#endif /* __KERNEL__ */ + +#endif -- cgit v1.2.3