mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fixup some conditional compilation to use __MINGW32__
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22535 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
276ca33bac
commit
a5a27ea328
6 changed files with 30 additions and 28 deletions
|
@ -3,6 +3,12 @@
|
|||
* Source/Additions/GSXML.m: Fix parsing error .. was not recognising
|
||||
base64 elements.
|
||||
* Headers/Foundation/NSPathUtilitites.h: Expand config documentation
|
||||
* NSTimeZone.m:
|
||||
* NSPathUtilities.m:
|
||||
* NSPage.m:
|
||||
* NSException.m:
|
||||
* NSLog.m:
|
||||
Fix some MINGW32 conditional compilation to use __MINGW32__
|
||||
|
||||
2006-02-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ _NSAddHandler (NSHandler* handler)
|
|||
NSThread *thread;
|
||||
|
||||
thread = GSCurrentThread();
|
||||
#if defined(__WIN32__) && defined(DEBUG)
|
||||
#if defined(__MINGW32__) && defined(DEBUG)
|
||||
if (thread->_exception_handler
|
||||
&& IsBadReadPtr(thread->_exception_handler, sizeof(NSHandler)))
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ _NSRemoveHandler (NSHandler* handler)
|
|||
fprintf(stderr, "ERROR: Removing exception handler that is not on top "
|
||||
"of the stack. (You probably called return in an NS_DURING block.)\n");
|
||||
}
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
if (IsBadReadPtr(handler, sizeof(NSHandler)))
|
||||
{
|
||||
fprintf(stderr, "ERROR: Could not remove exception handler, "
|
||||
|
|
|
@ -108,7 +108,7 @@ _NSLog_standard_printf_handler (NSString* message)
|
|||
NSData *d;
|
||||
const char *buf;
|
||||
unsigned len;
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
LPCWSTR null_terminated_buf;
|
||||
#else
|
||||
#if defined(HAVE_SYSLOG)
|
||||
|
@ -139,7 +139,7 @@ _NSLog_standard_printf_handler (NSString* message)
|
|||
len = [d length];
|
||||
}
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
null_terminated_buf = UNISTR(message);
|
||||
|
||||
OutputDebugStringW(null_terminated_buf);
|
||||
|
@ -184,7 +184,7 @@ _NSLog_standard_printf_handler (NSString* message)
|
|||
#else
|
||||
write(_NSLogDescriptor, buf, len);
|
||||
#endif
|
||||
#endif // __WIN32__
|
||||
#endif // __MINGW32__
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
#include "Foundation/NSObjCRuntime.h"
|
||||
#include "Foundation/NSZone.h"
|
||||
#include <string.h>
|
||||
#ifdef __WIN32__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
|
@ -117,7 +117,7 @@ static NSString *gnustep_flattened =
|
|||
nil;
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
/*
|
||||
* FIXME ... should check access properly if the file is on an NTFS volume.
|
||||
*/
|
||||
|
@ -663,7 +663,7 @@ ParseConfigurationFile(NSString *fileName, NSMutableDictionary *dict,
|
|||
|
||||
if ([userName isEqual: fileOwner] == NO)
|
||||
{
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
fprintf(stderr, "The file '%S' is owned by '%s' but we expect it"
|
||||
" to be the personal config file of '%s'.\nIgnoring it.\n",
|
||||
[fileName fileSystemRepresentation],
|
||||
|
@ -679,7 +679,7 @@ ParseConfigurationFile(NSString *fileName, NSMutableDictionary *dict,
|
|||
}
|
||||
if (([attributes filePosixPermissions] & (0022 & ATTRMASK)) != 0)
|
||||
{
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
fprintf(stderr, "The file '%S' is writable by someone other than"
|
||||
" its owner (permissions 0%lo).\nIgnoring it.\n",
|
||||
[fileName fileSystemRepresentation],
|
||||
|
@ -968,7 +968,7 @@ GSSetUserName(NSString *aName)
|
|||
NSString *
|
||||
NSUserName(void)
|
||||
{
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
if (theUserName == nil)
|
||||
{
|
||||
/* Use the LOGNAME environment variable if set. */
|
||||
|
@ -1108,7 +1108,7 @@ NSHomeDirectoryForUser(NSString *loginName)
|
|||
NSString *
|
||||
NSFullUserName(void)
|
||||
{
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
/* FIXME: Win32 way to get full user name via Net API */
|
||||
return NSUserName();
|
||||
#else
|
||||
|
@ -1210,7 +1210,7 @@ NSTemporaryDirectory(void)
|
|||
int perm;
|
||||
int owner;
|
||||
BOOL flag;
|
||||
#if !defined(__WIN32__)
|
||||
#if !defined(__MINGW32__)
|
||||
int uid;
|
||||
#else
|
||||
unichar buffer[1024];
|
||||
|
@ -1237,12 +1237,10 @@ NSTemporaryDirectory(void)
|
|||
baseTempDirName = [env objectForKey: @"TMP"];
|
||||
if (baseTempDirName == nil)
|
||||
{
|
||||
#if defined(__MINGW32__)
|
||||
#ifdef __CYGWIN__
|
||||
#if defined(__CYGWIN__)
|
||||
baseTempDirName = @"/cygdrive/c/";
|
||||
#else
|
||||
baseTempDirName = @"/c/";
|
||||
#endif
|
||||
#elif defined(__MINGW32__)
|
||||
baseTempDirName = @"C:\\";
|
||||
#else
|
||||
baseTempDirName = @"/tmp";
|
||||
#endif
|
||||
|
|
|
@ -199,7 +199,7 @@ typedef struct {
|
|||
}
|
||||
@end
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
@interface GSWindowsTimeZone : NSTimeZone
|
||||
{
|
||||
@public
|
||||
|
@ -423,7 +423,7 @@ static NSString *_time_zone_path(NSString *subpath, NSString *type)
|
|||
fileName = [NSTimeZoneClass getTimeZoneFile: name];
|
||||
if (fileName == nil
|
||||
|| ![[NSFileManager defaultManager] fileExistsAtPath: fileName])
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
{
|
||||
zone = [[GSWindowsTimeZone alloc] initWithName: name data: 0];
|
||||
RELEASE(self);
|
||||
|
@ -437,7 +437,7 @@ static NSString *_time_zone_path(NSString *subpath, NSString *type)
|
|||
#endif
|
||||
data = [NSData dataWithContentsOfFile: fileName];
|
||||
}
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
if (!data)
|
||||
zone = [[GSWindowsTimeZone alloc] initWithName: name data: data];
|
||||
else
|
||||
|
@ -1405,7 +1405,7 @@ static NSMapTable *absolutes = 0;
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
/*
|
||||
* Try to get timezone from windows registry.
|
||||
*/
|
||||
|
@ -1898,9 +1898,10 @@ static NSMapTable *absolutes = 0;
|
|||
@end
|
||||
|
||||
/**
|
||||
* This class serves no useful purpose in GNUstep, and is provided
|
||||
* solely for backward compatibility with the OpenStep spec. It is
|
||||
* missing entirely from MacOS-X.
|
||||
* This class serves no useful purpose in GNUstep other than to provide
|
||||
* a backup mechanism for handling abbreviations where the precomputed
|
||||
* data files cannot be found. It is provided primarily for backward
|
||||
* compatibility with the OpenStep spec. It is missing entirely from MacOS-X.
|
||||
*/
|
||||
@implementation NSTimeZoneDetail
|
||||
|
||||
|
@ -2011,7 +2012,7 @@ static NSString *zoneDirs[] = {
|
|||
@end
|
||||
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__MINGW32__)
|
||||
/* Timezone information data as stored in the registry */
|
||||
typedef struct TZI_format {
|
||||
LONG Bias;
|
||||
|
@ -2435,7 +2436,7 @@ int dayOfCommonEra(NSTimeInterval when);
|
|||
return timeZoneName;
|
||||
}
|
||||
@end
|
||||
#endif // __WIN32__
|
||||
#endif // __MINGW32__
|
||||
|
||||
|
||||
@implementation GSTimeZone
|
||||
|
|
Loading…
Reference in a new issue