[evince] [windows] Make comics backend also compile on Windows



commit e732e45fbf5930d8c3ac2471ff8912f41152ec7a
Author: Hib Eris <hib hiberis nl>
Date:   Sun Dec 20 11:09:54 2009 +0100

    [windows] Make comics backend also compile on Windows
    
    See bgo#605146.

 backend/comics/comics-document.c |    8 +++++++-
 configure.ac                     |   12 ++----------
 2 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index c2c625a..b82569b 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -22,7 +22,6 @@
 
 #include <unistd.h>
 #include <string.h>
-#include <sys/wait.h>
 #include <stdlib.h>
 #include <errno.h>
 
@@ -31,6 +30,13 @@
 #include <glib/gstdio.h>
 #include <gio/gio.h>
 
+#ifdef G_OS_WIN32
+# define WIFEXITED(x) ((x) != 3)
+# define WEXITSTATUS(x) (x)
+#else
+# include <sys/wait.h>
+#endif
+
 #include "comics-document.h"
 #include "ev-document-misc.h"
 #include "ev-document-thumbnails.h"
diff --git a/configure.ac b/configure.ac
index 84432ff..750f9a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -666,16 +666,8 @@ AC_ARG_ENABLE(comics,
 	[enable_comics=yes])
 	
 if test "x$enable_comics" = "xyes"; then
-	if test "x$os_win32" = "xyes"; then
-		# The comics backend is disabled on windows because:
-		# 1) it uses unix functions from sys/wait.h.
-		# 2) it uses external decompression tools not generally available on windows.
-		enable_comics=no
-		AC_MSG_WARN(The comics backend is not supported on windows.)
-	else
-		AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
-	fi
-fi 
+	AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
+fi
 AM_CONDITIONAL(ENABLE_COMICS, test x$enable_comics = xyes)
 
 dnl ================== End of comic book checks ============================================



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