tkernel_2/include/stddef.h | bare source | permlink (0.03 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * T-Kernel 2.0 Software Package 4: * 5: * Copyright 2011 by Ken Sakamura. 6: * This software is distributed under the latest version of T-License 2.x. 7: *---------------------------------------------------------------------- 8: * 9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17. 10: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/01. 11: * 12: *---------------------------------------------------------------------- 13: */ 14: 15: /* 16: * @(#)stddef.h 17: * 18: * C language: common definitions 19: */ 20: 21: #ifndef __STDDEF_H__ 22: #define __STDDEF_H__ 23: 24: #include <stdtype.h> 25: 26: #ifdef __cplusplus 27: extern "C" { 28: #endif 29: 30: typedef int ptrdiff_t; 31: 32: #ifdef __size_t 33: typedef __size_t size_t; 34: #undef __size_t 35: #endif 36: 37: #ifdef __wchar_t 38: typedef __wchar_t wchar_t; 39: #undef __wchar_t 40: #endif 41: 42: #define offsetof(type, member) ( (size_t)(&((type *)0)->member) ) 43: #define NULL 0 44: 45: #ifdef __cplusplus 46: } 47: #endif 48: #endif /* __STDDEF_H__ */