home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc / include / stddef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-25  |  1.2 KB  |  54 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. /* The standard type defined in tm.h is unsigned int. */
  37. typedef unsigned int size_t;
  38. #endif /* ___int_size_t_h */
  39. #endif /* _SIZE_T_ */
  40. #endif /* __SIZE_T */
  41. #endif /* _T_SIZE */
  42. #endif /* _SIZE_T */
  43.  
  44. /* A null pointer constant.  */
  45.  
  46. #undef NULL        /* in case <stdio.h> has defined it. */
  47. #define NULL ((void *)0)
  48.  
  49. /* Offset of member MEMBER in a struct of type TYPE.  */
  50.  
  51. #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  52.  
  53. #endif /* _STDDEF_H */
  54.