MinGW allows both \ and / as separators in paths. What do you think of the approach of the attached patch to file-name.c?
Since pspp and psppire do not really call any exe's, the patch simply
changes file-name.c so it treats both \ and / as separators.
When it canonicalizes the path it converts all \'s to the posixish
/'s. It should really also prefix all the paths with "A:" or, "C:" or
whatever too.
Another question: On windows, we don't know at compile time where the
program will be installed.
I suggest
1) that I write a relocate function that takes a path, strips the
compile time prefix, adds a runtime prefix and returns the result.
2) I write a static wrapper around the function that returns a string
that does not need to be freed.
3) I replace every occurance of
PKGDATADIR "...."
with
PKGDATADIR_R ("....")
where PKGDATADIR_R is a macro that, on MinGW, calls the static
wrapper, and otherwise just evaluates to
PKGDATADIR "...."
--
John C. McCabe-Dansted
PhD Student
University of Western Australia
file-name.c.patch
Description: Binary data
_______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
