[GRASS-dev] winGRASS: debugging vector db issues
Glynn Clements
glynn at gclements.plus.com
Sun Feb 25 20:53:43 EST 2007
Paul Kelly wrote:
> > Some more info. I found the following note on the qgis wiki where the code
> > of the xdr library comes from
> > (http://wiki.qgis.org/qgiswiki/BuildingWindowsBinaryOnLinux):
> >
> > "TODO: Use DLL. Currently if DLL is used db drivers do not work because of
> > '\n' conversion (text mode expected). Find out how to force xdrlib to
> > expect binary mode when compiled as DLL."
> >
> > Could this be the cause of our problems ? Paul, you patched the xdr code,
> > replacing bzero with memset and bcopy with memmove. Does this have
> > anything to do with the above ?
>
> Moritz, WELL DONE! Using a static libxdr.a with nothing changed from the
> link Glynn posted (sorry can't remember where I downloaded it from)
Ah. I solved the _fmode issues locally by patching my MinGW headers,
specifically the O_* definitions in <fcntl.h>:
#define O_RDONLY (_O_RDONLY | _O_BINARY)
#define O_WRONLY (_O_WRONLY | _O_BINARY)
#define O_RDWR (_O_RDWR | _O_BINARY)
If libxdr.a is the one which I built, it will probably have binary I/O
hard-coded into it. We still need a more general solution, though.
AFAICT, every executable should get linked against $(FMODE_OBJ)
automatically on Windows; the rules in Module.make use it, and
Makefiles which have their own linking rules normally list it
explicitly.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list