Tweaks to nhassert implementation. Change to warnings on MSC build.

This commit is contained in:
Bart House
2019-07-12 18:40:34 -07:00
parent 0e8e5aac93
commit 2f3da35c68
5 changed files with 44 additions and 4 deletions

View File

@@ -708,6 +708,23 @@ sys_random_seed(VOID_ARGS)
}
return ourseed;
}
/* nt_assert_failed is called when an nhassert's condition is false */
void
nt_assert_failed(expression, filepath, line)
const char * expression;
const char * filepath;
int line;
{
const char * filename;
/* get file name from path */
filename = strrchr(filepath, '\\');
filename = (filename == NULL ? filepath : filename + 1);
impossible("nhassert(%s) failed in file '%s' at line %d",
expression, filename, line);
}
#endif /* WIN32 */
/*winnt.c*/