forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conan-io#8920 - Add a patch to call _CrtSetReportMode early in main
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
recipes/m4/all/patches/1.4.19-0003-msvc-debug-assertion.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/src/m4.c b/src/m4.c | ||
index 2bd57750..ca3ded62 100644 | ||
--- a/src/m4.c | ||
+++ b/src/m4.c | ||
@@ -36,6 +36,10 @@ | ||
# include "assert.h" | ||
#endif | ||
|
||
+#ifdef WIN32_NATIVE | ||
+# include <crtdbg.h> | ||
+#endif | ||
+ | ||
/* TRANSLATORS: This is a non-ASCII name: The first name is (with | ||
Unicode escapes) "Ren\u00e9" or (with HTML entities) "René". */ | ||
#define AUTHORS proper_name_utf8 ("Rene' Seindal", "Ren\xC3\xA9 Seindal") | ||
@@ -423,6 +427,15 @@ main (int argc, char *const *argv) | ||
textdomain (PACKAGE); | ||
atexit (close_stdin); | ||
|
||
+#ifdef WIN32_NATIVE | ||
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); | ||
+ _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); | ||
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); | ||
+ _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); | ||
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); | ||
+ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); | ||
+#endif | ||
+ | ||
include_init (); | ||
debug_init (); | ||
|