mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
32990455b2
commit
649fb4ffc9
2 changed files with 18 additions and 1 deletions
|
@ -2576,7 +2576,20 @@ loadEntityFunction(const unsigned char *url, const unsigned char *eid,
|
||||||
|
|
||||||
if ([file length] > 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1108,7 +1108,11 @@ static BOOL debugTemporarilyDisabled = NO;
|
||||||
extern int _NSLogDescriptor;
|
extern int _NSLogDescriptor;
|
||||||
int desc;
|
int desc;
|
||||||
|
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
desc = _wopen([path fileSystemRepresentation], O_RDWR|O_CREAT|O_APPEND, 0644);
|
||||||
|
#else
|
||||||
desc = open([path fileSystemRepresentation], O_RDWR|O_CREAT|O_APPEND, 0644);
|
desc = open([path fileSystemRepresentation], O_RDWR|O_CREAT|O_APPEND, 0644);
|
||||||
|
#endif
|
||||||
if (desc >= 0)
|
if (desc >= 0)
|
||||||
{
|
{
|
||||||
if (_NSLogDescriptor >= 0 && _NSLogDescriptor != 2)
|
if (_NSLogDescriptor >= 0 && _NSLogDescriptor != 2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue