fixup! msvc: provide a main() wrapper similar to mingw_main()

This commit is contained in:
Johannes Schindelin
2016-12-23 16:50:34 +01:00
parent 39f90896be
commit 35ebda5da1
2 changed files with 3 additions and 2 deletions

View File

@@ -3039,7 +3039,7 @@ int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env)
char **my_utf8_argv = NULL, **save = NULL;
char *buffer = NULL;
int maxlen;
int k, x;
int k, exit_status;
#ifdef _DEBUG
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
@@ -3094,7 +3094,7 @@ int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env)
current_directory_len = GetCurrentDirectoryW(0, NULL);
/* invoke the real main() using our utf8 version of argv. */
int exit_status = msc_main(argc, my_utf8_argv);
exit_status = msc_main(argc, my_utf8_argv);
for (k = 0; k < argc; k++)
free(save[k]);

View File

@@ -702,6 +702,7 @@ extern CRITICAL_SECTION pinfo_cs;
#if defined(_MSC_VER)
int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env);
extern int msc_main(int argc, const char **argv);
#define main(c,v) dummy_decl_msc_main(void); \
int wmain(int my_argc, \