home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c220 / 4.ddi / INC / STDDEF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-16  |  864 b   |  34 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. #define NULL      ((void *)0)
  13. #ifndef _SIZE_T_DEFINED
  14. #define _SIZE_T_DEFINED
  15. typedef unsigned int size_t;
  16. #endif
  17. #ifndef _WCHAR_T_DEFINED
  18. #define _WCHAR_T_DEFINED
  19. typedef char wchar_t;
  20. #endif
  21. #ifndef _PTRDIFF_T_DEFINED
  22. #define _PTRDIFF_T_DEFINED
  23. typedef int ptrdiff_t;
  24. #endif
  25. extern int errno;       /* See Status.cf for the possible values. */
  26. /* #define offsetof(Type,Field) _offsetof(Type,Field) */
  27. /* #define offsetof(Type,Field) (int)(&((Type *)0)->Field) */
  28. /* This version of the macro prevents problems in type-size conversion from
  29.  * a pointer to an int.
  30.  */
  31. #define offsetof(Type,Field) (int)((char *)&((Type *)0)->Field-(char *)0)
  32.  
  33. #endif /* _STDDEF_H */
  34.