home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / P1 < prev    next >
Encoding:
Text File  |  1992-01-07  |  886 b   |  36 lines

  1. /*
  2.  *   stddef.h -- ANSI 
  3.  *
  4.  *   Various useful macros and types.
  5.  *
  6.  *           Copyright (c) 1990, MetaWare Incorporated
  7.  */
  8.  
  9. #ifndef _STDDEF_H
  10. #define _STDDEF_H
  11.  
  12. #ifndef NULL
  13. #define NULL      ((void *)0)
  14. #endif
  15. #ifndef _SIZE_T_DEFINED
  16. #define _SIZE_T_DEFINED
  17. typedef unsigned int size_t;
  18. #endif
  19. #ifndef _WCHAR_T_DEFINED
  20. #define _WCHAR_T_DEFINED
  21. typedef char wchar_t;
  22. #endif
  23. #ifndef _PTRDIFF_T_DEFINED
  24. #define _PTRDIFF_T_DEFINED
  25. typedef int ptrdiff_t;
  26. #endif
  27. extern int errno;       /* See Status.cf for the possible values. */
  28. /* #define offsetof(Type,Field) _offsetof(Type,Field) */
  29. /* #define offsetof(Type,Field) (int)(&((Type *)0)->Field) */
  30. /* This version of the macro prevents problems in type-size conversion from
  31.  * a pointer to an int.
  32.  */
  33. #define offsetof(Type,Field) (int)((char *)&((Type *)0)->Field-(char *)0)
  34.  
  35. #endif /* _STDDEF_H */
  36.