home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / STDDEF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.1 KB  |  62 lines

  1. /*  stddef.h
  2.  
  3.     Definitions for common types, and NULL
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 6.0
  9.  *
  10.  *      Copyright (c) 1987, 1993 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __STDDEF_H
  16. #define __STDDEF_H
  17.  
  18. #if !defined(___DEFS_H)
  19. #include <_defs.h>
  20. #endif
  21.  
  22. #ifndef NULL
  23. #include <_null.h>
  24. #endif
  25.  
  26. #ifndef _PTRDIFF_T
  27. #define _PTRDIFF_T
  28. #if     defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
  29. typedef long    ptrdiff_t;
  30. #else
  31. typedef int     ptrdiff_t;
  32. #endif
  33. #endif
  34.  
  35. #ifndef _SIZE_T
  36. #define _SIZE_T
  37. typedef unsigned size_t;
  38. #endif
  39.  
  40. #define offsetof( s_name, m_name )  (size_t)&(((s_name _FAR *)0)->m_name)
  41.  
  42. #ifndef __cplusplus
  43. #ifndef _WCHAR_T
  44. #define _WCHAR_T
  45. typedef unsigned short wchar_t;
  46. #endif
  47. #endif
  48.  
  49. #if defined(__OS2__) || defined(__WIN32__)
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53. extern unsigned long _RTLENTRY _EXPFUNC __threadid(void);
  54. #define _threadid (__threadid())
  55.  
  56. #ifdef  __cplusplus
  57. }
  58. #endif
  59. #endif  /* __OS2__ or __WIN32__ */
  60.  
  61. #endif  /* __STDDEF_H */
  62.