home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Languages / Quick C 2.0 / INCLUDE / STDDEF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-12-05  |  1.0 KB  |  52 lines

  1. /***
  2. *stddef.h - definitions/declarations for common constants, types, variables
  3. *
  4. *    Copyright (c) 1985-1989, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file contains definitions and declarations for some commonly
  8. *    used constants, types, and variables.
  9. *    [ANSI]
  10. *
  11. ****/
  12.  
  13.  
  14. #ifndef NO_EXT_KEYS    /* extensions enabled */
  15.     #define _CDECL    cdecl
  16.     #define _NEAR    near
  17. #else /* extensions not enabled */
  18.     #define _CDECL
  19.     #define _NEAR
  20. #endif /* NO_EXT_KEYS */
  21.  
  22.  
  23. /* define the NULL pointer value and the offsetof() macro */
  24.  
  25. #if (defined(M_I86SM) || defined(M_I86MM))
  26. #define  NULL    0
  27. #elif (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
  28. #define  NULL    0L
  29. #endif
  30.  
  31. #define offsetof(s,m)    (size_t)&(((s *)0)->m)
  32.  
  33.  
  34. /* declare reference to errno */
  35.  
  36. extern int _NEAR _CDECL errno;
  37.  
  38.  
  39. /* define the implementation dependent size types */
  40.  
  41. #ifndef _PTRDIFF_T_DEFINED
  42. typedef int ptrdiff_t;
  43. #define _PTRDIFF_T_DEFINED
  44. #endif
  45.  
  46. #ifndef _SIZE_T_DEFINED
  47. typedef unsigned int size_t;
  48. #define _SIZE_T_DEFINED
  49. #endif
  50.  
  51.  
  52.