From 802c22ed98fdba731f67bd6c67a7082d0d3ff673 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 30 Nov 2018 20:17:42 -0500 Subject: [PATCH] more gcc work for Windows tty builds and executes curses builds but crashes gui - not even trying right now --- sys/share/pcmain.c | 6 ++++-- sys/winnt/stubs.c | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 1c07555cc..20b73f728 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -87,9 +87,12 @@ unsigned _stklen = STKSIZ; * to help MinGW decide which entry point to choose. If both main and * WinMain exist, the resulting executable won't work correctly. */ -#ifndef __MINGW32__ int +#ifndef __MINGW32__ main(argc, argv) +#else +mingw_main(argc, argv) +#endif int argc; char *argv[]; { @@ -115,7 +118,6 @@ char *argv[]; /*NOTREACHED*/ return 0; } -#endif boolean pcmain(argc, argv) diff --git a/sys/winnt/stubs.c b/sys/winnt/stubs.c index 123ae3b72..3e7fa4c20 100644 --- a/sys/winnt/stubs.c +++ b/sys/winnt/stubs.c @@ -29,6 +29,7 @@ mswin_destroy_reg() */ #ifdef __MINGW32__ extern char default_window_sys[]; +extern int mingw_main(int argc, char **argv); int main(argc, argv) @@ -37,10 +38,7 @@ char *argv[]; { boolean resuming; - sys_early_init(); - Strcpy(default_window_sys, "tty"); - resuming = pcmain(argc, argv); - moveloop(resuming); + resuming = mingw_main(argc, argv); nethack_exit(EXIT_SUCCESS); /*NOTREACHED*/ return 0; -- 2.40.0