Created
July 1, 2012 13:09
-
-
Save 7shi/3028382 to your computer and use it in GitHub Desktop.
ValaをMinGWでビルドするためのパッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- vala-0.17.1/gobject-introspection/scanner.c.orig 2012-06-19 10:45:10 +0900 | |
+++ vala-0.17.1/gobject-introspection/scanner.c 2012-06-19 11:19:59 +0900 | |
@@ -31,7 +31,9 @@ | |
#include <glib/gstdio.h> | |
#include <glib-object.h> | |
#include <signal.h> | |
+#ifndef WIN32 | |
#include <sys/wait.h> /* waitpid */ | |
+#endif | |
#include <gmodule.h> | |
#include "scanner.h" | |
#include "gidlparser.h" | |
@@ -40,6 +42,16 @@ | |
#include "gidlwriter.h" | |
#include "grealpath.h" | |
+#ifdef WIN32 | |
+#include <process.h> | |
+extern int _stdcall GetWindowThreadProcessId(GPid, pid_t *); | |
+extern int _stdcall TerminateProcess(GPid, int); | |
+static int waitpid(GPid proc, int *status, int options) { | |
+ pid_t pid; | |
+ GetWindowThreadProcessId(proc, &pid); | |
+ return _cwait(status, pid, WAIT_CHILD); | |
+} | |
+#endif | |
typedef GType (*TypeFunction) (void); | |
@@ -1604,8 +1616,13 @@ | |
{ | |
if (status != 0) | |
{ | |
+#ifdef WIN32 | |
+ TerminateProcess (pid, 0); | |
+#endif | |
g_spawn_close_pid (pid); | |
+#ifndef WIN32 | |
kill (pid, SIGKILL); | |
+#endif | |
g_error ("cpp returned error code: %d\n", status); | |
unlink (tmpname); | |
--- vala-0.17.1/vapigen/vala-gen-introspect/Makefile.in.orig 2012-06-19 11:23:11 +0900 | |
+++ vala-0.17.1/vapigen/vala-gen-introspect/Makefile.in 2012-06-19 11:23:43 +0900 | |
@@ -489,7 +489,7 @@ | |
$(NULL) | |
@ENABLE_UNVERSIONED_TRUE@install-exec-hook: | |
-@ENABLE_UNVERSIONED_TRUE@ cd $(DESTDIR)$(bindir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@$(EXEEXT) vala-gen-introspect$(EXEEXT) | |
+@ENABLE_UNVERSIONED_TRUE@ cd $(DESTDIR)$(bindir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@ vala-gen-introspect | |
# Tell versions [3.59,3.63) of GNU make to not export all variables. | |
# Otherwise a system limit (for SysV at least) may be exceeded. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment