[GRASS-SVN] r31910 - grass/branches/develbranch_6/lib/cairodriver
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 30 16:40:56 EDT 2008
Author: neteler
Date: 2008-06-30 16:40:56 -0400 (Mon, 30 Jun 2008)
New Revision: 31910
Modified:
grass/branches/develbranch_6/lib/cairodriver/Graph.c
Log:
Portability fixes; respect USE_X11 and CAIRO_HAS_XLIB_SURFACE (merge from trunk)
Modified: grass/branches/develbranch_6/lib/cairodriver/Graph.c
===================================================================
--- grass/branches/develbranch_6/lib/cairodriver/Graph.c 2008-06-30 20:38:17 UTC (rev 31909)
+++ grass/branches/develbranch_6/lib/cairodriver/Graph.c 2008-06-30 20:40:56 UTC (rev 31910)
@@ -2,17 +2,19 @@
#include <cairo-ps.h>
#include <cairo-pdf.h>
#include <cairo-svg.h>
+#if defined(USE_X11) && CAIRO_HAS_XLIB_SURFACE
#include <cairo-xlib.h>
+#endif
+#include <unistd.h>
#ifndef __MINGW32__
-#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#endif
-#if CAIRO_HAS_XLIB_SURFACE
+#if defined(USE_X11) && CAIRO_HAS_XLIB_SURFACE
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -39,7 +41,7 @@
static int ends_with(const char *string, const char *suffix);
static void map_file(void);
-#if CAIRO_HAS_XLIB_SURFACE
+#if defined(USE_X11) && CAIRO_HAS_XLIB_SURFACE
static int init_xlib(void)
{
Display *dpy;
@@ -228,7 +230,7 @@
p = getenv("GRASS_AUTO_WRITE");
auto_write = p && strcmp(p, "TRUE") == 0;
-#if CAIRO_HAS_XLIB_SURFACE
+#if defined(USE_X11) && CAIRO_HAS_XLIB_SURFACE
p = getenv("GRASS_CAIRO_DRAWABLE");
if (p)
return init_xlib();
More information about the grass-commit
mailing list