mingw tweaks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21952 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-11-05 06:22:15 +00:00
parent 9d64352859
commit fee3e814a4
2 changed files with 18 additions and 1 deletions

View file

@ -2576,7 +2576,20 @@ loadEntityFunction(const unsigned char *url, const unsigned char *eid,
if ([file length] > 0)
{
ret = xmlNewInputFromFile(ctx, [file fileSystemRepresentation]);
const char *path;
#if defined(__MINGW32__)
/*
* The xmlNewInputFromFile() function requires an eight bit string
* but on a modern windows filesystem the file name could be unicode
* which can't be represented as a cString ... and may cause an
* exception ... nothing we can do about it really.
*/
path = [file cString];
#else
path = [file fileSystemRepresentation];
#endif
ret = xmlNewInputFromFile(ctx, path);
}
else
{