Loading...
gen/FreeBSD/assert.c Libc-825.25 Libc-1669.40.2
--- Libc/Libc-825.25/gen/FreeBSD/assert.c
+++ Libc/Libc-1669.40.2/gen/FreeBSD/assert.c
@@ -36,24 +36,27 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include "CrashReporterClient.h"
+#if __has_include(<CrashReporterClient.h>)
+#include <CrashReporterClient.h>
+#else
+#define CRGetCrashLogMessage() NULL
+#define CRSetCrashLogMessage(...)
+#endif
 #include "_simple.h"
 
 void
-__assert_rtn(func, file, line, failedexpr)
-	const char *func, *file;
-	int line;
-	const char *failedexpr;
+__assert_rtn(const char *func, const char *file, int line,
+    const char *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