Subversion Repositories Kolibri OS

Rev

Rev 5270 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5270 Rev 6082
Line 1... Line 1...
1
#ifndef _LINUX_STDDEF_H
1
#ifndef _LINUX_STDDEF_H
2
#define _LINUX_STDDEF_H
2
#define _LINUX_STDDEF_H
Line 3... Line 3...
3
 
3
 
Line 4... Line -...
4
#include 
-
 
5
 
4
#include 
6
 
5
 
Line 7... Line 6...
7
#undef NULL
6
#undef NULL
8
#define NULL ((void *)0)
7
#define NULL ((void *)0)
Line 16... Line 15...
16
#ifdef __compiler_offsetof
15
#ifdef __compiler_offsetof
17
#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
16
#define offsetof(TYPE, MEMBER)	__compiler_offsetof(TYPE, MEMBER)
18
#else
17
#else
19
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
18
#define offsetof(TYPE, MEMBER)	((size_t)&((TYPE *)0)->MEMBER)
20
#endif
19
#endif
-
 
20
 
-
 
21
/**
-
 
22
 * offsetofend(TYPE, MEMBER)
-
 
23
 *
-
 
24
 * @TYPE: The type of the structure
-
 
25
 * @MEMBER: The member within the structure to get the end offset of
-
 
26
 */
-
 
27
#define offsetofend(TYPE, MEMBER) \
-
 
28
	(offsetof(TYPE, MEMBER)	+ sizeof(((TYPE *)0)->MEMBER))
-
 
29
 
21
#endif
30
#endif