Tidied for windoze

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14328 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-08-25 08:41:29 +00:00
parent 589ec2569d
commit 8b1fc0e981
5 changed files with 15 additions and 1490 deletions

View file

@ -1,3 +1,9 @@
2002-08-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/WindowsFileHandle.m: Removed ... no longer used.
* Source/GSHTTPURLHandle.m: Don't use getpid() ... not portable.
* Tools/gdomap.c: Don't use getuid() under windoze.
2002-08-24 Richard Frith-Macdonald <rfm@gnu.org> 2002-08-24 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSURL.m: ([-initFileURLWithPath:]) check to see if path is * Source/NSURL.m: ([-initFileURLWithPath:]) check to see if path is

View file

@ -36,6 +36,7 @@
#include <Foundation/NSLock.h> #include <Foundation/NSLock.h>
#include <Foundation/NSFileHandle.h> #include <Foundation/NSFileHandle.h>
#include <Foundation/NSDebug.h> #include <Foundation/NSDebug.h>
#include <Foundation/NSProcessInfo.h>
#include <Foundation/GSMime.h> #include <Foundation/GSMime.h>
#include <string.h> #include <string.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
@ -233,7 +234,8 @@ static void debugWrite(NSData *data)
urlCache = [NSMutableDictionary new]; urlCache = [NSMutableDictionary new];
urlLock = [NSLock new]; urlLock = [NSLock new];
debugLock = [NSLock new]; debugLock = [NSLock new];
sprintf(debugFile, "/tmp/GSHTTP.%d", getpid()); sprintf(debugFile, "/tmp/GSHTTP.%d",
[[NSProcessInfo processInfo] processIdentifier]);
#ifndef __MINGW__ #ifndef __MINGW__
sslClass = [NSFileHandle sslClass]; sslClass = [NSFileHandle sslClass];
#endif #endif

View file

@ -718,12 +718,13 @@ failure:
{ {
char thePath[BUFSIZ*2+8]; char thePath[BUFSIZ*2+8];
char theRealPath[BUFSIZ*2]; char theRealPath[BUFSIZ*2];
FILE *theFile;
int c; int c;
#if defined(__MINGW__) #if defined(__MINGW__)
NSString *tmppath = path; NSString *tmppath = path;
HANDLE fh; HANDLE fh;
DWORD wroteBytes; DWORD wroteBytes;
#else
FILE *theFile;
#endif #endif

File diff suppressed because it is too large Load diff

View file

@ -4553,7 +4553,9 @@ printf(
{ {
FILE *fptr; FILE *fptr;
#ifndef __MINGW__
if (getuid () == 0) if (getuid () == 0)
#endif
{ {
fptr = fopen(pidfile, "at"); fptr = fopen(pidfile, "at");
@ -4567,11 +4569,13 @@ printf(
fclose(fptr); fclose(fptr);
chmod(pidfile, 0644); chmod(pidfile, 0644);
} }
#ifndef __MINGW__
else else
{ {
sprintf(ebuf, "Only root user can write to pid file\n"); sprintf(ebuf, "Only root user can write to pid file\n");
gdomap_log(LOG_WARNING); gdomap_log(LOG_WARNING);
} }
#endif
} }
#ifndef __MINGW__ #ifndef __MINGW__