stddef.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:1k
- /* $Id$ */
- /* stddef.h: ANSI X3.159 1989 library header, section 4.1.5 */
- /* Copyright (C) Codemist Ltd. */
- /* Copyright (C) SGS-THOMSON Microelectronics Ltd. 1996 */
- #ifndef __stddef_h
- #define __stddef_h
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef int ptrdiff_t;
- #ifndef __size_t
- # define __size_t 1
- typedef unsigned int size_t; /* others (e.g. <stdio.h>) define */
- #endif
- #ifdef _WCHAR_T
- #undef __wchar_t
- #define __wchar_t 1 /* wchar_t is a keyword from EDG */
- #endif
- #ifndef __wchar_t
- # define __wchar_t 1
- typedef char wchar_t; /* also in <stdlib.h> */
- #endif
- #ifndef NULL /* this hack is so that <stdio.h> can also define it */
- # ifdef __cplusplus
- # define NULL 0
- # else
- # define NULL (void *)0
- # endif
- #endif
- #ifdef __cplusplus
- #define ___type
- #endif
- #if defined(__cplusplus) && defined(__EDG__)
- #define offsetof(type, member)
- ((size_t)__INTADDR__(&(((type *)0)->member)))
- #else
- #define offsetof(type, member)
- ((size_t)((char *)&(((___type type *)0)->member) - (char *)0))
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
- /* end of stddef.h */