Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.8 KiB

  1. // xstddef standard header
  2. #ifndef _XSTDDEF_
  3. #define _XSTDDEF_
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7. #include <cstddef>
  8. /* Define _CRTIMP2 */
  9. #ifndef _CRTIMP2
  10. #ifdef CRTDLL2
  11. #define _CRTIMP2 __declspec(dllexport)
  12. #else /* ndef CRTDLL2 */
  13. #ifdef _DLL
  14. #define _CRTIMP2 __declspec(dllimport)
  15. #else /* ndef _DLL */
  16. #define _CRTIMP2
  17. #endif /* _DLL */
  18. #endif /* CRTDLL2 */
  19. #endif /* _CRTIMP2 */
  20. #ifdef _MSC_VER
  21. #pragma pack(push,8)
  22. #endif /* _MSC_VER */
  23. _STD_BEGIN
  24. // EXCEPTION MACROS
  25. #define _HAS_EXCEPTIONS 1
  26. #if _HAS_EXCEPTIONS
  27. #define _TRY_BEGIN try {
  28. #define _CATCH(x) } catch (x) {
  29. #define _CATCH_ALL } catch (...) {
  30. #define _CATCH_END }
  31. #define _RAISE(x) throw (x)
  32. #define _RERAISE throw
  33. #define _THROW0() throw ()
  34. #define _THROW1(x) throw (x)
  35. #define _THROW(x, y) throw x(y)
  36. #else /* no exceptions */
  37. #define _TRY_BEGIN {{
  38. #define _CATCH(x) } if (0) {
  39. #define _CATCH_ALL } if (0) {
  40. #define _CATCH_END }}
  41. #define _RAISE(x) (x)
  42. #define _RERAISE
  43. #define _THROW0()
  44. #define _THROW1(x)
  45. #define _THROW(x, y) x(y)
  46. #endif /* _HAS_EXCEPTIONS */
  47. // explicit KEYWORD
  48. // BITMASK MACROS
  49. #define _BITMASK(E, T) typedef int T
  50. #define _BITMASK_OPS(T)
  51. // MISCELLANEOUS MACROS
  52. #define _DESTRUCTOR(ty, ptr) (ptr)->~ty()
  53. #define _PROTECTED public
  54. #define _TDEF(x) = x
  55. #define _TDEF2(x, y) = x, y
  56. #define _CNTSIZ(iter) ptrdiff_t
  57. #define _TDEFP(x)
  58. #define _STCONS(ty, name, val) enum {name = val}
  59. // TYPE DEFINITIONS
  60. enum _Uninitialized {_Noinit};
  61. // FUNCTIONS
  62. _CRTIMP2 void __cdecl _Nomemory();
  63. _STD_END
  64. #ifdef _MSC_VER
  65. #pragma pack(pop)
  66. #endif /* _MSC_VER */
  67. #endif /* _XSTDDEF_ */
  68. /*
  69. * Copyright (c) 1995 by P.J. Plauger. ALL RIGHTS RESERVED.
  70. * Consult your license regarding permissions and restrictions.
  71. */