[GRASS-dev] [GRASS GIS] #1866: broken db driver communication in winGRASS 7

GRASS GIS trac at osgeo.org
Thu Mar 14 12:57:19 PDT 2013

#1866: broken db driver communication in winGRASS 7
 Reporter:  martinl           |       Owner:  grass-dev@…              
     Type:  defect            |      Status:  new                      
 Priority:  blocker           |   Milestone:  7.0.0                    
Component:  Database          |     Version:  unspecified              
 Keywords:  sqlite, wingrass  |    Platform:  MSWindows 2K             
      Cpu:  Unspecified       |  

Comment(by mmetz):

 Replying to [comment:24 glynn]:
 > Replying to [comment:23 glynn]:
 > > FWIW, MinGW provides a /lib/binmode.o file for this purpose. Can you
 make FMODE_OBJ=/lib/binmode.o
 Not working because this has the effect of making binary-mode file
 translation the default, except that preopened files stdin, stderr, stdout
 remain text. The driver pipes are set to stdin and stdout in

 Anyway, I have added
 # if fmode.o causes trouble, try:
 # FMODE_OBJ=/lib/binmode.o

 to Grass.make in r55381 as a hint if problems with lib/gis/fmode.c arise.
 At the same time I have removed the `-lxdr` hack.

 > Another thing to try is:
 #include <io.h>
 _setmode(_fileno(stdin), _O_BINARY);
 _setmode(_fileno(stdout), _O_BINARY);
 I have added that to lib/db/dbmi_driver/driver.c and it works! Submitted
 in r55382. Do we need to add this globally, i.e. to `gisinit()`?

 BTW, I think that `lib/dbmi_driver/driver.c` should be in
 `lib/db/dbmi_client/` for consistency, or IOW there were
 `lib/dbmi_client/start.c` is. It seems that `lib/dbmi_driver/` should only
 include db_d_* functions.

Ticket URL: <https://trac.osgeo.org/grass/ticket/1866#comment:25>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list