aboutsummaryrefslogtreecommitdiffstats
path: root/launcher.c
diff options
context:
space:
mode:
authoragronholm <none@none>2009-09-25 22:01:27 +0300
committeragronholm <none@none>2009-09-25 22:01:27 +0300
commitefa78ba0a0e1f89b92da4fa0fa6e5e029efecf3f (patch)
treeb42d2975e30e286ef9ebe2e46596ce347d89acd7 /launcher.c
parent758eba50d92348b0f1ba43a2e6ee3a842f49ffed (diff)
downloadexternal_python_setuptools-efa78ba0a0e1f89b92da4fa0fa6e5e029efecf3f.tar.gz
external_python_setuptools-efa78ba0a0e1f89b92da4fa0fa6e5e029efecf3f.tar.bz2
external_python_setuptools-efa78ba0a0e1f89b92da4fa0fa6e5e029efecf3f.zip
Fix script launcher creation on 64-bit Windows, patch by Jason R. Coombs (http://bugs.python.org/setuptools/issue2)
--HG-- branch : distribute extra : rebase_source : 60c07b0639b77a3e8ff13eb12161ebe03ab47430
Diffstat (limited to 'launcher.c')
-rwxr-xr-xlauncher.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/launcher.c b/launcher.c
index c8022505..0dca2e16 100755
--- a/launcher.c
+++ b/launcher.c
@@ -25,8 +25,9 @@
#include <stdlib.h>
#include <stdio.h>
-#include <unistd.h>
+#include <process.h>
#include <fcntl.h>
+#include "tchar.h"
#include "windows.h"
int fail(char *format, char *data) {
@@ -236,11 +237,18 @@ int run(int argc, char **argv, int is_gui) {
}
/* We *do* need to wait for a CLI to finish, so use spawn */
- return spawnv(P_WAIT, ptr, (const char * const *)(newargs));
+ return _spawnv(_P_WAIT, ptr, (const char * const *)(newargs));
}
-
+/*
int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, LPSTR lpCmd, int nShow) {
return run(__argc, __argv, GUI);
}
+*/
+
+int _tmain(int argc, _TCHAR* argv[])
+{
+ return run(argc, argv, GUI);
+}
+