summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-17 14:46:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-17 18:36:08 +0900
commitf08fcd0e803bb07912794b8a2366973946d2af2f (patch)
tree274c9247376b2d53755f023019625d64350cdc27 /error.c
parent85cee293570e10f11170d54c7fae7ac681a52193 (diff)
downloadruby-f08fcd0e803bb07912794b8a2366973946d2af2f.tar.gz
Fix possible use of undefined macros on very old macOS [ci skip]
Diffstat (limited to 'error.c')
-rw-r--r--error.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/error.c b/error.c
index b37d139b7c..ceea1c55d1 100644
--- a/error.c
+++ b/error.c
@@ -666,6 +666,11 @@ bug_important_message(FILE *out, const char *const msg, size_t len)
fwrite(p, 1, endmsg - p, out);
}
+#undef CRASH_REPORTER_MAY_BE_CREATED
+#if defined(__APPLE__) && \
+ (!defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6)
+# define CRASH_REPORTER_MAY_BE_CREATED
+#endif
static void
preface_dump(FILE *out)
{
@@ -674,7 +679,7 @@ preface_dump(FILE *out)
"-- Crash Report log information "
"--------------------------------------------\n"
" See Crash Report log file in one of the following locations:\n"
-# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
+# ifdef CRASH_REPORTER_MAY_BE_CREATED
" * ~/Library/Logs/CrashReporter\n"
" * /Library/Logs/CrashReporter\n"
# endif
@@ -699,7 +704,7 @@ postscript_dump(FILE *out)
"[IMPORTANT]"
/*" ------------------------------------------------"*/
"\n""Don't forget to include the Crash Report log file under\n"
-# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
+# ifdef CRASH_REPORTER_MAY_BE_CREATED
"CrashReporter or "
# endif
"DiagnosticReports directory in bug reports.\n"