X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/6dccf0e0b5e80b7b6176e8d332e646175431bb3d..507116e319a1470bb0a5040d4d23e5c76955ef97:/gen/FreeBSD/assert.c diff --git a/gen/FreeBSD/assert.c b/gen/FreeBSD/assert.c index bf0de53..0d4c06e 100644 --- a/gen/FreeBSD/assert.c +++ b/gen/FreeBSD/assert.c @@ -36,7 +36,12 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/assert.c,v 1.8 2007/01/09 00:27:53 imp Exp #include #include #include +#if __has_include() #include +#else +#define CRGetCrashLogMessage() NULL +#define CRSetCrashLogMessage(...) +#endif #include "_simple.h" void @@ -48,12 +53,12 @@ __assert_rtn(func, file, line, failedexpr) if (func == (const char *)-1L) { /* 8462256: special case to replace __eprintf */ _simple_dprintf(STDERR_FILENO, - "%s:%u: failed assertion `%s'\n", file, line, failedexpr); + "%s:%d: failed assertion `%s'\n", file, line, failedexpr); if (!CRGetCrashLogMessage()) { _SIMPLE_STRING s = _simple_salloc(); if (s) { _simple_sprintf(s, - "%s:%u: failed assertion `%s'\n", + "%s:%d: failed assertion `%s'\n", file, line, failedexpr); CRSetCrashLogMessage(_simple_string(s)); } else