[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] build: update gnulib for pipe on mingw



* .gnulib: Update to latest.
* bootstrap.conf (gnulib_modules): Import pipe-posix for mingw.
* src/remote/remote_driver.c (pipe): Drop dead macro.
---

Matthias complianed on IRC that mingw builds are broken since
they unconditionally build virCommand, which unconditionally
uses pipe() and waitpid() even though those are missing on mingw.

I've fixed pipe() in gnulib.  waitpid() will need a bit more
invasive fix; I'm thinking of creating:

struct virPid {
#ifdef WIN32
    HANDLE pid;
#else
    pid_t pid;
#endif
};
/* Wait for a child process to complete. */
int virPidWait(virPid pid, int *status)
{
#ifdef WIN32
    whatever windows provides
#else
    return waitpid(pid.pid, status, 0);
#endif
}

or something like that.

* .gnulib 6491120...e2f1471 (3):
  > pipe-posix: new module
  > * build-aux/gendocs.sh: restore x bit
  > autoupdate

 .gnulib                    |    2 +-
 bootstrap.conf             |    1 +
 src/remote/remote_driver.c |    5 -----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/.gnulib b/.gnulib
index 6491120..e2f1471 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 64911207854610668b480939469282fdaeb96f74
+Subproject commit e2f1471b021a285916339a73bc12c6b44dbf9a76
diff --git a/bootstrap.conf b/bootstrap.conf
index 2ad1957..dbed752 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -48,6 +48,7 @@ mktempd
 netdb
 perror
 physmem
+pipe-posix
 poll
 posix-shell
 pthread
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index e6eb9b5..fae191c 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -86,11 +86,6 @@

 #define VIR_FROM_THIS VIR_FROM_REMOTE

-#ifdef WIN32
-# define pipe(fds) _pipe(fds,4096, _O_BINARY)
-#endif
-
-
 static int inside_daemon = 0;

 struct remote_thread_call;
-- 
1.7.3.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]