summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Drahos <drahosp@gmail.com>2013-03-03 14:35:07 +0100
committerPeter Drahos <drahosp@gmail.com>2013-03-03 14:35:07 +0100
commitbb79cdce421df0e84e1c468a010039bd050d6c10 (patch)
treedad3a0816dc170f6e631a0b0b97b3c0835d64206 /src
parent2c25e2ae806e83230151c42b4eb8ab068e1311d2 (diff)
downloadlua-bb79cdce421df0e84e1c468a010039bd050d6c10.tar.gz
Added winmain entry for wlua target
Diffstat (limited to 'src')
-rw-r--r--src/wmain.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/wmain.c b/src/wmain.c
new file mode 100644
index 0000000..6cf3e57
--- /dev/null
+++ b/src/wmain.c
@@ -0,0 +1,16 @@
+#include <windows.h>
+#include <stdlib.h> /* declaration of __argc and __argv */
+
+extern int main(int, char **);
+
+int PASCAL WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int ncmdshow)
+{
+ int rc;
+
+ extern int __argc; /* this seems to work for all the compilers we tested, except Watcom compilers */
+ extern char** __argv;
+
+ rc = main(__argc, __argv);
+
+ return rc;
+}