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.

35 lines
590 B

  1. /***
  2. *assert.h - define the assert macro
  3. *
  4. * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Defines the assert(exp) macro.
  8. * [ANSI/System V]
  9. *
  10. ****/
  11. #if (_MSC_VER <= 600)
  12. #define __cdecl _cdecl
  13. #define __far _far
  14. #endif
  15. #undef assert
  16. #ifdef NDEBUG
  17. #define assert(exp) ((void)0)
  18. #else
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. void __cdecl _assert(void *, void *, unsigned);
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #define assert(exp) \
  27. ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) )
  28. #endif