mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Merge in changes from NET-Community.
Add DLL support on Windows platforms. Numerous minor bug fixes related to Windows platforms. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2420 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e149f41c85
commit
4a99922d47
48 changed files with 2409 additions and 697 deletions
|
@ -25,7 +25,7 @@
|
|||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
#include <stdlib.h> // for getenv()
|
||||
#ifndef __WIN32__
|
||||
#if !defined(__WIN32__) && !defined(_WIN32)
|
||||
#include <unistd.h> // for getlogin()
|
||||
#include <pwd.h> // for getpwnam()
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@
|
|||
NSString *
|
||||
NSUserName ()
|
||||
{
|
||||
#if __WIN32__
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
/* The GetUserName function returns the current user name */
|
||||
char buf[1024];
|
||||
DWORD n = 1024;
|
||||
|
@ -78,7 +78,7 @@ NSHomeDirectory ()
|
|||
NSString *
|
||||
NSHomeDirectoryForUser (NSString *login_name)
|
||||
{
|
||||
#ifndef __WIN32__
|
||||
#if !defined(__WIN32__) && !defined(_WIN32)
|
||||
struct passwd *pw;
|
||||
pw = getpwnam ([login_name cStringNoCopy]);
|
||||
return [NSString stringWithCString: pw->pw_dir];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue