mirror of
https://github.com/git/git.git
synced 2026-01-27 02:48:32 +00:00
fixup! msvc: provide a main() wrapper similar to mingw_main()
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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, \
|
||||
|
||||
Reference in New Issue
Block a user