home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / pdksh-4.9-src.tgz / tar.out / contrib / pdksh / std / h / stddef.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  741b  |  42 lines

  1. /* ANSI common definitions */
  2.  
  3. /* $Id: stddef.h,v 1.3 93/05/05 21:18:23 sjg Exp $ */
  4.  
  5. #ifndef NULL
  6. #if __STDC__
  7. #define    NULL    (void*)0
  8. #else
  9. #define    NULL    0
  10. #endif
  11. #endif
  12.  
  13. #ifndef _STDDEF_H
  14. #define    _STDDEF_H
  15.  
  16. /* doesn't really belong here, but the library function need it */
  17. #ifndef ARGS
  18. # ifdef  __STDC__
  19. #   define ARGS(args) args
  20. # else
  21. #   define ARGS(args) ()
  22. #   ifdef VOID
  23. #     define void VOID
  24. #   endif
  25. #   define const
  26. #   define volatile
  27. # endif
  28. #endif
  29.  
  30. #ifdef HAVE_SYS_STDTYPES
  31. # include <sys/stdtypes.h>
  32. #else
  33. typedef unsigned size_t;        /* may need long */
  34. typedef int ptrdiff_t;
  35. #endif /* HAVE_SYS_STDTYPES */
  36. #define    offsetof(type,id) ((size_t)&((type*)NULL)->id)
  37.  
  38. extern    int errno;        /* really belongs in <errno.h> */
  39.  
  40. #endif
  41.  
  42.