Author: rfm
Date: Mon Jun 27 20:04:30 2016
New Revision: 39931
URL: http://svn.gna.org/viewcvs/gnustep?rev=39931&view=rev
Log:
msys2 64bit tweaks
Modified:
libs/base/trunk/Source/GSLocale.m
libs/base/trunk/Source/GSNetwork.h
libs/base/trunk/Source/win32/GSFileHandle.m
libs/base/trunk/Source/win32/NSMessagePortNameServer.m
Modified: libs/base/trunk/Source/GSLocale.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/GSLocale.m?rev=39931&r1=39930&r2=39931&view=diff
==============================================================================
--- libs/base/trunk/Source/GSLocale.m (original)
+++ libs/base/trunk/Source/GSLocale.m Mon Jun 27 20:04:30 2016
@@ -319,10 +319,12 @@
NSString *GSDefaultLanguageLocale()
{
- NSString *backup, *locale = nil;
+ NSString *locale = nil;
#ifdef HAVE_LOCALE_H
#ifdef LC_MESSAGES
+ NSString *backup;
+
[gnustep_global_lock lock];
backup = privateSetLocale(LC_ALL, nil);
Modified: libs/base/trunk/Source/GSNetwork.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/GSNetwork.h?rev=39931&r1=39930&r2=39931&view=diff
==============================================================================
--- libs/base/trunk/Source/GSNetwork.h (original)
+++ libs/base/trunk/Source/GSNetwork.h Mon Jun 27 20:04:30 2016
@@ -39,6 +39,10 @@
#if defined(_WIN32)
+
+#if defined(__WIN64__)
+#include <winsock2.h>
+#endif
#include <io.h>
#include <winsock2.h>
Modified: libs/base/trunk/Source/win32/GSFileHandle.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/win32/GSFileHandle.m?rev=39931&r1=39930&r2=39931&view=diff
==============================================================================
--- libs/base/trunk/Source/win32/GSFileHandle.m (original)
+++ libs/base/trunk/Source/win32/GSFileHandle.m Mon Jun 27 20:04:30 2016
@@ -22,9 +22,14 @@
Boston, MA 02111 USA.
*/
-/* mingw wants winsock2.h before windows.h */
+#if defined(__WIN64__)
+#include <winsock2.h>
+#include <windows.h>
+#else
+/* mingw32 wants winsock2.h before windows.h */
#include <windows.h>
#include <winsock2.h>
+#endif
#include "common.h"
@@ -789,7 +794,8 @@
NSLog(@"bad address-service-protocol combination");
return nil;
}
- [self setAddr: &sin]; // Store the address of the remote end.
+ // Store the address of the remote end.
+ [self setAddr: (struct sockaddr *)&sin];
/*
* Don't use SOCKS if we are contacting the local host.
@@ -963,7 +969,7 @@
acceptOK = YES;
readOK = NO;
writeOK = NO;
- [self setAddr: &sin];
+ [self setAddr: (struct sockaddr *)&sin];
}
return self;
}
@@ -1746,13 +1752,11 @@
NSMutableDictionary *info = readInfo;
NSNotification *n;
NSNotificationCenter *q;
- NSArray *modes;
NSString *name;
[self ignoreReadDescriptor];
readInfo = nil;
readMax = 0;
- modes = (NSArray*)[info objectForKey: NSFileHandleNotificationMonitorModes];
name = (NSString*)[info objectForKey: NotificationKey];
if (name == nil)
@@ -1772,11 +1776,9 @@
NSMutableDictionary *info = [writeInfo objectAtIndex: 0];
NSNotificationCenter *q;
NSNotification *n;
- NSArray *modes;
NSString *name;
[self ignoreWriteDescriptor];
- modes = (NSArray*)[info objectForKey: NSFileHandleNotificationMonitorModes];
name = (NSString*)[info objectForKey: NotificationKey];
n = [NSNotification notificationWithName: name object: self userInfo: info];
@@ -2055,7 +2057,7 @@
closeOnDealloc: YES];
h->isSocket = YES;
getpeername(desc, (struct sockaddr*)&sin, &size);
- [h setAddr: &sin];
+ [h setAddr: (struct sockaddr *)&sin];
[readInfo setObject: h
forKey: NSFileHandleNotificationFileHandleItem];
RELEASE(h);
@@ -2356,12 +2358,14 @@
return nil; /* Don't restart timed out events */
}
-- (void) setAddr: (struct sockaddr_in *)sin
-{
+- (void) setAddr: (struct sockaddr *)sin
+{
+ struct sockaddr_in *s = (struct sockaddr_in *)sin;
+
address = [[NSString alloc] initWithUTF8String:
- (char*)inet_ntoa(sin->sin_addr)];
+ (char*)inet_ntoa(s->sin_addr)];
service = [[NSString alloc] initWithFormat: @"%d",
- (int)GSSwapBigI16ToHost(sin->sin_port)];
+ (int)GSSwapBigI16ToHost(s->sin_port)];
protocol = @"tcp";
}
Modified: libs/base/trunk/Source/win32/NSMessagePortNameServer.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/win32/NSMessagePortNameServer.m?rev=39931&r1=39930&r2=39931&view=diff
==============================================================================
--- libs/base/trunk/Source/win32/NSMessagePortNameServer.m (original)
+++ libs/base/trunk/Source/win32/NSMessagePortNameServer.m Mon Jun 27
20:04:30 2016
@@ -377,11 +377,10 @@
- (BOOL) removePortForName: (NSString *)name
{
NSString *n;
- int rc;
NSDebugLLog(@"NSMessagePortNameServer", @"removePortForName: %@", name);
n = [[self class] _translate: name];
- rc = RegDeleteValueW(key, UNISTR(n));
+ (void)RegDeleteValueW(key, UNISTR(n));
return YES;
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs