mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* base.make.in
* ChangeLog * config/pathtls.m4 * config/pathxml.m4 * configure * configure.ac * Documentation/ReleaseNotes.gsdoc * Headers/Foundation/NSCalendar.h * Headers/Foundation/NSDate.h * Headers/Foundation/NSException.h * Headers/Foundation/NSNetServices.h * Headers/Foundation/NSString.h * Headers/Foundation/NSXMLNode.h * Headers/GNUstepBase/config.h.in * NSTimeZones/NSTimeZones.tar * Source/GSFFIInvocation.m * Source/GSPrivate.h * Source/GSSocketStream.m * Source/GSString.m * Source/NSAffineTransform.m * Source/NSBundle.m * Source/NSConnection.m * Source/NSFileManager.m * Source/NSHost.m * Source/NSInvocation.m * Source/NSJSONSerialization.m * Source/NSKeyValueCoding.m * Source/NSNotificationCenter.m * Source/NSNumberFormatter.m * Source/NSURLRequest.m * Source/NSUserDefaults.m * Source/NSXMLNode.m: Corrected infinite loop. Return an NSXMLNode for NSXMLInvalidKind per Cocoa documentation. * Tests/base/NSJSONSerialization/json.m * Tests/base/NSObject/initialize.m * Tests/base/NSString/NSString_tests.h * Tests/base/NSURLRequest/basic.m * Version: Merge with trunk. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34690 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e0748634c8
commit
f5fe581719
37 changed files with 580 additions and 334 deletions
226
ChangeLog
226
ChangeLog
|
@ -1,155 +1,143 @@
|
|||
2012-01-31 Doug Simons <doug.simons@testplant.com>
|
||||
2012-02-01 11:18-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLDocument.m
|
||||
* Source/NSXMLElement.m
|
||||
* Source/NSXMLNode.m (-insertChild:atIndex:): Implement our own
|
||||
_insertChild:atIndex: method to link a child in by hand. This
|
||||
avoids the built-in libxml functions' behavior of always merging
|
||||
adjacent text nodes as they are added, which Cocoa doesn't do.
|
||||
Next we need to implement -normalizeAdjacentTextNodesPreservingCDATA:.
|
||||
* base.make.in
|
||||
* ChangeLog
|
||||
* config/pathtls.m4
|
||||
* config/pathxml.m4
|
||||
* configure
|
||||
* configure.ac
|
||||
* Documentation/ReleaseNotes.gsdoc
|
||||
* Headers/Foundation/NSCalendar.h
|
||||
* Headers/Foundation/NSDate.h
|
||||
* Headers/Foundation/NSException.h
|
||||
* Headers/Foundation/NSNetServices.h
|
||||
* Headers/Foundation/NSString.h
|
||||
* Headers/Foundation/NSXMLNode.h
|
||||
* Headers/GNUstepBase/config.h.in
|
||||
* NSTimeZones/NSTimeZones.tar
|
||||
* Source/GSFFIInvocation.m
|
||||
* Source/GSPrivate.h
|
||||
* Source/GSSocketStream.m
|
||||
* Source/GSString.m
|
||||
* Source/NSAffineTransform.m
|
||||
* Source/NSBundle.m
|
||||
* Source/NSConnection.m
|
||||
* Source/NSFileManager.m
|
||||
* Source/NSHost.m
|
||||
* Source/NSInvocation.m
|
||||
* Source/NSJSONSerialization.m
|
||||
* Source/NSKeyValueCoding.m
|
||||
* Source/NSNotificationCenter.m
|
||||
* Source/NSNumberFormatter.m
|
||||
* Source/NSURLRequest.m
|
||||
* Source/NSUserDefaults.m
|
||||
* Source/NSXMLNode.m: Corrected infinite loop. Return an
|
||||
NSXMLNode for NSXMLInvalidKind per Cocoa documentation.
|
||||
* Tests/base/NSJSONSerialization/json.m
|
||||
* Tests/base/NSObject/initialize.m
|
||||
* Tests/base/NSString/NSString_tests.h
|
||||
* Tests/base/NSURLRequest/basic.m
|
||||
* Version: Merge with trunk.
|
||||
|
||||
2012-01-31 17:57-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLDocument.m: Minor corrections in
|
||||
initWithContentsOfURL:... to pass along error and mask.
|
||||
* Source/NSJSONSerialization.m: bugfix for empty strings.
|
||||
* Tests/base/NSJSONSerialization/json.m: add a few emtpy element
|
||||
tests and fixup to be more readable
|
||||
|
||||
2012-01-31 Doug Simons <doug.simons@testplant.com>
|
||||
2012-01-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLElement.m (-insertChild:atIndex:): Deal with the
|
||||
possibility that text nodes can be merged when added, to at least
|
||||
avoid crashing. This leaves the original NSXMLNode with a NULL node.
|
||||
* Version: revert last change as Fred pointed out I got it wrong and
|
||||
we shoudl be updating version immediately *after* release.
|
||||
|
||||
2012-01-30 22:55-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSXMLDocument.m: Do type check to make sure that
|
||||
argument passed into initWithData:... is a subclass of
|
||||
NSData also check if it's nil. In either case throw an
|
||||
exception.
|
||||
* Tests/base/NSURLRequest/basic.m: Remove two astray @ characters.
|
||||
|
||||
2012-01-30 22:20-EST Doug Simons <doug.simons@testplant.com>
|
||||
2012-01-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLPrivate.h
|
||||
* Source/NSXMLDocument.m
|
||||
* Source/NSXMLElement.m
|
||||
* Source/NSXMLNode.m: Simplify the memory management housekeeping by
|
||||
just calling a new _updateExternalRetains method after any operations
|
||||
that might have changed the retains. This still needs some cleaning up,
|
||||
but is working much better now.
|
||||
Clean up and simplify some of the init methods.
|
||||
Fix a few other things.
|
||||
* Version: Bump version to 1.24.0 in preparation for release.
|
||||
* NSTimeZones/NSTimeZones.tar: Update timezone information
|
||||
|
||||
2012-01-29 12:28-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLNode.m: Correct infinite loop in releaseExtraRetains.
|
||||
* Source/NSJSONSerialization.m:
|
||||
Fix buffer overrun reported by Lubomir Rintel <lubo.rintel@gooddata.com>
|
||||
|
||||
2012-01-26 22:48-CET Niels Grewe <niels.grewe@halbordnung.de>
|
||||
2012-01-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLElement.m: Try to fix attribute removal semantics.
|
||||
* Source/NSKeyValueCoding.m:
|
||||
* Source/NSAffineTransform.m:
|
||||
* Source/NSNotificationCenter.m:
|
||||
* Source/NSConnection.m:
|
||||
* Source/GSString.m:
|
||||
Avoid a few static analyser warnings.
|
||||
|
||||
2012-01-26 22:28-CET Niels Grewe <niels.grewe@halbordnung.de>
|
||||
2012-01-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLElement.m: Fix behaviour of -addAttribute:. Implement
|
||||
-attributeForName:
|
||||
* Tests/base/NSXMLElement/attributes.m: Add some attribute tests.
|
||||
* configure.ac:
|
||||
* Headers/GNUstepBase/config.h.in:
|
||||
* Source/GSFFIInvocation.m:
|
||||
* Source/GSPrivate.h:
|
||||
* Source/NSInvocation.m:
|
||||
If modern ffi is available, use ffi_prep_closure_loc and ffi closure
|
||||
memory management so we get the benefit of ffi library code to work
|
||||
around restrictions of selinux etc.
|
||||
|
||||
2012-01-24 21:59-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tests/base/NSXMLElement/children.m: Remove test based
|
||||
on tests performed on Cocoa. Remove check for ablility
|
||||
to instantiate NSXMLAttributeDeclarationKind.
|
||||
* Source/NSUserDefaults.m: Try to deal with the case where a language
|
||||
has been set to the ISO standard name rather than an OpenStep name
|
||||
by converting to an Openstep name as an alternative lookup key.
|
||||
* Source/NSXMLNode.m: Add warning that the DOM classes are not really
|
||||
functional in this release.
|
||||
|
||||
2012-01-23 12:09-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLElement.m: Remove setObjectValue: implementation.
|
||||
* Source/NSXMLNode.m: Remove comments around code to replace
|
||||
nil value.
|
||||
* Tests/base/NSXMLNode/basic.m: correct test.
|
||||
* Source/NSFileManager.m: Fix copying for large files (issue #35381)
|
||||
|
||||
2012-01-21 06:16-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-25 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||
|
||||
* Source/NSXMLDocument.m
|
||||
* Source/NSXMLElement.m
|
||||
* Source/NSXMLNode.m: Make all tests pass, correct child
|
||||
issues.
|
||||
* Source/NSNumberFormatter.m: Call unum_format* only once.
|
||||
|
||||
2012-01-18 16:21-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLNode.m: fixes for issues found in GNUstep unit
|
||||
tests.
|
||||
* Source/GSSocketStream.m: fix possible nul pointer dereference.
|
||||
* Source/NSHost.m: cache failed lookup by name so that repeated
|
||||
lookups for a band host name do not cause repeated DNS queries.
|
||||
|
||||
2012-01-18 12:52-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLDTDNode.m: Remove uneeded releases in dealloc.
|
||||
* Source/NSXMLPrivate.h: Remove ivars from NSXMLDTDNode.h
|
||||
* Source/NSURLRequest.m: be tolerant about missing URL on init.
|
||||
|
||||
2012-01-18 12:22-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLNode.m: Add code in initWithKind
|
||||
* Source/NSXMLDTDNode.m: Remove attributes, use libxml2 structures
|
||||
instead.
|
||||
* Source/NSXMLPrivate.h: Add define for MY_DTD.
|
||||
* Source/GSFFIInvocation.m: Fix selector types comparison to use the
|
||||
correct function for checking equivalent types.
|
||||
|
||||
2012-01-17 19:09-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSXMLNode.m: Add code to create nodes for comments,
|
||||
pi's and DTDs.
|
||||
* config/pathtls.m4:
|
||||
* config/pathxml.m4:
|
||||
Remove incorrect sed call to tidy flags (as suggested by Felix Geyer
|
||||
in bug #34835).
|
||||
|
||||
2012-01-17 18:32-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-16 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSXMLDocument.m
|
||||
* Source/NSXMLElement.m: add code to insertChild:atIndex: to
|
||||
handle edge cases.
|
||||
* Source/NSBundle.m (addBundlePath): Handle nested subdirectories
|
||||
(e.g.
|
||||
[NSBundle pathForLibraryResource:
|
||||
@"Generic-PostScript_Printer-Postscript" ofType: @"ppd"
|
||||
inDirectory: @"PostScript/PPD"] was previously failing.)
|
||||
|
||||
2012-01-17 04:05-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
2012-01-12 10:10 theraven
|
||||
|
||||
* Source/NSXMLElement.m
|
||||
|
||||
2012-01-17 03:48-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLDocument.m
|
||||
* Source/NSXMLNode.m: Add / to xpath if it is not there.
|
||||
Thes matches behavior observed on Mac OS X/Cocoa.
|
||||
|
||||
2012-01-17 03:06-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLDocument.m: Correct issues with unit tests.
|
||||
ignore nil on setRootElement:. Correct other issues.
|
||||
|
||||
2012-01-16 13:30-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLElement.m
|
||||
* Source/NSXMLNode.m: Corrections to make "basic" tests pass.
|
||||
|
||||
2012-01-15 10:48-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLNode.m
|
||||
* Source/NSXMLPrivate.h: Implement XPath query.
|
||||
|
||||
2012-01-12 18:18-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLElement.m
|
||||
* Source/NSXMLNode.m: Add code to automatically instantiate
|
||||
the node to fill in the _private pointer if it is not present.
|
||||
|
||||
2012-01-12 12:05-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLElement.m: Changes to make NSXMLElement use
|
||||
libxml2 structures.
|
||||
|
||||
2012-01-11 12:54-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLNode.m: Get final methods implemented on NSXMLNode
|
||||
except for XPath/XQuery methods.
|
||||
|
||||
2012-01-10 20:21-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLDocument.m: Added forward declarations for private
|
||||
methods on NSXMLNode.
|
||||
|
||||
2012-01-10 20:05-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLNode.m: Changes to move NSXML classes to using libxml
|
||||
more directly.
|
||||
* libs/base/trunk/Headers/Foundation/NSException.h: Tweak the
|
||||
exception mismatch handling so that if base is using native exceptions
|
||||
and the user doesn't specify an exception mode then we just don't define
|
||||
the NS_ macros, so code that uses @try etc. compiles without requiring
|
||||
every cc line to specify a long -D flag just to be allowed to #import
|
||||
Foundation.h.
|
||||
|
||||
2012-01-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -29,6 +29,35 @@ notice and this notice are preserved.
|
|||
migrate to using a newer version of the library.
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.24.0</heading>
|
||||
<p>A new stable release.<br />
|
||||
Most changes in this version are behavior updates/improvements
|
||||
rather than new API, but you shuld be aware that there is a
|
||||
binary incompatibility on 64bit systems in that the value of
|
||||
the NSNotFound constant there is now 64bits rather than 32bits.
|
||||
</p>
|
||||
<p>With this release the official supported compiler for GNUstep
|
||||
is gcc-4.0 and later, and the base library has been tested using
|
||||
recent gcc development snapshots.
|
||||
</p>
|
||||
<p>The main changes are:<br />
|
||||
Support for the GNU LANGUAGES environment variable and other locale
|
||||
improvements.<br />
|
||||
Cacheing of file and directory path information within bundles.<br />
|
||||
IPV6 support for NSHost and networking operations.<br />
|
||||
Support for UTF-8 string literals in source (compiler permitting).<br />
|
||||
Improved support for building standalone application bundles.<br />
|
||||
And of course, lots of bugfixes and OSX compatibility tweaks.
|
||||
</p>
|
||||
<p>One this that didn't make it into this release was functioning
|
||||
NSXML DOM classes. For DOM style work you still need to use the
|
||||
GSXML classes, however there is active work on implementing NSXMLNode
|
||||
and friends as wrappers round the corresponding libxml2 classes, and
|
||||
we hope/expect these to be ready soon.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<heading>Version 1.23.0</heading>
|
||||
<p>A new stable release with many minor bugfices and tweaks.<br />
|
||||
|
|
|
@ -109,7 +109,6 @@ enum
|
|||
- (void) setHour: (NSInteger) v;
|
||||
- (void) setMinute: (NSInteger) v;
|
||||
- (void) setMonth: (NSInteger) v;
|
||||
- (void) setQuarter: (NSInteger) v;
|
||||
- (void) setSecond: (NSInteger) v;
|
||||
- (void) setWeek: (NSInteger) v;
|
||||
- (void) setWeekday: (NSInteger) v;
|
||||
|
|
|
@ -98,7 +98,6 @@ GS_EXPORT const NSTimeInterval NSTimeIntervalSince1970;
|
|||
- (NSTimeInterval) timeIntervalSinceDate: (NSDate*)otherDate;
|
||||
- (NSTimeInterval) timeIntervalSinceNow;
|
||||
- (NSTimeInterval) timeIntervalSinceReferenceDate;
|
||||
- (NSTimeInterval) timeIntervalSinceReferenceDate;
|
||||
|
||||
// Comparing dates
|
||||
|
||||
|
|
|
@ -35,12 +35,10 @@
|
|||
|
||||
#if defined(_NATIVE_OBJC_EXCEPTIONS)
|
||||
#define USER_NATIVE_OBJC_EXCEPTIONS 1
|
||||
#elif __has_feature(objc_exceptions)
|
||||
#define USER_NATIVE_OBJC_EXCEPTIONS 1
|
||||
#else
|
||||
#define USER_NATIVE_OBJC_EXCEPTIONS 0
|
||||
#endif
|
||||
#if BASE_NATIVE_OBJC_EXCEPTIONS != USER_NATIVE_OBJC_EXCEPTIONS
|
||||
#if !BASE_NATIVE_OBJC_EXCEPTIONS && USER_NATIVE_OBJC_EXCEPTIONS
|
||||
#error The current setting for native-objc-exceptions does not match that of gnustep-base ... please correct this.
|
||||
#endif
|
||||
|
||||
|
@ -330,7 +328,7 @@ NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler);
|
|||
It is illegal to exit the first block of code by any other means than
|
||||
NS_VALRETURN, NS_VOIDRETURN, or just falling out the bottom.
|
||||
*/
|
||||
#if defined(_NATIVE_OBJC_EXCEPTIONS)
|
||||
#if USER_NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
# define NS_DURING @try {
|
||||
# define NS_HANDLER } @catch (NSException * localException) {
|
||||
|
@ -340,7 +338,7 @@ NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler);
|
|||
# define NS_VALUERETURN(object, id) return (object)
|
||||
# define NS_VOIDRETURN return
|
||||
|
||||
#else // _NATIVE_OBJC_EXCEPTIONS
|
||||
#elif !USER_NATIVE_OBJC_EXCEPTIONS && !BASE_NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
/** Private support routine. Do not call directly. */
|
||||
GS_EXPORT void _NSAddHandler( NSHandler *handler );
|
||||
|
|
|
@ -363,7 +363,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
forMode: (NSString *) mode;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
- (NSInteger)port;
|
||||
- (NSInteger) port;
|
||||
|
||||
- (void) publishWithOptions: (NSNetServiceOptions)options;
|
||||
#endif
|
||||
|
@ -376,11 +376,6 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain;
|
|||
- (void) startMonitoring;
|
||||
- (void) stopMonitoring;
|
||||
|
||||
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||
- (NSInteger)port;
|
||||
|
||||
- (void) publishWithOptions: (NSNetServiceOptions)options;
|
||||
#endif
|
||||
- (id<NSNetServiceDelegate>) delegate;
|
||||
- (void) setDelegate: (id<NSNetServiceDelegate>) delegate;
|
||||
|
||||
|
|
|
@ -350,7 +350,6 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
- (id) initWithData: (NSData*)data
|
||||
encoding: (NSStringEncoding)encoding;
|
||||
- (id) initWithContentsOfFile: (NSString*)path;
|
||||
- (id) init;
|
||||
|
||||
// Getting a String's Length
|
||||
- (NSUInteger) length;
|
||||
|
|
|
@ -97,13 +97,13 @@ typedef NSUInteger NSXMLNodeKind;
|
|||
* when we don't have the non-fragile ABI available.
|
||||
* Use this mechanism rather than changing the instance variable
|
||||
* layout (see Source/GSInternal.h for details).
|
||||
* In this case, when compiled the variable is a protected class
|
||||
* In this case, when compiled the variable is a public class pointer
|
||||
* available so that the NSXMLNode subclasses within the base library
|
||||
* can share the same variables, but when viewed from outside the
|
||||
* base library itsself, it's an opaque pointer which must not be used.
|
||||
*/
|
||||
# if defined(GSInternal)
|
||||
@protected GSInternal *_internal GS_UNUSED_IVAR;
|
||||
@public GSInternal *_internal GS_UNUSED_IVAR;
|
||||
# else
|
||||
@private id _internal GS_UNUSED_IVAR;
|
||||
# endif
|
||||
|
|
|
@ -205,6 +205,9 @@
|
|||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `ffi_prep_closure_loc' function. */
|
||||
#undef HAVE_FFI_PREP_CLOSURE_LOC
|
||||
|
||||
/* Define to 1 if you have the <float.h> header file. */
|
||||
#undef HAVE_FLOAT_H
|
||||
|
||||
|
|
Binary file not shown.
|
@ -148,6 +148,7 @@ static IMP gs_objc_msg_forward2 (id receiver, SEL sel)
|
|||
NSMutableData *frame;
|
||||
cifframe_t *cframe;
|
||||
ffi_closure *cclosure;
|
||||
void *executable;
|
||||
NSMethodSignature *sig = nil;
|
||||
GSCodeBuffer *memory;
|
||||
const char *types;
|
||||
|
@ -207,18 +208,28 @@ static IMP gs_objc_msg_forward2 (id receiver, SEL sel)
|
|||
|
||||
memory = [GSCodeBuffer memoryWithSize: sizeof(ffi_closure)];
|
||||
cclosure = [memory buffer];
|
||||
executable = [memory executable];
|
||||
if (cframe == NULL || cclosure == NULL)
|
||||
{
|
||||
[NSException raise: NSMallocException format: @"Allocating closure"];
|
||||
}
|
||||
#if HAVE_FFI_PREP_CLOSURE_LOC
|
||||
if (ffi_prep_closure_loc(cclosure, &(cframe->cif),
|
||||
GSFFIInvocationCallback, frame, executable) != FFI_OK)
|
||||
{
|
||||
[NSException raise: NSGenericException format: @"Preping closure"];
|
||||
}
|
||||
#else
|
||||
executable = (void*)cclosure;
|
||||
if (ffi_prep_closure(cclosure, &(cframe->cif),
|
||||
GSFFIInvocationCallback, frame) != FFI_OK)
|
||||
{
|
||||
[NSException raise: NSGenericException format: @"Preping closure"];
|
||||
}
|
||||
#endif
|
||||
[memory protect];
|
||||
|
||||
return (IMP)cclosure;
|
||||
return (IMP)executable;
|
||||
}
|
||||
|
||||
static __attribute__ ((__unused__))
|
||||
|
@ -584,7 +595,7 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
const char *receiverTypes = [sig methodType];
|
||||
const char *runtimeTypes = GSTypesFromSelector(selector);
|
||||
|
||||
if (runtimeTypes == 0 || strcmp(receiverTypes, runtimeTypes) != 0)
|
||||
if (NO == GSSelectorTypesMatch(receiverTypes, runtimeTypes))
|
||||
{
|
||||
const char *runtimeName = sel_getName(selector);
|
||||
|
||||
|
|
|
@ -526,9 +526,11 @@ GSPrivateUnloadModule(FILE *errorStream,
|
|||
{
|
||||
unsigned size;
|
||||
void *buffer;
|
||||
void *executable;
|
||||
}
|
||||
+ (GSCodeBuffer*) memoryWithSize: (NSUInteger)_size;
|
||||
- (void*) buffer;
|
||||
- (void*) executable;
|
||||
- (id) initWithSize: (NSUInteger)_size;
|
||||
- (void) protect;
|
||||
@end
|
||||
|
|
|
@ -141,6 +141,10 @@ GSPrivateSockaddrSetup(NSString *machine, uint16_t port,
|
|||
n = [machine UTF8String];
|
||||
}
|
||||
|
||||
if (0 == n)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
if (0 == strchr(n, ':'))
|
||||
{
|
||||
struct sockaddr_in *addr = (struct sockaddr_in*)sin;
|
||||
|
|
|
@ -4616,15 +4616,18 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
|
||||
if (encoding == internalEncoding)
|
||||
{
|
||||
if (shouldFree == YES)
|
||||
{
|
||||
_zone = NSZoneFromPointer(chars);
|
||||
_contents.c = chars;
|
||||
}
|
||||
else
|
||||
if (0 != chars)
|
||||
{
|
||||
_contents.c = NSZoneMalloc(_zone, length);
|
||||
memcpy(_contents.c, chars, length);
|
||||
if (shouldFree == YES)
|
||||
{
|
||||
_zone = NSZoneFromPointer(chars);
|
||||
_contents.c = chars;
|
||||
}
|
||||
else
|
||||
{
|
||||
_contents.c = NSZoneMalloc(_zone, length);
|
||||
memcpy(_contents.c, chars, length);
|
||||
}
|
||||
}
|
||||
_count = length;
|
||||
_flags.wide = 0;
|
||||
|
@ -5595,9 +5598,6 @@ literalIsEqual(NXConstantString *self, id anObject)
|
|||
NSUInteger start;
|
||||
NSUInteger stop;
|
||||
NSRange range;
|
||||
BOOL (*mImp)(id, SEL, unichar);
|
||||
unichar n = 0;
|
||||
unsigned i = 0;
|
||||
BOOL ascii;
|
||||
|
||||
index = lengthUTF8((const uint8_t*)nxcsptr, nxcslen, &ascii, 0);
|
||||
|
@ -5609,44 +5609,52 @@ literalIsEqual(NXConstantString *self, id anObject)
|
|||
range.location = NSNotFound;
|
||||
range.length = 0;
|
||||
|
||||
mImp = (BOOL(*)(id,SEL,unichar))
|
||||
[aSet methodForSelector: @selector(characterIsMember:)];
|
||||
if (stop > start)
|
||||
{
|
||||
BOOL (*mImp)(id, SEL, unichar);
|
||||
unichar n = 0;
|
||||
unsigned i = 0;
|
||||
|
||||
for (index = 0; index < start; index++)
|
||||
{
|
||||
nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
|
||||
}
|
||||
if ((mask & NSBackwardsSearch) == NSBackwardsSearch)
|
||||
{
|
||||
unichar buf[stop - start];
|
||||
NSUInteger pos = 0;
|
||||
|
||||
for (pos = 0; pos + start < stop; pos++)
|
||||
mImp = (BOOL(*)(id,SEL,unichar))
|
||||
[aSet methodForSelector: @selector(characterIsMember:)];
|
||||
|
||||
for (index = 0; index < start; index++)
|
||||
{
|
||||
buf[pos] = nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
|
||||
nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
|
||||
}
|
||||
index = stop;
|
||||
while (index-- > 0)
|
||||
if ((mask & NSBackwardsSearch) == NSBackwardsSearch)
|
||||
{
|
||||
if ((*mImp)(aSet, @selector(characterIsMember:), buf[--pos]))
|
||||
unichar buf[stop - start];
|
||||
NSUInteger pos = 0;
|
||||
|
||||
for (pos = 0; pos + start < stop; pos++)
|
||||
{
|
||||
range = NSMakeRange(index, 1);
|
||||
break;
|
||||
buf[pos] = nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
|
||||
}
|
||||
index = stop;
|
||||
while (index-- > 0)
|
||||
{
|
||||
if ((*mImp)(aSet, @selector(characterIsMember:), buf[--pos]))
|
||||
{
|
||||
range = NSMakeRange(index, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (index < stop)
|
||||
else
|
||||
{
|
||||
unichar letter = nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
|
||||
|
||||
if ((*mImp)(aSet, @selector(characterIsMember:), letter))
|
||||
while (index < stop)
|
||||
{
|
||||
range = NSMakeRange(index, 1);
|
||||
break;
|
||||
unichar letter;
|
||||
|
||||
letter = nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
|
||||
if ((*mImp)(aSet, @selector(characterIsMember:), letter))
|
||||
{
|
||||
range = NSMakeRange(index, 1);
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#import "Foundation/NSException.h"
|
||||
#import "Foundation/NSAffineTransform.h"
|
||||
#import "Foundation/NSCoder.h"
|
||||
#import "GNUstepBase/NSObject+GNUstepBase.h"
|
||||
|
||||
/* Private definitions */
|
||||
#define A _matrix.m11
|
||||
|
@ -594,6 +595,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// FIXME
|
||||
return [self notImplemented: _cmd];
|
||||
/*
|
||||
NSData *data = [aCoder decodeObjectForKey: @"NSTransformStruct"];
|
||||
unsigned int cursor = 0;
|
||||
|
|
|
@ -399,14 +399,19 @@ addBundlePath(NSMutableArray *list, NSArray *contents,
|
|||
}
|
||||
if (nil != subdir)
|
||||
{
|
||||
if (NO == [contents containsObject: subdir])
|
||||
NSEnumerator *e = [[subdir pathComponents] objectEnumerator];
|
||||
NSString *subdirComponent;
|
||||
while ((subdirComponent = [e nextObject]) != nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
path = [path stringByAppendingPathComponent: subdir];
|
||||
if (nil == (contents = bundle_directory_readable(path)))
|
||||
{
|
||||
return;
|
||||
if (NO == [contents containsObject: subdirComponent])
|
||||
{
|
||||
return;
|
||||
}
|
||||
path = [path stringByAppendingPathComponent: subdirComponent];
|
||||
if (nil == (contents = bundle_directory_readable(path)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nil != lang)
|
||||
|
|
|
@ -2141,6 +2141,10 @@ static NSLock *cached_proxies_gate = nil;
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
datum = 0;
|
||||
}
|
||||
[inv setReturnValue: datum];
|
||||
|
||||
/* Decode the values returned by reference. Note: this logic
|
||||
|
|
|
@ -2655,11 +2655,11 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
|
||||
#else
|
||||
NSDictionary *attributes;
|
||||
int i;
|
||||
unsigned long long fileSize;
|
||||
unsigned long long i;
|
||||
int bufsize = 8096;
|
||||
int sourceFd;
|
||||
int destFd;
|
||||
int fileSize;
|
||||
int fileMode;
|
||||
int rbytes;
|
||||
int wbytes;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSEnumerator.h"
|
||||
#import "Foundation/NSNull.h"
|
||||
#import "Foundation/NSSet.h"
|
||||
#import "Foundation/NSCoder.h"
|
||||
|
||||
|
@ -57,6 +58,7 @@ static Class hostClass;
|
|||
static NSRecursiveLock *_hostCacheLock = nil;
|
||||
static BOOL _hostCacheEnabled = YES;
|
||||
static NSMutableDictionary *_hostCache = nil;
|
||||
static id null = nil;
|
||||
|
||||
|
||||
@interface NSHost (Private)
|
||||
|
@ -75,7 +77,7 @@ static NSMutableDictionary *_hostCache = nil;
|
|||
[s addObject: name];
|
||||
ASSIGNCOPY(_names, s);
|
||||
RELEASE(s);
|
||||
if (_hostCacheEnabled == YES)
|
||||
if (YES == _hostCacheEnabled)
|
||||
{
|
||||
[_hostCache setObject: self forKey: name];
|
||||
}
|
||||
|
@ -91,7 +93,7 @@ static NSMutableDictionary *_hostCache = nil;
|
|||
name = [name copy];
|
||||
_names = [[NSSet alloc] initWithObjects: &name count: 1];
|
||||
_addresses = RETAIN(_names);
|
||||
if (_hostCacheEnabled == YES)
|
||||
if (YES == _hostCacheEnabled)
|
||||
{
|
||||
[_hostCache setObject: self forKey: name];
|
||||
}
|
||||
|
@ -202,7 +204,7 @@ static NSMutableDictionary *_hostCache = nil;
|
|||
_addresses = [addresses copy];
|
||||
RELEASE(addresses);
|
||||
|
||||
if (_hostCacheEnabled == YES)
|
||||
if (YES == _hostCacheEnabled)
|
||||
{
|
||||
[_hostCache setObject: self forKey: name];
|
||||
}
|
||||
|
@ -261,6 +263,7 @@ myHostName()
|
|||
if (self == [NSHost class])
|
||||
{
|
||||
hostClass = self;
|
||||
null = [[NSNull null] retain];
|
||||
_hostCacheLock = [[NSRecursiveLock alloc] init];
|
||||
_hostCache = [NSMutableDictionary new];
|
||||
}
|
||||
|
@ -298,7 +301,7 @@ myHostName()
|
|||
}
|
||||
|
||||
[_hostCacheLock lock];
|
||||
if (_hostCacheEnabled == YES)
|
||||
if (YES == _hostCacheEnabled)
|
||||
{
|
||||
host = [_hostCache objectForKey: name];
|
||||
}
|
||||
|
@ -332,6 +335,10 @@ myHostName()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (YES == _hostCacheEnabled)
|
||||
{
|
||||
[_hostCache setObject: null forKey: name];
|
||||
}
|
||||
NSLog(@"Host '%@' not found using 'gethostbyname()' - "
|
||||
@"perhaps the hostname is wrong or networking is not "
|
||||
@"set up on your machine", name);
|
||||
|
@ -344,6 +351,10 @@ myHostName()
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ((id)host == null)
|
||||
{
|
||||
host = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
IF_NO_GC([[host retain] autorelease];)
|
||||
|
@ -406,7 +417,7 @@ myHostName()
|
|||
#endif
|
||||
|
||||
[_hostCacheLock lock];
|
||||
if (_hostCacheEnabled == YES)
|
||||
if (YES == _hostCacheEnabled)
|
||||
{
|
||||
host = [_hostCache objectForKey: address];
|
||||
}
|
||||
|
|
|
@ -73,6 +73,9 @@
|
|||
{
|
||||
if (size > 0)
|
||||
{
|
||||
#if defined(HAVE_FFI_PREP_CLOSURE_LOC)
|
||||
ffi_closure_free(buffer);
|
||||
#else
|
||||
#if defined(HAVE_MMAP)
|
||||
munmap(buffer, size);
|
||||
#else
|
||||
|
@ -84,14 +87,34 @@
|
|||
#endif
|
||||
NSDeallocateMemoryPages(buffer, NSPageSize());
|
||||
#endif
|
||||
#endif
|
||||
buffer = 0;
|
||||
executable = 0;
|
||||
size = 0;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void*) executable
|
||||
{
|
||||
return executable;
|
||||
}
|
||||
|
||||
- (id) initWithSize: (NSUInteger)_size
|
||||
{
|
||||
NSAssert(_size > 0, @"Tried to allocate zero length buffer.");
|
||||
NSAssert(_size <= NSPageSize(), @"Tried to allocate more than one page.");
|
||||
#if defined(HAVE_FFI_PREP_CLOSURE_LOC)
|
||||
buffer = ffi_closure_alloc(_size, &executable);
|
||||
if (0 == buffer)
|
||||
{
|
||||
executable = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = _size;
|
||||
}
|
||||
#else
|
||||
#if defined(HAVE_MMAP)
|
||||
#if defined(HAVE_MPROTECT)
|
||||
/* We have mprotect, so we create memory as writable and change it to
|
||||
|
@ -117,13 +140,16 @@
|
|||
NSLog(@"Failed to map %"PRIuPTR
|
||||
" bytes for execute: %@", _size, [NSError _last]);
|
||||
buffer = 0;
|
||||
executable = 0;
|
||||
[self dealloc];
|
||||
self = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
executable = buffer;
|
||||
size = _size;
|
||||
}
|
||||
#endif /* USE_LIBFFI */
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -132,7 +158,8 @@
|
|||
*/
|
||||
- (void) protect
|
||||
{
|
||||
#if defined(__MINGW__)
|
||||
#if !defined(HAVE_FFI_PREP_CLOSURE_LOC)
|
||||
#if defined(__MINGW__)
|
||||
DWORD old;
|
||||
if (VirtualProtect(buffer, size, PAGE_EXECUTE, &old) == 0)
|
||||
{
|
||||
|
@ -144,6 +171,7 @@
|
|||
NSLog(@"Failed to protect memory as executable: %@", [NSError _last]);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -147,9 +147,16 @@ updateStreamBuffer(ParserState* state)
|
|||
[stream read: &bytes[++i] maxLength: 1];
|
||||
}
|
||||
while (bytes[i] & 0xf);
|
||||
str = [[NSString alloc] initWithUTF8String: (char*)bytes];
|
||||
[str getCharacters: state->buffer range: NSMakeRange(0,1)];
|
||||
[str release];
|
||||
if (0 == i)
|
||||
{
|
||||
state->buffer[0] = bytes[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
str = [[NSString alloc] initWithUTF8String: (char*)bytes];
|
||||
[str getCharacters: state->buffer range: NSMakeRange(0,1)];
|
||||
[str release];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NSUTF32LittleEndianStringEncoding:
|
||||
|
@ -273,7 +280,7 @@ NS_RETURNS_RETAINED static NSString*
|
|||
parseString(ParserState *state)
|
||||
{
|
||||
NSMutableString *val = nil;
|
||||
unichar buffer[64];
|
||||
unichar buffer[BUFFER_SIZE];
|
||||
int bufferIndex = 0;
|
||||
unichar next;
|
||||
|
||||
|
@ -331,12 +338,13 @@ parseString(ParserState *state)
|
|||
}
|
||||
}
|
||||
buffer[bufferIndex++] = next;
|
||||
if (bufferIndex >= 64)
|
||||
if (bufferIndex >= BUFFER_SIZE)
|
||||
{
|
||||
NSMutableString *str;
|
||||
|
||||
str = [[NSMutableString alloc] initWithCharacters: buffer
|
||||
length: 64];
|
||||
length: bufferIndex];
|
||||
bufferIndex = 0;
|
||||
if (nil == val)
|
||||
{
|
||||
val = str;
|
||||
|
@ -366,6 +374,10 @@ parseString(ParserState *state)
|
|||
[str release];
|
||||
}
|
||||
}
|
||||
else if (nil == val)
|
||||
{
|
||||
val = [NSMutableString new];
|
||||
}
|
||||
if (!state->mutableStrings)
|
||||
{
|
||||
val = [val makeImmutableCopyOnFail: YES];
|
||||
|
|
|
@ -604,7 +604,7 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
{
|
||||
SEL sel = 0;
|
||||
const char *type = NULL;
|
||||
int off;
|
||||
int off = 0;
|
||||
const char *name;
|
||||
char key[size + 1];
|
||||
char buf[size + 5];
|
||||
|
@ -711,6 +711,7 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
|
||||
name = buf; // _setKey:
|
||||
type = NULL;
|
||||
off = 0;
|
||||
sel = sel_getUid(name);
|
||||
if (sel == 0 || [self respondsToSelector: sel] == NO)
|
||||
{
|
||||
|
@ -802,7 +803,7 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
{
|
||||
SEL sel = 0;
|
||||
const char *type = 0;
|
||||
int off;
|
||||
int off = 0;
|
||||
unsigned size = [aKey length] * 8;
|
||||
char key[size + 1];
|
||||
|
||||
|
|
|
@ -1276,9 +1276,9 @@ static NSNotificationCenter *default_center = nil;
|
|||
GSNotification *notification;
|
||||
|
||||
notification = (id)NSAllocateObject(concrete, 0, NSDefaultMallocZone());
|
||||
name = notification->_name = [name copyWithZone: [self zone]];
|
||||
object = notification->_object = TEST_RETAIN(object);
|
||||
notification->_info = TEST_RETAIN(info);
|
||||
notification->_name = [name copyWithZone: [self zone]];
|
||||
notification->_object = [object retain];
|
||||
notification->_info = [info retain];
|
||||
[self _postAndRelease: notification];
|
||||
}
|
||||
|
||||
|
|
|
@ -1055,20 +1055,15 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
|
|||
|
||||
#define STRING_FROM_NUMBER(function, number) do \
|
||||
{ \
|
||||
UChar *outStr = buffer; \
|
||||
UErrorCode err = U_ZERO_ERROR; \
|
||||
int32_t len; \
|
||||
NSString *result; \
|
||||
\
|
||||
len = function (internal->_formatter, number, outStr, \
|
||||
len = function (internal->_formatter, number, buffer, \
|
||||
BUFFER_SIZE, NULL, &err); \
|
||||
if (len > BUFFER_SIZE) \
|
||||
outStr = NSZoneMalloc ([self zone], len * sizeof(UChar));\
|
||||
err = U_ZERO_ERROR; \
|
||||
function (internal->_formatter, number, outStr, BUFFER_SIZE, NULL, &err); \
|
||||
result = [NSString stringWithCharacters: outStr length: len]; \
|
||||
if (len > BUFFER_SIZE) \
|
||||
NSZoneFree ([self zone], outStr); \
|
||||
len = BUFFER_SIZE; \
|
||||
result = [NSString stringWithCharacters: buffer length: len]; \
|
||||
return result; \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -188,9 +188,9 @@ typedef struct {
|
|||
{
|
||||
if ([URL isKindOfClass: [NSURL class]] == NO)
|
||||
{
|
||||
DESTROY(self);
|
||||
URL = nil;
|
||||
}
|
||||
else if ((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
this->URL = RETAIN(URL);
|
||||
this->cachePolicy = cachePolicy;
|
||||
|
|
|
@ -942,23 +942,37 @@ newLanguages(NSArray *oldNames)
|
|||
|
||||
added_lang = NO;
|
||||
added_locale = NO;
|
||||
enumerator = [uL objectEnumerator];
|
||||
enumerator = [nL objectEnumerator];
|
||||
while ((lang = [enumerator nextObject]))
|
||||
{
|
||||
NSDictionary *dict = nil;
|
||||
NSString *path = nil;
|
||||
NSEnumerator *pathEnumerator = [paths objectEnumerator];
|
||||
NSString *alt;
|
||||
NSEnumerator *pathEnumerator;
|
||||
|
||||
/* The language name could be an ISO language identifier rather
|
||||
* than an OpenStep name (OSX has moved to using them), so we
|
||||
* try converting as an alternative key for lookup.
|
||||
*/
|
||||
alt = GSLanguageFromLocale(lang);
|
||||
pathEnumerator = [paths objectEnumerator];
|
||||
while ((path = [pathEnumerator nextObject]) != nil)
|
||||
{
|
||||
path = [[path stringByAppendingPathComponent: tail]
|
||||
stringByAppendingPathComponent: lang];
|
||||
|
||||
stringByAppendingPathComponent: lang];
|
||||
if ([fm fileExistsAtPath: path])
|
||||
{
|
||||
/* Path found! */
|
||||
break;
|
||||
break; /* Path found! */
|
||||
}
|
||||
if (nil != alt)
|
||||
{
|
||||
path = [[path stringByAppendingPathComponent: tail]
|
||||
stringByAppendingPathComponent: alt];
|
||||
if ([fm fileExistsAtPath: path])
|
||||
{
|
||||
break; /* Path found! */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (path != nil)
|
||||
|
@ -989,6 +1003,8 @@ newLanguages(NSArray *oldNames)
|
|||
#endif
|
||||
if (locale != nil)
|
||||
{
|
||||
NSString *i18n = GSLanguageFromLocale(locale);
|
||||
|
||||
/* See if we can get the dictionary from i18n
|
||||
* functions. I don't think that the i18n routines
|
||||
* can handle more than one locale, so we don't try to
|
||||
|
@ -996,7 +1012,7 @@ newLanguages(NSArray *oldNames)
|
|||
* if it matches 'lang' ... but tell me if I'm wrong
|
||||
* ...
|
||||
*/
|
||||
if ([lang isEqualToString: GSLanguageFromLocale (locale)])
|
||||
if ([lang isEqual: i18n] || [alt isEqualToString: i18n])
|
||||
{
|
||||
/* We set added_locale to YES to avoid so that we
|
||||
* won't do this C library locale lookup again
|
||||
|
|
|
@ -864,6 +864,7 @@ NSLog(@"RELEASING TRICKY EXTRA RETAIN in %@ now: %d", self, internal->externalRe
|
|||
Class theSubclass = [NSXMLNode class];
|
||||
void *node = NULL;
|
||||
|
||||
GSOnceMLog(@"WARNING the XML DOM classes are not currently implemented to a usable level, but we expect to have an implementation based on libxml2 in place for the next release.");
|
||||
if (nil == (self = [super init]))
|
||||
{
|
||||
return nil;
|
||||
|
@ -879,6 +880,9 @@ NSLog(@"RELEASING TRICKY EXTRA RETAIN in %@ now: %d", self, internal->externalRe
|
|||
break;
|
||||
|
||||
case NSXMLInvalidKind:
|
||||
theSubclass = [NSXMLNode class];
|
||||
break;
|
||||
|
||||
case NSXMLElementKind:
|
||||
theSubclass = [NSXMLElement class];
|
||||
break;
|
||||
|
@ -907,7 +911,7 @@ NSLog(@"RELEASING TRICKY EXTRA RETAIN in %@ now: %d", self, internal->externalRe
|
|||
|
||||
default:
|
||||
kind = NSXMLInvalidKind;
|
||||
theSubclass = [NSXMLElement class];
|
||||
theSubclass = [NSXMLNode class];
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,47 +1,67 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "ObjectTesting.h"
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
[NSAutoreleasePool new];
|
||||
// Simple test JSON, used for all of the examples
|
||||
NSString *json = @"\
|
||||
{\
|
||||
\"Image\": {\
|
||||
\"Width\": 800,\
|
||||
\"Height\": 600,\
|
||||
\"Title\": \"View from 15th Floor\",\
|
||||
\"Thumbnail\": {\
|
||||
\"Url\": \"http://www.example.com/image/481989943\",\
|
||||
\"Height\": 125,\
|
||||
\"Width\": \"100\"\
|
||||
},\
|
||||
},\
|
||||
\"IDs\": [116, 943, 234, 38793],\
|
||||
\"escapeTest\": \"\\\"\\u0001\"\
|
||||
}";
|
||||
NSStringEncoding encs[] = {NSUTF8StringEncoding, NSUTF16LittleEndianStringEncoding, NSUTF16BigEndianStringEncoding, NSUTF32LittleEndianStringEncoding, NSUTF32BigEndianStringEncoding};
|
||||
id obj;
|
||||
int i;
|
||||
[NSAutoreleasePool new];
|
||||
// Simple test JSON, used for all of the examples
|
||||
|
||||
for (i=0 ; i<(sizeof(encs) / sizeof(NSStringEncoding)) ; i++)
|
||||
NSString *json = @"\
|
||||
{\
|
||||
\"Image\": {\
|
||||
\"Width\": 800,\
|
||||
\"Height\": 600,\
|
||||
\"Title\": \"View from 15th Floor\",\
|
||||
\"Thumbnail\": {\
|
||||
\"Url\": \"http://www.example.com/image/481989943\",\
|
||||
\"Height\": 125,\
|
||||
\"Width\": \"100\"\
|
||||
},\
|
||||
},\
|
||||
\"emptyString\":\"\",\"emptyArray\":[],\"emptyObject\":{},\
|
||||
\"IDs\": [116, 943, 234, 38793],\
|
||||
\"escapeTest\": \"\\\"\\u0001\"\
|
||||
}";
|
||||
NSStringEncoding encs[] = {\
|
||||
NSUTF8StringEncoding,\
|
||||
NSUTF16LittleEndianStringEncoding,\
|
||||
NSUTF16BigEndianStringEncoding,\
|
||||
NSUTF32LittleEndianStringEncoding,\
|
||||
NSUTF32BigEndianStringEncoding};
|
||||
NSInputStream *is;
|
||||
NSData *data;
|
||||
id obj;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (sizeof(encs) / sizeof(NSStringEncoding)); i++)
|
||||
{
|
||||
NSError *e;
|
||||
id tmp;
|
||||
|
||||
data = [json dataUsingEncoding: encs[i]];
|
||||
tmp = [NSJSONSerialization JSONObjectWithData: data options: 0 error: &e];
|
||||
if (i > 0)
|
||||
{
|
||||
NSData *data = [json dataUsingEncoding: encs[i]];
|
||||
NSError *e;
|
||||
id tmp = [NSJSONSerialization JSONObjectWithData: data options: 0 error: &e];
|
||||
if (i > 0)
|
||||
{
|
||||
PASS([tmp isEqual: obj], "Decoding in different encodings give the same result");
|
||||
}
|
||||
obj = tmp;
|
||||
PASS([tmp isEqual: obj],
|
||||
"Decoding in different encodings give the same result");
|
||||
}
|
||||
PASS([obj count] == 3, "Decoded dictionary had the right number of elements");
|
||||
PASS([NSJSONSerialization isValidJSONObject: obj], "Can serialise deserialised JSON");
|
||||
NSData *data = [NSJSONSerialization dataWithJSONObject: obj options: NSJSONWritingPrettyPrinted error: 0];
|
||||
PASS([obj isEqual: [NSJSONSerialization JSONObjectWithData: data options: 0 error: 0]], "Round trip worked with pretty printing");
|
||||
data = [NSJSONSerialization dataWithJSONObject: obj options: 0 error: 0];
|
||||
PASS([obj isEqual: [NSJSONSerialization JSONObjectWithData: data options: 0 error: 0]], "Round trip worked with ugly printing");
|
||||
PASS([obj isEqual: [NSJSONSerialization JSONObjectWithStream: [NSInputStream inputStreamWithData:data] options: 0 error: 0]], "Round trip worked through stream");
|
||||
return 0;
|
||||
obj = tmp;
|
||||
}
|
||||
|
||||
PASS([obj count] == 6,
|
||||
"Decoded dictionary had the right number of elements");
|
||||
PASS([NSJSONSerialization isValidJSONObject: obj],
|
||||
"Can serialise deserialised JSON");
|
||||
|
||||
data = [NSJSONSerialization dataWithJSONObject: obj
|
||||
options: NSJSONWritingPrettyPrinted error: 0];
|
||||
PASS_EQUAL([NSJSONSerialization JSONObjectWithData: data options: 0 error: 0],
|
||||
obj, "Round trip worked with pretty printing");
|
||||
data = [NSJSONSerialization dataWithJSONObject: obj options: 0 error: 0];
|
||||
PASS_EQUAL([NSJSONSerialization JSONObjectWithData: data options: 0 error: 0],
|
||||
obj, "Round trip worked with ugly printing");
|
||||
is = [NSInputStream inputStreamWithData: data];
|
||||
PASS_EQUAL([NSJSONSerialization JSONObjectWithStream: is options: 0 error: 0],
|
||||
obj, "Round trip worked through stream");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -217,9 +217,18 @@ int main(void)
|
|||
|
||||
/* Make sure that when a class without its own +initialise is first used,
|
||||
* the inherited +initialize is called instead.
|
||||
* This is a traditional feature of the Apple runtime, which was 'improved'
|
||||
* by the GNU runtime (which actually checks to see if +initialize is
|
||||
* implemented before trying to call it). Good software should not depend
|
||||
* on either behavior ... which means all good software should protext its
|
||||
* +initialize code so that being called multiple times is OK.
|
||||
* New GNU/GNUstep runtimes adopt the old Apple behavior purely for
|
||||
* consistency.
|
||||
*/
|
||||
[Init1 class];
|
||||
testHopeful = YES;
|
||||
PASS(2 == initCount, "inherited +initialize is called automatically");
|
||||
testHopeful = NO;
|
||||
|
||||
#if defined(SIGALRM)
|
||||
/* End in a signal if the concurrency test deadlocks.
|
||||
|
|
|
@ -59,55 +59,60 @@ BOOL test_initWithCString(void)
|
|||
/*
|
||||
Test encoding and decoding in various character encodings.
|
||||
*/
|
||||
BOOL test_encodings_helper(NSStringEncoding encoding,
|
||||
unsigned char *bytes, int bytes_length,
|
||||
unichar *characters, int characters_length)
|
||||
void
|
||||
test_encodings_helper(NSStringEncoding encoding,
|
||||
unsigned char *bytes, int bytes_length,
|
||||
unichar *characters, int characters_length)
|
||||
{
|
||||
BOOL ok = YES;
|
||||
NSData *encodedData = nil;
|
||||
NSString *decodedString = nil;
|
||||
NSData *referenceData = nil;
|
||||
NSString *referenceString = nil;
|
||||
NSStringEncoding *encodings;
|
||||
const char *enc;
|
||||
|
||||
NSData *referenceData = [[NSData alloc]
|
||||
initWithBytes: bytes
|
||||
length: bytes_length];
|
||||
NSString *referenceString = [[stringClass alloc]
|
||||
initWithCharacters: characters
|
||||
length: characters_length];
|
||||
|
||||
NSData *encodedData;
|
||||
NSString *decodedString;
|
||||
|
||||
|
||||
decodedString = [[stringClass alloc]
|
||||
initWithData: referenceData
|
||||
encoding: encoding];
|
||||
|
||||
if (![decodedString isEqual: referenceString])
|
||||
encodings = [NSString availableStringEncodings];
|
||||
if (0 != encodings)
|
||||
{
|
||||
printf("decoding data %s in encoding %i gave string %s\n",
|
||||
FORMAT_STRING(POBJECT(referenceData)), encoding,
|
||||
FORMAT_STRING([decodedString lossyCString]));
|
||||
ok = NO;
|
||||
while (*encodings != 0 && *encodings != encoding)
|
||||
{
|
||||
encodings++;
|
||||
}
|
||||
}
|
||||
PASS(encodings != 0 && encoding == *encodings,
|
||||
"String encoding %d is supported", encoding);
|
||||
if (NO == testPassed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
enc = [[NSString localizedNameOfStringEncoding: encoding] UTF8String];
|
||||
|
||||
referenceString = [[stringClass alloc] initWithCharacters: characters
|
||||
length: characters_length];
|
||||
referenceData = [[NSData alloc] initWithBytes: bytes
|
||||
length: bytes_length];
|
||||
|
||||
PASS(nil != (decodedString = [[stringClass alloc]
|
||||
initWithData: referenceData encoding: encoding]),
|
||||
"can instantiate string from %s", enc);
|
||||
if (YES == testPassed)
|
||||
{
|
||||
PASS_EQUAL(decodedString, referenceString,
|
||||
"new %s string matches reference", enc);
|
||||
}
|
||||
|
||||
encodedData = [referenceString dataUsingEncoding: encoding];
|
||||
if (![encodedData isEqual: referenceData])
|
||||
{
|
||||
printf("encoding string %s in encoding %i gave data %s\n",
|
||||
FORMAT_STRING([referenceString lossyCString]), encoding,
|
||||
FORMAT_STRING(POBJECT(encodedData)));
|
||||
ok = NO;
|
||||
}
|
||||
PASS_EQUAL((encodedData = [referenceString dataUsingEncoding: encoding]),
|
||||
referenceData, "data using encoding %s matches reference data", enc);
|
||||
|
||||
DESTROY(decodedString);
|
||||
DESTROY(referenceData);
|
||||
DESTROY(referenceString);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
BOOL test_encoding(void)
|
||||
void
|
||||
test_encoding(void)
|
||||
{
|
||||
BOOL ok = YES;
|
||||
|
||||
{
|
||||
NSData *d = [[NSData alloc] initWithBytes: "foo" length: 3];
|
||||
NSString *s = [[stringClass alloc] initWithData: d encoding: 0];
|
||||
|
@ -117,40 +122,39 @@ BOOL test_encoding(void)
|
|||
DESTROY(d);
|
||||
}
|
||||
|
||||
test_encodings_helper(NSASCIIStringEncoding,
|
||||
(unsigned char[]){65, 66, 67}, 3,
|
||||
(unichar[]){65, 66, 67}, 3);
|
||||
|
||||
ok = ok && test_encodings_helper(NSASCIIStringEncoding,
|
||||
(unsigned char[]){65, 66, 67}, 3,
|
||||
(unichar[]){65, 66, 67}, 3);
|
||||
test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){65, 66, 67}, 3,
|
||||
(unichar[]){65, 66, 67}, 3);
|
||||
|
||||
ok = ok && test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){65, 66, 67}, 3,
|
||||
(unichar[]){65, 66, 67}, 3);
|
||||
|
||||
ok = ok && test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){0xc3, 0xa5, 0xc3, 0xa4, 0xc3, 0xb6,
|
||||
0xd7, 0xa9, 0xd7, 0x9c, 0xd7, 0x95, 0xd7, 0x9d}, 14,
|
||||
(unichar[]){0xe5, 0xe4, 0xf6, 0x5e9, 0x5dc, 0x5d5, 0x5dd}, 7);
|
||||
test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){0xc3, 0xa5, 0xc3, 0xa4, 0xc3, 0xb6,
|
||||
0xd7, 0xa9, 0xd7, 0x9c, 0xd7, 0x95, 0xd7, 0x9d}, 14,
|
||||
(unichar[]){0xe5, 0xe4, 0xf6, 0x5e9, 0x5dc, 0x5d5, 0x5dd}, 7);
|
||||
|
||||
/* Codepoint U+2F801 CJK Compatiblity Ideograph */
|
||||
ok = ok && test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){0xf0, 0xaf, 0xa0, 0x81}, 4,
|
||||
(unichar[]){0xd87e, 0xdc01}, 2);
|
||||
test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){0xf0, 0xaf, 0xa0, 0x81}, 4,
|
||||
(unichar[]){0xd87e, 0xdc01}, 2);
|
||||
|
||||
#if defined(GNUSTEP_BASE_LIBRARY)
|
||||
ok = ok && test_encodings_helper(NSISOHebrewStringEncoding,
|
||||
(unsigned char[]){0xf9, 0xec, 0xe5, 0xed}, 4,
|
||||
(unichar[]){0x5e9, 0x5dc, 0x5d5, 0x5dd}, 4);
|
||||
test_encodings_helper(NSISOHebrewStringEncoding,
|
||||
(unsigned char[]){0xf9, 0xec, 0xe5, 0xed}, 4,
|
||||
(unichar[]){0x5e9, 0x5dc, 0x5d5, 0x5dd}, 4);
|
||||
#endif
|
||||
|
||||
ok = ok && test_encodings_helper(NSISOLatin1StringEncoding,
|
||||
(unsigned char[]){116, 101, 115, 116, 45, 229, 228, 246}, 8,
|
||||
(unichar[]){116, 101, 115, 116, 45, 229, 228, 246}, 8);
|
||||
test_encodings_helper(NSISOLatin1StringEncoding,
|
||||
(unsigned char[]){116, 101, 115, 116, 45, 229, 228, 246}, 8,
|
||||
(unichar[]){116, 101, 115, 116, 45, 229, 228, 246}, 8);
|
||||
|
||||
ok = ok && test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){0xe0, 0xb8, 0xa0, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0xa9,
|
||||
0xe0, 0xb8, 0xb2, 0xe0, 0xb9, 0x84, 0xe0, 0xb8, 0x97,
|
||||
0xe0, 0xb8, 0xa2}, 21,
|
||||
(unichar[]){0xe20, 0xe32, 0xe29, 0xe32, 0xe44, 0xe17, 0xe22}, 7);
|
||||
test_encodings_helper(NSUTF8StringEncoding,
|
||||
(unsigned char[]){0xe0, 0xb8, 0xa0, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0xa9,
|
||||
0xe0, 0xb8, 0xb2, 0xe0, 0xb9, 0x84, 0xe0, 0xb8, 0x97,
|
||||
0xe0, 0xb8, 0xa2}, 21,
|
||||
(unichar[]){0xe20, 0xe32, 0xe29, 0xe32, 0xe44, 0xe17, 0xe22}, 7);
|
||||
|
||||
/*
|
||||
; (test-data-string
|
||||
|
@ -161,12 +165,10 @@ BOOL test_encoding(void)
|
|||
*/
|
||||
|
||||
#if defined(GNUSTEP_BASE_LIBRARY)
|
||||
ok = ok && test_encodings_helper(NSBIG5StringEncoding,
|
||||
test_encodings_helper(NSBIG5StringEncoding,
|
||||
(unsigned char[]){0x41, 0x42, 0x43, 0x20, 0xa7, 0x41, 0xa6, 0x6e, 0x21}, 9,
|
||||
(unichar[]){0x41, 0x42, 0x43, 0x20, 0x4f60, 0x597d, 0x21}, 7);
|
||||
#endif
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -306,7 +308,7 @@ void TestNSStringClass(Class aStringClass)
|
|||
stringClass = aStringClass;
|
||||
|
||||
PASS(test_initWithCString(), "-initWithCString: works");
|
||||
PASS(test_encoding(), "character set encoding/decoding works");
|
||||
test_encoding();
|
||||
PASS(test_getCString_maxLength_range_remainingRange(), "-getCString:maxLength:range:remainingRange: works");
|
||||
|
||||
test_return_self_optimizations();
|
||||
|
|
|
@ -45,6 +45,13 @@ int main()
|
|||
"Handle multiple values for an HTTP header field");
|
||||
[mutable release];
|
||||
|
||||
mutable = [NSMutableURLRequest new];
|
||||
PASS(mutable != nil && [mutable isKindOfClass:[NSMutableURLRequest class]],
|
||||
"NSURLRequest +new returns a mutable request");
|
||||
|
||||
PASS_EQUAL([mutable URL], nil, "nil URL from empty request");
|
||||
PASS_EQUAL([mutable HTTPMethod], @"GET", "GET method from empty request");
|
||||
|
||||
[arp release]; arp = nil;
|
||||
return 0;
|
||||
}
|
||||
|
|
4
Version
4
Version
|
@ -7,9 +7,9 @@ GCC_VERSION=4.0.0
|
|||
# The version number of this release.
|
||||
MAJOR_VERSION=1
|
||||
MINOR_VERSION=23
|
||||
SUBMINOR_VERSION=1
|
||||
SUBMINOR_VERSION=0
|
||||
# numeric value should match above
|
||||
VERSION_NUMBER=123.1
|
||||
VERSION_NUMBER=123.0
|
||||
GNUSTEP_BASE_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION}
|
||||
VERSION=${GNUSTEP_BASE_VERSION}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ ifeq ($(BASE_MAKE_LOADED),)
|
|||
OBJC2RUNTIME=@OBJC2RUNTIME@
|
||||
ifeq ($(OBJC2RUNTIME),0)
|
||||
AUXILIARY_OBJCFLAGS += -I$(GNUSTEP_HEADERS)/ObjectiveC2
|
||||
AUXILIARY_CFLAGS += -I$(GNUSTEP_HEADERS)/ObjectiveC2
|
||||
endif
|
||||
|
||||
# For literal string handling, base requires the compiler to store the
|
||||
|
|
|
@ -71,8 +71,6 @@ main()
|
|||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
tls_config_micro_version=`$TLS_CONFIG $tls_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
# Strip '-L/usr/lib' off since this is always in the link path.
|
||||
TLS_LIBS=`echo $TLS_LIBS | sed -e 's|-L/usr/lib||'`
|
||||
|
||||
if test "x$enable_tlstest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
|
|
|
@ -108,8 +108,6 @@ main()
|
|||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
# Strip '-L/usr/lib' off since this is always in the link path.
|
||||
XML_LIBS=`echo $XML_LIBS | sed -e 's|-L/usr/lib||'`
|
||||
|
||||
if test "x$enable_xmltest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
|
|
105
configure
vendored
105
configure
vendored
|
@ -22392,6 +22392,107 @@ $as_echo "libffi" >&6; }
|
|||
{ $as_echo "$as_me:$LINENO: WARNING: ffi may be broken on this system ... try enabling ffcall" >&5
|
||||
$as_echo "$as_me: WARNING: ffi may be broken on this system ... try enabling ffcall" >&2;}
|
||||
fi
|
||||
|
||||
for ac_func in ffi_prep_closure_loc
|
||||
do
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
$as_echo_n "checking for $ac_func... " >&6; }
|
||||
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define $ac_func innocuous_$ac_func
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef $ac_func
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char $ac_func ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined __stub_$ac_func || defined __stub___$ac_func
|
||||
choke me
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return $ac_func ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo") >&5
|
||||
(eval "$ac_link") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext && {
|
||||
test "$cross_compiling" = yes ||
|
||||
$as_test_x conftest$ac_exeext
|
||||
}; then
|
||||
eval "$as_ac_var=yes"
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
eval "$as_ac_var=no"
|
||||
fi
|
||||
|
||||
rm -rf conftest.dSYM
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
ac_res=`eval 'as_val=${'$as_ac_var'}
|
||||
$as_echo "$as_val"'`
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
as_val=`eval 'as_val=${'$as_ac_var'}
|
||||
$as_echo "$as_val"'`
|
||||
if test "x$as_val" = x""yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:$LINENO: error: The ffi library (libffi) does not appear to be working. Perhaps it's missing or you need a more recent version. Version 3.0.9 or later should work, and you can find a link to it n the list of packages for download at http://www.gnustep.org/resources/sources.html" >&5
|
||||
$as_echo "$as_me: error: The ffi library (libffi) does not appear to be working. Perhaps it's missing or you need a more recent version. Version 3.0.9 or later should work, and you can find a link to it n the list of packages for download at http://www.gnustep.org/resources/sources.html" >&2;}
|
||||
|
@ -23005,8 +23106,6 @@ fi
|
|||
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
|
||||
xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \
|
||||
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
|
||||
# Strip '-L/usr/lib' off since this is always in the link path.
|
||||
XML_LIBS=`echo $XML_LIBS | sed -e 's|-L/usr/lib||'`
|
||||
|
||||
if test "x$enable_xmltest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
|
@ -23781,8 +23880,6 @@ fi
|
|||
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
|
||||
tls_config_micro_version=`$TLS_CONFIG $tls_config_args --version | \
|
||||
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
|
||||
# Strip '-L/usr/lib' off since this is always in the link path.
|
||||
TLS_LIBS=`echo $TLS_LIBS | sed -e 's|-L/usr/lib||'`
|
||||
|
||||
if test "x$enable_tlstest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
|
|
|
@ -2631,6 +2631,7 @@ if test $enable_libffi = yes; then
|
|||
if test $do_broken_libffi = yes; then
|
||||
AC_MSG_WARN([ffi may be broken on this system ... try enabling ffcall])
|
||||
fi
|
||||
AC_CHECK_FUNCS(ffi_prep_closure_loc)
|
||||
else
|
||||
AC_MSG_ERROR([The ffi library (libffi) does not appear to be working. Perhaps it's missing or you need a more recent version. Version 3.0.9 or later should work, and you can find a link to it n the list of packages for download at http://www.gnustep.org/resources/sources.html])
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue