Applied patch #6677

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27080 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2008-11-17 13:45:32 +00:00
parent 6494df8f1b
commit 8658db87db
35 changed files with 142 additions and 88 deletions

View file

@ -888,7 +888,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
#endif
SOCKET net;
struct sockaddr_in sin;
unsigned int size = sizeof(sin);
int size = sizeof(sin);
if (getAddr(a, s, p, &sin) == NO)
{
@ -1924,7 +1924,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
{
struct sockaddr_in buf;
SOCKET desc;
unsigned int blen = sizeof(buf);
int blen = sizeof(buf);
desc = accept((SOCKET)_get_osfhandle(descriptor),
(struct sockaddr*)&buf, &blen);
@ -1941,7 +1941,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
{ // Accept attempt completed.
GSFileHandle *h;
struct sockaddr_in sin;
unsigned int size = sizeof(sin);
int size = sizeof(sin);
int status;
/*
@ -2045,7 +2045,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
{ // Connection attempt completed.
int result;
int rval;
unsigned len = sizeof(result);
int len = sizeof(result);
rval = getsockopt((SOCKET)_get_osfhandle(descriptor), SOL_SOCKET,
SO_ERROR, (char*)&result, &len);
@ -2293,7 +2293,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
{
NSString *str = nil;
struct sockaddr_in sin;
unsigned size = sizeof(sin);
int size = sizeof(sin);
if (getsockname(descriptor, (struct sockaddr*)&sin, &size) == SOCKET_ERROR)
{
@ -2310,7 +2310,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
{
NSString *str = nil;
struct sockaddr_in sin;
unsigned size = sizeof(sin);
int size = sizeof(sin);
if (getsockname(descriptor, (struct sockaddr*)&sin, &size) == SOCKET_ERROR)
{

View file

@ -331,7 +331,7 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
switch (info->type)
{
case ET_HANDLE:
handle = (HANDLE)(int)info->data;
handle = (HANDLE)(size_t)info->data;
NSMapInsert(handleMap, (void*)handle, info);
num_handles++;
break;
@ -355,13 +355,13 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
while (port_handle_count--)
{
NSMapInsert(handleMap,
(void*)port_handle_array[port_handle_count], info);
(void*)(size_t) port_handle_array[port_handle_count], info);
num_handles++;
}
}
break;
case ET_WINMSG:
handle = (HANDLE)(int)info->data;
handle = (HANDLE)(size_t)info->data;
NSMapInsert(winMsgMap, (void*)handle, info);
num_winMsgs++;
break;

View file

@ -50,7 +50,7 @@
#include <stdio.h>
#include <stdlib.h>
extern int errno;
extern __declspec(dllimport) int errno;
#define UNISTR(X) \
((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding])
@ -596,8 +596,8 @@ static Class messagePortClass = 0;
GSPortItemHeader *pih;
unsigned off = 0;
unsigned len;
unsigned rId;
unsigned nItems;
unsigned rId = 0;
unsigned nItems = 0;
NSMessagePort *rPort = nil;
NSMutableArray *rItems = nil;
@ -971,7 +971,7 @@ again:
from: (NSPort*)receivingPort
reserved: (unsigned)length
{
NSMutableData *h;
NSMutableData *h = nil;
NSMutableData *first;
BOOL sent = NO;
unsigned c;

View file

@ -46,7 +46,7 @@
#define UNISTR(X) \
((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding])
extern int errno;
extern __declspec(dllimport) int errno;
static NSRecursiveLock *serverLock = nil;
static NSMessagePortNameServer *defaultServer = nil;
@ -112,7 +112,7 @@ static void clean_up_names(void)
HKEY_CURRENT_USER,
UNISTR(registry),
0,
L"",
(LPWSTR) L"",
REG_OPTION_VOLATILE,
STANDARD_RIGHTS_WRITE|STANDARD_RIGHTS_READ|KEY_SET_VALUE
|KEY_QUERY_VALUE|KEY_NOTIFY,
@ -227,7 +227,7 @@ OutputDebugStringW(L"");
return nil;
}
mailslotName = [NSString stringWithUTF8String: ptr];
mailslotName = [NSString stringWithUTF8String: (const char *) ptr];
if (ptr != buf)
{
objc_free(ptr);
@ -338,7 +338,7 @@ OutputDebugStringW(L"");
}
n = [[self class] _translate: name];
str = [[(NSMessagePort*)port name] UTF8String];
str = (const unsigned char *) [[(NSMessagePort*)port name] UTF8String];
rc = RegSetValueExW(
key,
@ -346,7 +346,7 @@ OutputDebugStringW(L"");
0,
REG_BINARY,
str,
strlen(str)+1);
strlen((const char*) str)+1);
NSDebugLLog(@"NSMessagePortNameServer", @"Set port '%s' for %@", str, n);
if (rc == ERROR_SUCCESS)
{

View file

@ -553,7 +553,7 @@ struct NSUserDefaultsWin32_DomainInfo
rc = RegCreateKeyExW(HKEY_CURRENT_USER,
UNISTR(dPath),
0,
L"",
(LPWSTR) L"",
REG_OPTION_NON_VOLATILE,
STANDARD_RIGHTS_WRITE|STANDARD_RIGHTS_READ|KEY_SET_VALUE
|KEY_QUERY_VALUE,