summaryrefslogtreecommitdiffstats
path: root/stdlib/headernt.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/headernt.c')
-rw-r--r--stdlib/headernt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/stdlib/headernt.c b/stdlib/headernt.c
index 4dee82282..073d1e6f6 100644
--- a/stdlib/headernt.c
+++ b/stdlib/headernt.c
@@ -20,9 +20,11 @@
#include "../byterun/mlvalues.h"
#include "../byterun/exec.h"
+#ifndef __MINGW32__
#pragma comment(linker , "/entry:headerentry")
#pragma comment(linker , "/subsystem:console")
#pragma comment(lib , "kernel32")
+#endif
char * default_runtime_name = "ocamlrun";
@@ -135,7 +137,11 @@ static __inline void __declspec(noreturn) run_runtime(char * runtime,
#endif
}
+#ifdef __MINGW32__
+int main()
+#else
void __declspec(noreturn) __cdecl headerentry()
+#endif
{
char truename[MAX_PATH];
char * cmdline = GetCommandLine();
@@ -163,4 +169,7 @@ void __declspec(noreturn) __cdecl headerentry()
#if _MSC_VER >= 1200
__assume(0); /* Not reached */
#endif
+#ifdef __MINGW__
+ return 0;
+#endif
}