mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
backport minor fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@25054 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
10845eb655
commit
fd948b2128
4 changed files with 28 additions and 17 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-04-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m:
|
||||
* Source/GSHTTPURLHandle.m:
|
||||
* Source/NSSortDescriptor.m:
|
||||
Backport minor fixes from trunk.
|
||||
|
||||
2007-04-13 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFileHandle.m: ([-readDataOfLength:]) backport of fix of
|
||||
|
|
|
@ -1237,23 +1237,23 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
port = @"80";
|
||||
}
|
||||
|
||||
/* An existing socket with keepalive may have been closed by the other
|
||||
* end. The portable way to detect it is to run the runloop once to
|
||||
* allow us to be sent a notification about end-of-file.
|
||||
* On unix systems (google told me it is not reliable on windows) we can
|
||||
* simply peek on the file descriptor for a much more efficient check.
|
||||
*/
|
||||
if (sock != nil)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
NSLog(@"%@ check for reusable socket", NSStringFromSelector(_cmd));
|
||||
}
|
||||
/* An existing socket with keepalive may have been closed by the other
|
||||
* end. The portable way to detect it is to run the runloop once to
|
||||
* allow us to be sent a notification about end-of-file.
|
||||
* On unix systems (google told me it is not reliable on windows) we can
|
||||
* simply peek on the file descriptor for a much more efficient check.
|
||||
*/
|
||||
#if defined(__MINGW__)
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
NSFileHandle *test = RETAIN(sock);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
NSLog(@"%@ check for reusable socket", NSStringFromSelector(_cmd));
|
||||
}
|
||||
[nc addObserver: self
|
||||
selector: @selector(bgdRead:)
|
||||
name: NSFileHandleReadCompletionNotification
|
||||
|
@ -1269,8 +1269,12 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
object: test];
|
||||
RELEASE(test);
|
||||
#else
|
||||
int fd = [sock fileDescriptor];
|
||||
int fd = [sock fileDescriptor];
|
||||
|
||||
if (debug)
|
||||
{
|
||||
NSLog(@"%@ check for reusable socket", NSStringFromSelector(_cmd));
|
||||
}
|
||||
if (fd >= 0)
|
||||
{
|
||||
extern int errno;
|
||||
|
|
|
@ -1595,11 +1595,9 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
NSString *path, *fullpath;
|
||||
NSEnumerator* pathlist;
|
||||
|
||||
if (!name || [name length] == 0)
|
||||
if (name == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"No resource name specified."];
|
||||
/* NOT REACHED */
|
||||
name = @"";
|
||||
}
|
||||
|
||||
pathlist = [[self _bundleResourcePathsWithRootPath: rootPath
|
||||
|
@ -1627,7 +1625,9 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
}
|
||||
}
|
||||
else
|
||||
fullpath = nil;
|
||||
{
|
||||
fullpath = nil;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -308,8 +308,8 @@ SortRange(id *objects, NSRange range, id *descriptors,
|
|||
if (count > 1 && numDescriptors > 0)
|
||||
{
|
||||
id descriptors[numDescriptors];
|
||||
GS_BEGINIDBUF(objects, count);
|
||||
NSArray *a;
|
||||
GS_BEGINIDBUF(objects, count);
|
||||
|
||||
[self getObjects: objects];
|
||||
[sortDescriptors getObjects: descriptors];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue