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.

83 lines
1.7 KiB

  1. // xstddef standard header
  2. #pragma once
  3. #ifndef _XSTDDEF_
  4. #define _XSTDDEF_
  5. #ifndef _YVALS
  6. #include <yvals.h>
  7. #endif
  8. #include <cstddef>
  9. #pragma pack(push,8)
  10. #pragma warning(push,3)
  11. _STD_BEGIN
  12. // EXCEPTION MACROS
  13. #if _HAS_EXCEPTIONS
  14. #define _TRY_BEGIN try {
  15. #define _CATCH(x) } catch (x) {
  16. #define _CATCH_ALL } catch (...) {
  17. #define _CATCH_END }
  18. #define _RAISE(x) throw (x)
  19. #define _RERAISE throw
  20. #define _THROW0() throw ()
  21. #define _THROW1(x) throw (...)
  22. #define _THROW(x, y) throw x(y)
  23. #else /* no exceptions */
  24. #define _TRY_BEGIN {{
  25. #define _CATCH(x) } if (0) {
  26. #define _CATCH_ALL } if (0) {
  27. #define _CATCH_END }}
  28. #define _RAISE(x) _Throw(x)
  29. #define _RERAISE
  30. #define _THROW0()
  31. #define _THROW1(x)
  32. #define _THROW(x, y) x(y)._Raise()
  33. #endif /* _HAS_EXCEPTIONS */
  34. // typename KEYWORD
  35. #define _TEMPLATE template<>
  36. #ifndef _TEMPLATE_STAT
  37. #define _TEMPLATE_STAT template<>
  38. #endif
  39. #ifndef _TEMPLATE_MEMBER
  40. #define _TEMPLATE_MEMBER template
  41. #endif
  42. // BITMASK MACROS
  43. #define _BITMASK(Enum, Ty) typedef int Ty
  44. #define _BITMASK_OPS(Ty)
  45. // MISCELLANEOUS MACROS
  46. #define _DESTRUCTOR(ty, ptr) (ptr)->~ty()
  47. #define _MESG(str) str
  48. #define _PROTECTED protected
  49. #define _TDEF(x) = x
  50. #define _TDEF2(x, y) = x, y
  51. #define _STCONS(ty, name, val) static const ty name = (ty)(val)
  52. // TYPE DEFINITIONS
  53. enum _Uninitialized
  54. { // tag for suppressing initialization
  55. _Noinit};
  56. // FUNCTIONS
  57. _CRTIMP2 void __cdecl _Nomemory();
  58. _STD_END
  59. #pragma warning(pop)
  60. #pragma pack(pop)
  61. #endif /* _XSTDDEF_ */
  62. /*
  63. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  64. * Consult your license regarding permissions and restrictions.
  65. V3.10:0009 */