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.

42 lines
655 B

  1. /*
  2. **++
  3. **
  4. ** Copyright (c) 2002 Microsoft Corporation
  5. **
  6. **
  7. ** Module Name:
  8. **
  9. ** assert.h
  10. **
  11. **
  12. ** Abstract:
  13. **
  14. ** Defines my assert function since I can't use the built-in one
  15. **
  16. ** Author:
  17. **
  18. ** Reuven Lax [reuvenl] 04-June-2002
  19. **
  20. **
  21. ** Revision History:
  22. **
  23. **--
  24. */
  25. #ifndef _ASSERT_H_
  26. #define _ASSERT_H_
  27. #include <stdio.h>
  28. #ifdef _DEBUG
  29. #define _ASSERTE(x) { if (!(x)) FailAssertion(__FILE__, __LINE__, #x ); }
  30. #define assert(x) _ASSERTE(x)
  31. #else
  32. #define _ASSERTE(x)
  33. #define assert(x)
  34. #endif
  35. void FailAssertion(const char* fileName, unsigned int lineNumber, const char* condition);
  36. #endif