[GRASS-SVN] r40881 - in grass/trunk: gui/wxpython/nviz
gui/wxpython/vdigit lib/gis visualization/wximgview
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 8 21:28:11 EST 2010
Author: glynn
Date: 2010-02-08 21:28:10 -0500 (Mon, 08 Feb 2010)
New Revision: 40881
Modified:
grass/trunk/gui/wxpython/nviz/Makefile
grass/trunk/gui/wxpython/nviz/setup.py
grass/trunk/gui/wxpython/vdigit/Makefile
grass/trunk/gui/wxpython/vdigit/setup.py
grass/trunk/lib/gis/popen.c
grass/trunk/visualization/wximgview/main.cc
Log:
Windows fixes
Modified: grass/trunk/gui/wxpython/nviz/Makefile
===================================================================
--- grass/trunk/gui/wxpython/nviz/Makefile 2010-02-09 01:37:59 UTC (rev 40880)
+++ grass/trunk/gui/wxpython/nviz/Makefile 2010-02-09 02:28:10 UTC (rev 40881)
@@ -46,6 +46,7 @@
WXWIDGETSLIB="$(WXWIDGETSLIB)" \
OPENGL_X11="$(OPENGL_X11)" \
XCFLAGS="$(XCFLAGS)" \
+ CXXFLAGS="$(COMPILE_FLAGS_CXX)" \
$(PYTHON) setup.py build_ext --swig=$(SWIG) --swig-opts=-c++ --build-lib=$(OBJDIR) --build-temp=$(OBJDIR)
.NOTPARALLEL: $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
Modified: grass/trunk/gui/wxpython/nviz/setup.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/setup.py 2010-02-09 01:37:59 UTC (rev 40880)
+++ grass/trunk/gui/wxpython/nviz/setup.py 2010-02-09 02:28:10 UTC (rev 40881)
@@ -26,7 +26,8 @@
'grass_g3d']
extras = []
-for flag in ['GDALCFLAGS',
+for flag in ['CXXFLAGS',
+ 'GDALCFLAGS',
'GDALLIBS',
'WXWIDGETSCXXFLAGS',
'OPENGLINC',
Modified: grass/trunk/gui/wxpython/vdigit/Makefile
===================================================================
--- grass/trunk/gui/wxpython/vdigit/Makefile 2010-02-09 01:37:59 UTC (rev 40880)
+++ grass/trunk/gui/wxpython/vdigit/Makefile 2010-02-09 02:28:10 UTC (rev 40881)
@@ -41,6 +41,7 @@
GEOSCFLAGS="$(GEOSCFLAGS)" \
WXWIDGETSCXXFLAGS="$(WXWIDGETSCXXFLAGS)" \
WXWIDGETSLIB="$(WXWIDGETSLIB)" \
+ CXXFLAGS="$(COMPILE_FLAGS_CXX)" \
$(PYTHON) setup.py build_ext --swig=$(SWIG) --swig-opts=-c++ --build-lib=$(OBJDIR) --build-temp=$(OBJDIR)
.NOTPARALLEL: $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
Modified: grass/trunk/gui/wxpython/vdigit/setup.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/setup.py 2010-02-09 01:37:59 UTC (rev 40880)
+++ grass/trunk/gui/wxpython/vdigit/setup.py 2010-02-09 02:28:10 UTC (rev 40881)
@@ -27,7 +27,8 @@
'grass_vedit']
extras = []
-for flag in ['GDALCFLAGS',
+for flag in ['CXXFLAGS',
+ 'GDALCFLAGS',
'GDALLIBS',
'GEOSCFLAGS',
'WXWIDGETSLIB',
Modified: grass/trunk/lib/gis/popen.c
===================================================================
--- grass/trunk/lib/gis/popen.c 2010-02-09 01:37:59 UTC (rev 40880)
+++ grass/trunk/lib/gis/popen.c 2010-02-09 02:28:10 UTC (rev 40881)
@@ -6,6 +6,12 @@
#include <grass/gis.h>
#include <grass/spawn.h>
+#ifdef __MINGW32__
+#include <io.h>
+#include <fcntl.h>
+#define pipe(fds) _pipe(fds, 4096, O_BINARY)
+#endif
+
static FILE *do_popen(struct Popen *state, int wr,
const char *program, const char **args)
{
Modified: grass/trunk/visualization/wximgview/main.cc
===================================================================
--- grass/trunk/visualization/wximgview/main.cc 2010-02-09 01:37:59 UTC (rev 40880)
+++ grass/trunk/visualization/wximgview/main.cc 2010-02-09 02:28:10 UTC (rev 40881)
@@ -189,11 +189,13 @@
#ifdef __MINGW32__
ptr = MapViewOfFile((HANDLE) _get_osfhandle(fd),
FILE_MAP_READ, 0, 0, size);
+ if (!ptr)
+ G_fatal_error(_("Unable to map image file"));
#else
ptr = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, (off_t) 0);
-#endif
if (ptr == MAP_FAILED)
G_fatal_error(_("Unable to map image file"));
+#endif
imgbuf = (unsigned char *)ptr + HEADER_SIZE;
@@ -208,13 +210,14 @@
static void set_handler(void)
{
+#ifndef __MINGW32__
struct sigaction act;
act.sa_handler = &dummy_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
sigaction(SIGUSR1, &act, NULL);
-
+#endif
}
bool MyApp::OnInit()
More information about the grass-commit
mailing list