mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
apply bugfixes from trunk
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@33030 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3eb1b94bad
commit
e3c611f012
11 changed files with 458 additions and 592 deletions
49
ChangeLog
49
ChangeLog
|
@ -1,3 +1,52 @@
|
|||
2011-05-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFileHandle.m:
|
||||
* Source/GSHTTPURLHandle.m:
|
||||
* Source/win32/NSMessagePort.m:
|
||||
* Source/win32/NSMessagePortNameServer.m:
|
||||
Include/use errno.h for thread-safe errno support.
|
||||
|
||||
2011-05-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSArray.m: Fix keyed decoding for GSMutableArray and
|
||||
GSPlaceholderArray.
|
||||
|
||||
2011-05-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLParser.m: treat unknown/undefined encodings as utf-8
|
||||
so we tolerate bad xml documents better.
|
||||
|
||||
2011-05-02 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/Additions/GSObjCRuntime.m (GSSelectorFromNameAndTypes):
|
||||
With gcc 4.6 libobjc, GSSelectorFromNameAndTypes was calling some
|
||||
functions like sel_get_any_typed_uid that were not declared (they're
|
||||
declared in objc/objc-api.h which cannot be imported). I had to copy
|
||||
over these function declarations, otherwise incorrect function calls
|
||||
are generated which corrupt selectors (at least on x86-64).
|
||||
|
||||
2011-05-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSNumberFormatter.m: Fix broken copying of formatters,
|
||||
cleanup/simplify decoding, cleanup/simplify by removif macros.
|
||||
|
||||
2011-04-30 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Tools/autogsdoc.m: Fixed OrderedSymbolDeclarations.plist content to
|
||||
take in account that existing .gsdoc files are usually not regenerated.
|
||||
We now create the plist by merging it with the previously output plist
|
||||
file.
|
||||
|
||||
2011-04-26 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSNumberFormatter.m: Move the body of -init to a method called
|
||||
-_NSNumberFormatterInit, and call this in -initWithCoder: so that
|
||||
instances created with -initWithCoder: are initialized correctly.
|
||||
|
||||
2011-04-26 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Headers/Foundation/NSObjCRuntime.h: Add CGFLOAT_MIN and CGFLOAT_MAX
|
||||
|
||||
2011-04-14 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Version 1.22.0
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
#import <GNUstepBase/GSConfig.h>
|
||||
|
@ -41,14 +42,21 @@
|
|||
#if !defined(NSINTEGER_DEFINED)
|
||||
typedef intptr_t NSInteger;
|
||||
typedef uintptr_t NSUInteger;
|
||||
# define NSIntegerMax INTPTR_MAX
|
||||
# define NSIntegerMin INTPTR_MIN
|
||||
# define NSUIntegerMax UINTPTR_MAX
|
||||
#endif /* !defined(NSINTEGER_DEFINED) */
|
||||
|
||||
#if !defined(CGFLOAT_DEFINED)
|
||||
#if GS_SIZEOF_VOIDP == 8
|
||||
#define CGFLOAT_IS_DBL 1
|
||||
typedef double CGFloat;
|
||||
#define CGFLOAT_MIN DBL_MIN
|
||||
#define CGFLOAT_MAX DBL_MAX
|
||||
#else
|
||||
typedef float CGFloat;
|
||||
#define CGFLOAT_MIN FLT_MIN
|
||||
#define CGFLOAT_MAX FLT_MAX
|
||||
#endif
|
||||
#endif /* !defined(CGFLOAT_DEFINED) */
|
||||
|
||||
|
|
|
@ -138,6 +138,16 @@ GSSelectorFromName(const char *name)
|
|||
return sel_getUid(name);
|
||||
}
|
||||
|
||||
// FIXME: Hack - need to provide these function declarations
|
||||
// for gcc 4.6 libobjc. They're called below, and they're declared
|
||||
// in objc-api.h, but we're using runtime.h, so objc-api.h can't be imported.
|
||||
#if defined (__GNU_LIBOBJC__)
|
||||
SEL sel_get_any_typed_uid(const char *name);
|
||||
SEL sel_get_typed_uid(const char *name, const char*);
|
||||
SEL sel_register_name(const char *name);
|
||||
SEL sel_register_typed_name(const char *name, const char*type);
|
||||
#endif
|
||||
|
||||
SEL
|
||||
GSSelectorFromNameAndTypes(const char *name, const char *types)
|
||||
{
|
||||
|
|
|
@ -535,10 +535,7 @@ static Class GSInlineArrayClass;
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
|
||||
@"NS.objects"];
|
||||
|
||||
[self initWithArray: array];
|
||||
self = [super initWithCoder: aCoder];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1123,9 +1120,15 @@ static Class GSInlineArrayClass;
|
|||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
|
||||
@"NS.objects"];
|
||||
|
||||
return RETAIN(array);
|
||||
@"NS.objects"];
|
||||
if (array != nil)
|
||||
{
|
||||
return RETAIN(array);
|
||||
}
|
||||
else
|
||||
{
|
||||
return [super initWithCoder: aCoder];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2022,7 +2022,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
if (operation == GSFileHandleConnectCompletionNotification
|
||||
|| operation == GSSOCKSConnect)
|
||||
{ // Connection attempt completed.
|
||||
extern int errno;
|
||||
int result;
|
||||
int rval;
|
||||
unsigned len = sizeof(result);
|
||||
|
|
|
@ -62,6 +62,8 @@
|
|||
#include <sys/socket.h> // For MSG_PEEK, etc
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* Implement map keys for strings with case insensitive comparisons,
|
||||
* so we can have case insensitive matching of http headers (correct
|
||||
|
@ -1323,7 +1325,6 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
}
|
||||
if (fd >= 0)
|
||||
{
|
||||
extern int errno;
|
||||
int result;
|
||||
unsigned char c;
|
||||
|
||||
|
@ -1438,11 +1439,6 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
}
|
||||
if (sock == nil)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
extern int __declspec(dllimport) errno;
|
||||
#else
|
||||
extern int errno;
|
||||
#endif
|
||||
/*
|
||||
* Tell superclass that the load failed - let it do housekeeping.
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -752,7 +752,9 @@ static SEL foundIgnorableSel;
|
|||
*/
|
||||
enc = [GSMimeDocument encodingFromCharset:
|
||||
[GSMimeDocument charsetForXml: data]];
|
||||
if (enc == NSUTF8StringEncoding || enc == NSASCIIStringEncoding)
|
||||
if (enc == NSUTF8StringEncoding
|
||||
|| enc == NSASCIIStringEncoding
|
||||
|| enc == GSUndefinedEncoding)
|
||||
{
|
||||
this->data = [data copy];
|
||||
}
|
||||
|
|
|
@ -48,8 +48,7 @@
|
|||
#include "../GSPortPrivate.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern __declspec(dllimport) int errno;
|
||||
#include <errno.h>
|
||||
|
||||
#define UNISTR(X) \
|
||||
((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding])
|
||||
|
|
|
@ -42,13 +42,14 @@
|
|||
|
||||
#include "GNUstepBase/GSMime.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "../GSPrivate.h"
|
||||
#include "../GSPortPrivate.h"
|
||||
|
||||
#define UNISTR(X) \
|
||||
((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding])
|
||||
|
||||
extern __declspec(dllimport) int errno;
|
||||
|
||||
static NSRecursiveLock *serverLock = nil;
|
||||
static NSMessagePortNameServer *defaultServer = nil;
|
||||
|
|
|
@ -650,6 +650,7 @@ main(int argc, char **argv, char **env)
|
|||
NSMutableArray *gFiles = nil; // GSDOC
|
||||
NSMutableArray *hFiles = nil; // HTML
|
||||
NSString *symbolDeclsFile = nil;
|
||||
NSMutableDictionary *symbolDecls = nil;
|
||||
NSMutableSet *deps = nil;
|
||||
#if GS_WITH_GC == 0
|
||||
NSAutoreleasePool *outer = nil;
|
||||
|
@ -672,6 +673,8 @@ main(int argc, char **argv, char **env)
|
|||
3) Load existing .igsdoc file (PropertyList/Dictionary format) if found,
|
||||
initializing an AGSIndex from it.
|
||||
|
||||
Also load existing OrderedSymbolDeclarations.plist if found.
|
||||
|
||||
4) Clean if desired:
|
||||
|
||||
4a) Build list of all template files, and remove generated content
|
||||
|
@ -690,6 +693,8 @@ main(int argc, char **argv, char **env)
|
|||
5b) Determine (possibly multiple) dependent .m files corresponding to
|
||||
a .h and parse them.
|
||||
5c) Feed parser results to an AGSOutput instance.
|
||||
|
||||
Finally write the OrderedSymbolDeclarations.plist built by the parser.
|
||||
|
||||
6) Move to "gsdoc files" (including both command-line given ones and
|
||||
just-generated ones).. and generate the index; for each one:
|
||||
|
@ -1018,6 +1023,23 @@ main(int argc, char **argv, char **env)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Load old OrderedSymbolDeclarations.plist to merge it later
|
||||
*/
|
||||
if ([mgr isReadableFileAtPath: symbolDeclsFile])
|
||||
{
|
||||
symbolDecls =
|
||||
[NSMutableDictionary dictionaryWithContentsOfFile: symbolDeclsFile];
|
||||
if (symbolDeclsFile == nil)
|
||||
{
|
||||
NSLog(@"Unable to read ordered symbols file '%@'", symbolDeclsFile);
|
||||
}
|
||||
}
|
||||
if (symbolDecls == nil)
|
||||
{
|
||||
symbolDecls = [NSMutableDictionary dictionary];
|
||||
}
|
||||
|
||||
/*
|
||||
* 4) Clean if desired:
|
||||
*/
|
||||
|
@ -1496,10 +1518,12 @@ main(int argc, char **argv, char **env)
|
|||
}
|
||||
|
||||
/*
|
||||
* Ask the parser for the OrderedSymbolDeclarations plist and save it
|
||||
* Ask the parser for the OrderedSymbolDeclarations plist, merge with
|
||||
* the previously output plist and save it
|
||||
*/
|
||||
[[parser orderedSymbolDeclarationsByUnit] writeToFile: symbolDeclsFile
|
||||
atomically: YES];
|
||||
[symbolDecls addEntriesFromDictionary:
|
||||
[parser orderedSymbolDeclarationsByUnit]];
|
||||
[symbolDecls writeToFile: symbolDeclsFile atomically: YES];
|
||||
|
||||
informalProtocols = RETAIN([output informalProtocols]);
|
||||
#if GS_WITH_GC == 0
|
||||
|
|
Loading…
Reference in a new issue