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.

34 lines
594 B

  1. /***
  2. *assert.h - define the assert macro
  3. *
  4. * Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Defines the assert(exp) macro.
  8. * [ANSI/System V]
  9. *
  10. ****/
  11. #if defined(_DLL) && !defined(_MT)
  12. #error Cannot define _DLL without _MT
  13. #endif
  14. #ifdef _MT
  15. #define _FAR_ _far
  16. #else
  17. #define _FAR_
  18. #endif
  19. #undef assert
  20. #ifdef NDEBUG
  21. #define assert(exp) ((void)0)
  22. #else
  23. void _FAR_ _cdecl _assert(void _FAR_ *, void _FAR_ *, unsigned);
  24. #define assert(exp) \
  25. ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) )
  26. #endif /* NDEBUG */