home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / cplusplus-8 / stddef.h-gnu < prev    next >
Encoding:
Text File  |  1992-02-07  |  1.1 KB  |  52 lines

  1. #ifndef _STDDEF_H
  2. #define _STDDEF_H
  3.  
  4. /* Signed type of difference of two pointers.  */
  5.  
  6. #ifndef _PTRDIFF_T    /* in case <sys/types.h> has defined it. */
  7. #ifndef _T_PTRDIFF
  8. #ifndef __PTRDIFF_T
  9. #ifndef _PTRDIFF_T_
  10. #ifndef ___int_ptrdiff_t_h
  11. #define _PTRDIFF_T
  12. #define _T_PTRDIFF
  13. #define __PTRDIFF_T
  14. #define _PTRDIFF_T_
  15. #define ___int_ptrdiff_t_h
  16. typedef long ptrdiff_t;
  17. #endif /* ___int_ptrdiff_t_h */
  18. #endif /* _PTRDIFF_T_ */
  19. #endif /* __PTRDIFF_T */
  20. #endif /* _T_PTRDIFF */
  21. #endif /* _PTRDIFF_T */
  22.  
  23. /* Unsigned type of `sizeof' something.  */
  24.  
  25. #ifndef _SIZE_T    /* in case <sys/types.h> has defined it. */
  26. #ifndef _T_SIZE
  27. #ifndef __SIZE_T
  28. #ifndef _SIZE_T_
  29. #ifndef ___int_size_t_h
  30. #define _SIZE_T
  31. #define _T_SIZE
  32. #define __SIZE_T
  33. #define _SIZE_T_
  34. #define ___int_size_t_h
  35. typedef unsigned long size_t;
  36. #endif /* ___int_size_t_h */
  37. #endif /* _SIZE_T_ */
  38. #endif /* __SIZE_T */
  39. #endif /* _T_SIZE */
  40. #endif /* _SIZE_T */
  41.  
  42. /* A null pointer constant.  */
  43.  
  44. #undef NULL        /* in case <stdio.h> has defined it. */
  45. #define NULL ((void *)0)
  46.  
  47. /* Offset of member MEMBER in a struct of type TYPE.  */
  48.  
  49. #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  50.  
  51. #endif /* _STDDEF_H */
  52.