Blame view

include/linux/stddef.h 435 Bytes
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
  #ifndef _LINUX_STDDEF_H
  #define _LINUX_STDDEF_H
  
  #include <linux/compiler.h>
  
  #undef NULL
  #if defined(__cplusplus)
  #define NULL 0
  #else
  #define NULL ((void *)0)
  #endif
1694176a2   David Woodhouse   Remove offsetof()...
12
  #ifdef __KERNEL__
6e2182874   Richard Knutsson   [PATCH] Generic b...
13
14
15
16
17
  
  enum {
  	false	= 0,
  	true	= 1
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
18
19
20
21
22
23
  #undef offsetof
  #ifdef __compiler_offsetof
  #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
  #else
  #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  #endif
1694176a2   David Woodhouse   Remove offsetof()...
24
  #endif /* __KERNEL__ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
25
26
  
  #endif