mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Mingw update
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6666 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
984e5973ff
commit
7066b8e47f
24 changed files with 155 additions and 577 deletions
|
@ -115,7 +115,7 @@ NSHomeDirectory(void)
|
|||
NSString *
|
||||
NSHomeDirectoryForUser(NSString *login_name)
|
||||
{
|
||||
#if !defined(__WIN32__)
|
||||
#if !defined(__MINGW__)
|
||||
struct passwd *pw;
|
||||
|
||||
[gnustep_global_lock lock];
|
||||
|
@ -140,12 +140,14 @@ NSHomeDirectoryForUser(NSString *login_name)
|
|||
s = [NSString stringWithCString: nb];
|
||||
NSZoneFree(NSDefaultMallocZone(), nb);
|
||||
}
|
||||
else
|
||||
else if (n > 0)
|
||||
{
|
||||
/* null terminate it and return the string */
|
||||
buf[n] = '\0';
|
||||
s = [NSString stringWithCString: buf];
|
||||
}
|
||||
else
|
||||
s = NSOpenStepRootDirectory();
|
||||
[gnustep_global_lock unlock];
|
||||
return s;
|
||||
#endif
|
||||
|
@ -289,7 +291,7 @@ NSOpenStepRootDirectory(void)
|
|||
objectForKey: @"GNUSTEP_ROOT"];
|
||||
|
||||
if (root == nil)
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW__)
|
||||
root = @"C:\\";
|
||||
#else
|
||||
root = @"/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue