Created
July 26, 2019 06:06
-
-
Save Alexpux/ecf22039620a9e7d7a0ee8a42f6b55dc to your computer and use it in GitHub Desktop.
innoextract ansi main
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
diff -Naur innoextract-orig/src/util/windows.cpp innoextract/src/util/windows.cpp | |
--- innoextract-orig/src/util/windows.cpp 2019-07-10 09:30:39.000000000 +0300 | |
+++ innoextract/src/util/windows.cpp 2019-07-26 08:14:12.995980700 +0300 | |
@@ -492,6 +492,7 @@ | |
} // namespace util | |
// We really want main here, not utf8_main. | |
+#ifdef _MSC_VER | |
#undef main | |
int main() { | |
@@ -527,3 +528,4 @@ | |
return utf8_main(argc, argv); | |
} | |
+#endif | |
diff -Naur innoextract-orig/src/util/windows.hpp innoextract/src/util/windows.hpp | |
--- innoextract-orig/src/util/windows.hpp 2019-07-10 09:30:39.000000000 +0300 | |
+++ innoextract/src/util/windows.hpp 2019-07-26 08:14:30.965020100 +0300 | |
@@ -37,11 +37,13 @@ | |
#if defined(_WIN32) | |
+#ifdef _MSC_VER | |
//! Program entry point that will always receive UTF-8 encoded arguments | |
int utf8_main(int argc, char * argv[]); | |
//! We define our own wrapper main(), so rename the real one | |
#define main utf8_main | |
+#endif | |
namespace util { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment