Guest User

Untitled

a guest
Oct 18th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. Index: S:/Reactos/lib/rossym_new/compat.h
  2. ===================================================================
  3. --- S:/Reactos/lib/rossym_new/compat.h (revision 52567)
  4. +++ S:/Reactos/lib/rossym_new/compat.h (working copy)
  5. @@ -19,6 +19,19 @@
  6. typedef ulong size_t;
  7. #endif
  8.  
  9. +DECLSPEC_NORETURN
  10. +NTSYSAPI
  11. +VOID
  12. +NTAPI
  13. +RtlRaiseStatus(IN NTSTATUS Status);
  14. +
  15. +#undef assert
  16. +#define assert(x) do { \
  17. + if (!(x)) { \
  18. + werrstr("(%s:%d) assertion " #x " failed\n", __FILE__, __LINE__); \
  19. + RtlRaiseStatus(STATUS_ASSERTION_FAILURE); \
  20. + } \
  21. + } while (0)
  22. #define offsetof(x,y) FIELD_OFFSET(x,y)
  23. #define nil (0)
  24.  
  25. @@ -32,7 +45,13 @@
  26. void xfree(void *v);
  27.  
  28. #define werrstr(str, ...) DPRINT(str "\n" ,##__VA_ARGS__)
  29. -//#define werrstr(x, ...) printf("(%s:%d) " x "\n",__FILE__,__LINE__,##__VA_ARGS__)
  30. +#if 0
  31. +#ifdef NDEBUG
  32. +#define werrstr(x, ...)
  33. +#else
  34. +#define werrstr(x, ...) printf("(%s:%d) " x "\n",__FILE__,__LINE__,##__VA_ARGS__)
  35. +#endif
  36. +#endif
  37.  
  38. #define malloc(x) RosSymAllocMem(x)
  39. #define mallocz(x,y) RosSymAllocMemZero(x,y)
Add Comment
Please, Sign In to add comment