diff --git a/ChangeLog b/ChangeLog index 37bed6453..f05b185d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,65 @@ +2013-07-01 Richard Frith-Macdonald + + * configure.ac: Add test for another libicu header + * configure: regenerate + * Headers/GNUstepBase/config.h.in: regenerate + * Source/NSString.m: Add decompose/precompose methods derived from + change in testplant branch. + * Headers/GNUstepBase/GSVersionMacros.h: OSX compatibility tweak ... + handle OSX style 4 digit versionn constants. + * Headers/Foundation/NSArray.h: + * Headers/Foundation/NSAutoreleasePool.h: + * Headers/Foundation/NSBundle.h: + * Headers/Foundation/NSCoder.h: + * Headers/Foundation/NSComparisonPredicate.h: + * Headers/Foundation/NSCompoundPredicate.h: + * Headers/Foundation/NSConnection.h: + * Headers/Foundation/NSData.h: + * Headers/Foundation/NSDate.h: + * Headers/Foundation/NSDictionary.h: + * Headers/Foundation/NSError.h: + * Headers/Foundation/NSException.h: + * Headers/Foundation/NSExpression.h: + * Headers/Foundation/NSHTTPCookie.h: + * Headers/Foundation/NSHTTPCookieStorage.h: + * Headers/Foundation/NSIndexPath.h: + * Headers/Foundation/NSIndexSet.h: + * Headers/Foundation/NSKeyValueObserving.h: + * Headers/Foundation/NSLock.h: + * Headers/Foundation/NSNetServices.h: + * Headers/Foundation/NSObjCRuntime.h: + * Headers/Foundation/NSOperation.h: + * Headers/Foundation/NSPathUtilities.h: + * Headers/Foundation/NSPointerArray.h: + * Headers/Foundation/NSPointerFunctions.h: + * Headers/Foundation/NSPredicate.h: + * Headers/Foundation/NSProcessInfo.h: + * Headers/Foundation/NSPropertyList.h: + * Headers/Foundation/NSScanner.h: + * Headers/Foundation/NSSet.h: + * Headers/Foundation/NSSortDescriptor.h: + * Headers/Foundation/NSSpellServer.h: + * Headers/Foundation/NSStream.h: + * Headers/Foundation/NSString.h: + * Headers/Foundation/NSTimeZone.h: + * Headers/Foundation/NSTimer.h: + * Headers/Foundation/NSURL.h: + * Headers/Foundation/NSURLAuthenticationChallenge.h: + * Headers/Foundation/NSURLCache.h: + * Headers/Foundation/NSURLConnection.h: + * Headers/Foundation/NSURLCredential.h: + * Headers/Foundation/NSURLCredentialStorage.h: + * Headers/Foundation/NSURLDownload.h: + * Headers/Foundation/NSURLError.h: + * Headers/Foundation/NSURLProtectionSpace.h: + * Headers/Foundation/NSURLProtocol.h: + * Headers/Foundation/NSURLRequest.h: + * Headers/Foundation/NSURLResponse.h: + * Headers/Foundation/NSValueTransformer.h: + * Headers/Foundation/NSXMLElement.h: + * Headers/Foundation/NSXMLParser.h: + Replace numeric version constants with OSX compatibility macros. + 2013-06-27 Richard Frith-Macdonald * Source/NSConcreteMapTable.m: attempt to fix double retain bug diff --git a/Headers/Foundation/NSArray.h b/Headers/Foundation/NSArray.h index 22575ac1d..b65366178 100644 --- a/Headers/Foundation/NSArray.h +++ b/Headers/Foundation/NSArray.h @@ -39,7 +39,7 @@ extern "C" { @class NSURL; @class NSIndexSet; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) enum { NSBinarySearchingFirstEqual = (1UL << 8), /** Specifies that the binary @@ -112,7 +112,7 @@ typedef NSUInteger NSBinarySearchingOptions; */ - (id) objectAtIndex: (NSUInteger)index; -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) - (NSArray *) objectsAtIndexes: (NSIndexSet *)indexes; #endif @@ -154,7 +154,7 @@ typedef NSUInteger NSBinarySearchingOptions; - (id) valueForKey: (NSString*)key; #endif -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) DEFINE_BLOCK_TYPE(GSEnumeratorBlock, void, id, NSUInteger, BOOL*); DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*); @@ -314,7 +314,7 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*); * The object is retained by the array. */ - (void) insertObject: (id)anObject atIndex: (NSUInteger)index; -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) - (void) insertObjects: (NSArray *)objects atIndexes: (NSIndexSet *)indexes; #endif @@ -335,7 +335,7 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*); - (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject; -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) - (void) replaceObjectsAtIndexes: (NSIndexSet *)indexes withObjects: (NSArray *)objects; #endif @@ -365,7 +365,7 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, id, NSUInteger, BOOL*); - (void) sortUsingSelector: (SEL)comparator; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** * Sorts the array using the specified comparator block. */ diff --git a/Headers/Foundation/NSAutoreleasePool.h b/Headers/Foundation/NSAutoreleasePool.h index 5a8784a92..4c78b70fa 100644 --- a/Headers/Foundation/NSAutoreleasePool.h +++ b/Headers/Foundation/NSAutoreleasePool.h @@ -231,7 +231,7 @@ NS_AUTOMATED_REFCOUNT_UNAVAILABLE */ - (id) autorelease; -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) /** * Intended to trigger a garbage collection run (if needed) when called in * a garbage collected environment.
diff --git a/Headers/Foundation/NSBundle.h b/Headers/Foundation/NSBundle.h index dea83fe56..3d1a2b986 100644 --- a/Headers/Foundation/NSBundle.h +++ b/Headers/Foundation/NSBundle.h @@ -42,7 +42,7 @@ extern "C" { @class NSMutableArray; @class NSMutableDictionary; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) enum { NSBundleExecutableArchitectureI386 = 0x00000007, NSBundleExecutableArchitecturePPC = 0x00000012, @@ -184,7 +184,7 @@ GS_EXPORT NSString* const NSLoadedClasses; * not readable, return nil. If you want the main bundle of an * application or a tool, it's better if you use +mainBundle. */ + (NSBundle*) bundleWithPath: (NSString*)path; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) + (NSBundle*) bundleWithURL: (NSURL*)url; #endif @@ -207,7 +207,7 @@ GS_EXPORT NSString* const NSLoadedClasses; inDirectory: (NSString*)bundlePath withVersion: (int)version; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) + (NSURL*) URLForResource: (NSString*)name withExtension: (NSString*)extension subdirectory: (NSString*)subpath @@ -236,7 +236,7 @@ GS_EXPORT NSString* const NSLoadedClasses; */ - (id) initWithPath: (NSString*)path; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) - (id) initWithURL: (NSURL*)url; #endif @@ -313,7 +313,7 @@ GS_EXPORT NSString* const NSLoadedClasses; - (NSString*) pathForResource: (NSString*)name ofType: (NSString*)extension; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) - (NSURL*) URLForResource: (NSString*)name withExtension: (NSString*)extension; - (NSURL*) URLForResource: (NSString*)name @@ -369,7 +369,7 @@ GS_EXPORT NSString* const NSLoadedClasses; + (NSArray *) preferredLocalizationsFromArray: (NSArray *)localizationsArray forPreferences: (NSArray *)preferencesArray; -#if OS_API_VERSION(100200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) /** * Returns a boolean indicating whether code for the bundle has been loaded. */ @@ -400,7 +400,7 @@ GS_EXPORT NSString* const NSLoadedClasses; /** Returns the info property list associated with the bundle. */ - (NSDictionary*) infoDictionary; -#if OS_API_VERSION(100200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) /** Returns a localized info property list based on the preferred * localization or the most appropriate localization if the preferred * one cannot be found. @@ -432,7 +432,7 @@ GS_EXPORT NSString* const NSLoadedClasses; */ - (BOOL) load; -#if OS_API_VERSION(100200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) /** * Not implemented */ - (BOOL) unload; @@ -442,7 +442,7 @@ GS_EXPORT NSString* const NSLoadedClasses; - (NSString *) executablePath; #endif -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Not implemented */ - (NSArray *) executableArchitectures; /** Not implemented */ diff --git a/Headers/Foundation/NSCoder.h b/Headers/Foundation/NSCoder.h index f14518efe..05102e128 100644 --- a/Headers/Foundation/NSCoder.h +++ b/Headers/Foundation/NSCoder.h @@ -353,7 +353,7 @@ extern "C" { - (void) encodeObject: (id)anObject forKey: (NSString*)aKey; #endif -#if OS_API_VERSION(100500, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) /** * Encodes an NSInteger and associates the encoded value with key. */ diff --git a/Headers/Foundation/NSComparisonPredicate.h b/Headers/Foundation/NSComparisonPredicate.h index 737abe5e4..525a222f7 100644 --- a/Headers/Foundation/NSComparisonPredicate.h +++ b/Headers/Foundation/NSComparisonPredicate.h @@ -26,7 +26,7 @@ #define __NSComparisonPredicate_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) #import #import @@ -62,7 +62,7 @@ typedef enum _NSPredicateOperatorType NSEndsWithPredicateOperatorType, NSInPredicateOperatorType, NSCustomSelectorPredicateOperatorType -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) , NSContainsPredicateOperatorType = 99, NSBetweenPredicateOperatorType diff --git a/Headers/Foundation/NSCompoundPredicate.h b/Headers/Foundation/NSCompoundPredicate.h index b750b7453..cdd2c1e86 100644 --- a/Headers/Foundation/NSCompoundPredicate.h +++ b/Headers/Foundation/NSCompoundPredicate.h @@ -26,7 +26,7 @@ #define __NSCompoundPredicate_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) #import diff --git a/Headers/Foundation/NSConnection.h b/Headers/Foundation/NSConnection.h index af3f74514..45264ff47 100644 --- a/Headers/Foundation/NSConnection.h +++ b/Headers/Foundation/NSConnection.h @@ -119,7 +119,7 @@ GS_NSConnection_IVARS; + (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*)n host: (NSString*)h usingNameServer: (NSPortNameServer*)s; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) + (id) serviceConnectionWithName: (NSString *)name rootObject: (id)root; + (id) serviceConnectionWithName: (NSString *)name diff --git a/Headers/Foundation/NSData.h b/Headers/Foundation/NSData.h index 627bb155f..1f7235abb 100644 --- a/Headers/Foundation/NSData.h +++ b/Headers/Foundation/NSData.h @@ -39,7 +39,7 @@ extern "C" { @class NSURL; #endif -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) enum { NSMappedRead = 1, NSUncachedRead = 2 @@ -141,7 +141,7 @@ enum { count: (unsigned int)numInts atIndex: (unsigned int)index; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** *

Writes a copy of the data encapsulated by the receiver to a file * at path. If the NSAtomicWrite option is set, this writes to a diff --git a/Headers/Foundation/NSDate.h b/Headers/Foundation/NSDate.h index 723ee4eb5..2172f1ba4 100644 --- a/Headers/Foundation/NSDate.h +++ b/Headers/Foundation/NSDate.h @@ -106,7 +106,7 @@ GS_EXPORT const NSTimeInterval NSTimeIntervalSince1970; - (BOOL) isEqualToDate: (NSDate*)other; - (NSDate*) laterDate: (NSDate*)otherDate; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) /** * Returns an autoreleased NSDate instance whose value is offset from * that of the receiver by the specified interval. diff --git a/Headers/Foundation/NSDictionary.h b/Headers/Foundation/NSDictionary.h index 8a00dd3da..2aab8f160 100644 --- a/Headers/Foundation/NSDictionary.h +++ b/Headers/Foundation/NSDictionary.h @@ -59,7 +59,7 @@ extern "C" { - (NSString*) descriptionWithLocale: (id)locale indent: (NSUInteger)level; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) DEFINE_BLOCK_TYPE(GSKeysAndObjectsEnumeratorBlock, void, id, id, BOOL*); - (void) enumerateKeysAndObjectsUsingBlock: (GSKeysAndObjectsEnumeratorBlock)aBlock; @@ -87,7 +87,7 @@ DEFINE_BLOCK_TYPE(GSKeysAndObjectsEnumeratorBlock, void, id, id, BOOL*); - (NSEnumerator*) keyEnumerator; // Primitive -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) DEFINE_BLOCK_TYPE(GSKeysAndObjectsPredicateBlock, BOOL, id, id, BOOL*); - (NSSet*) keysOfEntriesPassingTest: (GSKeysAndObjectsPredicateBlock)aPredicate; - (NSSet*) keysOfEntriesWithOptions: (NSEnumerationOptions)opts diff --git a/Headers/Foundation/NSError.h b/Headers/Foundation/NSError.h index 0216d1c8f..28258afde 100644 --- a/Headers/Foundation/NSError.h +++ b/Headers/Foundation/NSError.h @@ -30,7 +30,7 @@ #import -#if OS_API_VERSION(100300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) #if defined(__cplusplus) extern "C" { @@ -50,7 +50,7 @@ GS_EXPORT NSString* const NSLocalizedDescriptionKey; */ GS_EXPORT NSString* const NSUnderlyingErrorKey; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** * This key can be used to store the file path of a resource involved * in the error (eg unreadable file). @@ -98,7 +98,7 @@ GS_EXPORT NSString* const NSOSStatusErrorDomain; * Domain for system and system library errors. */ GS_EXPORT NSString* const NSPOSIXErrorDomain; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** * Domain for Foundation and AppKit (base and gui) errors. */ @@ -167,7 +167,7 @@ GS_EXPORT NSString* const NSCocoaErrorDomain; */ - (NSString *) localizedDescription; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** * Return a human readable explanation of the reason for the error * (if known). This should normally be a more discursive explanation diff --git a/Headers/Foundation/NSException.h b/Headers/Foundation/NSException.h index 937060370..d892ff1a7 100644 --- a/Headers/Foundation/NSException.h +++ b/Headers/Foundation/NSException.h @@ -136,7 +136,7 @@ extern "C" { format: (NSString*)format arguments: (va_list)argList; -#if OS_API_VERSION(100500,GS_API_LATEST) && GS_API_VERSION( 11501,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) && GS_API_VERSION( 11501,GS_API_LATEST) /** Returns an array of the call stack return addresses at the point when * the exception was raised. Re-raising the exception does not change * this value. @@ -144,7 +144,7 @@ extern "C" { - (NSArray*) callStackReturnAddresses; #endif -#if OS_API_VERSION(100600,GS_API_LATEST) && GS_API_VERSION( 11903,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) && GS_API_VERSION( 11903,GS_API_LATEST) /** * Returns an array of the symbolic names of the call stack return addresses. * Note that, on some platforms, symbols are only exported in diff --git a/Headers/Foundation/NSExpression.h b/Headers/Foundation/NSExpression.h index 34cdc5866..09f993c50 100644 --- a/Headers/Foundation/NSExpression.h +++ b/Headers/Foundation/NSExpression.h @@ -26,7 +26,7 @@ #define __NSExpression_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) #import diff --git a/Headers/Foundation/NSHTTPCookie.h b/Headers/Foundation/NSHTTPCookie.h index 31377e146..d4df9f1b3 100644 --- a/Headers/Foundation/NSHTTPCookie.h +++ b/Headers/Foundation/NSHTTPCookie.h @@ -26,7 +26,7 @@ #define __NSHTTPCookie_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSHTTPCookieStorage.h b/Headers/Foundation/NSHTTPCookieStorage.h index 9b8c7575d..77051e7d8 100644 --- a/Headers/Foundation/NSHTTPCookieStorage.h +++ b/Headers/Foundation/NSHTTPCookieStorage.h @@ -26,7 +26,7 @@ #define __NSHTTPCookieStorage_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSIndexPath.h b/Headers/Foundation/NSIndexPath.h index 1b22ab918..7460ccf6a 100644 --- a/Headers/Foundation/NSIndexPath.h +++ b/Headers/Foundation/NSIndexPath.h @@ -35,7 +35,7 @@ extern "C" { #endif -#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) /** * Instances of this class represent a series of indexes into a hierarchy diff --git a/Headers/Foundation/NSIndexSet.h b/Headers/Foundation/NSIndexSet.h index 51e7432ba..9ec5187a1 100644 --- a/Headers/Foundation/NSIndexSet.h +++ b/Headers/Foundation/NSIndexSet.h @@ -90,14 +90,14 @@ extern "C" { */ - (NSUInteger) count; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Not implemented * Returns the number of indexes set within the specified range. */ - (NSUInteger) countOfIndexesInRange: (NSRange)range; #endif -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) DEFINE_BLOCK_TYPE(GSIndexSetEnumerationBlock, void, NSUInteger, BOOL*); - (void)enumerateIndexesInRange: (NSRange)range options: (NSEnumerationOptions)opts diff --git a/Headers/Foundation/NSKeyValueObserving.h b/Headers/Foundation/NSKeyValueObserving.h index 53ce85488..fbc8539cf 100644 --- a/Headers/Foundation/NSKeyValueObserving.h +++ b/Headers/Foundation/NSKeyValueObserving.h @@ -26,7 +26,7 @@ #define __NSKeyValueObserving_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) #import #import @@ -42,7 +42,7 @@ extern "C" { enum { NSKeyValueObservingOptionNew = 1, NSKeyValueObservingOptionOld = 2 -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) , NSKeyValueObservingOptionInitial = 4, NSKeyValueObservingOptionPrior = 8 #endif @@ -69,7 +69,7 @@ GS_EXPORT NSString *const NSKeyValueChangeIndexesKey; GS_EXPORT NSString *const NSKeyValueChangeKindKey; GS_EXPORT NSString *const NSKeyValueChangeNewKey; GS_EXPORT NSString *const NSKeyValueChangeOldKey; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey; #endif @@ -180,7 +180,7 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey; valuesAtIndexes: (NSIndexSet*)indexes forKey: (NSString*)aKey; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** */ diff --git a/Headers/Foundation/NSLock.h b/Headers/Foundation/NSLock.h index 4c3cd0134..fa4ee21d7 100644 --- a/Headers/Foundation/NSLock.h +++ b/Headers/Foundation/NSLock.h @@ -98,7 +98,7 @@ extern "C" { */ - (void) unlock; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Return the name of the receiver or nil of none has been set. */ - (NSString*) name; @@ -236,7 +236,7 @@ extern "C" { */ - (void) unlock; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Return the name of the receiver or nil of none has been set. */ - (NSString*) name; @@ -286,7 +286,7 @@ extern "C" { */ - (void) unlock; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Return the name of the receiver or nil of none has been set. */ - (NSString*) name; diff --git a/Headers/Foundation/NSNetServices.h b/Headers/Foundation/NSNetServices.h index 5739be231..e3918282b 100644 --- a/Headers/Foundation/NSNetServices.h +++ b/Headers/Foundation/NSNetServices.h @@ -362,7 +362,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain; - (void) scheduleInRunLoop: (NSRunLoop *) aRunLoop forMode: (NSString *) mode; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) - (NSInteger) port; - (void) publishWithOptions: (NSNetServiceOptions)options; diff --git a/Headers/Foundation/NSObjCRuntime.h b/Headers/Foundation/NSObjCRuntime.h index a63f38cf6..ccd254ce6 100644 --- a/Headers/Foundation/NSObjCRuntime.h +++ b/Headers/Foundation/NSObjCRuntime.h @@ -117,7 +117,7 @@ typedef NSUInteger NSSortOptions; #import -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) GS_EXPORT NSString *NSStringFromProtocol(Protocol *aProtocol); GS_EXPORT Protocol *NSProtocolFromString(NSString *aProtocolName); #endif diff --git a/Headers/Foundation/NSOperation.h b/Headers/Foundation/NSOperation.h index ca47f0864..24e47fa4c 100644 --- a/Headers/Foundation/NSOperation.h +++ b/Headers/Foundation/NSOperation.h @@ -28,13 +28,13 @@ #define __NSOperation_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100500, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) #if defined(__cplusplus) extern "C" { #endif -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) #import DEFINE_BLOCK_TYPE_NO_ARGS(GSOperationCompletionBlock, void); #endif @@ -82,7 +82,7 @@ typedef NSInteger NSOperationQueuePriority; */ - (void) cancel; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** * Returns the block that will be executed after the operation finishes. */ @@ -147,7 +147,7 @@ typedef NSInteger NSOperationQueuePriority; */ - (void) removeDependency: (NSOperation *)op; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** * Sets the block that will be executed when the operation has finished. */ @@ -160,7 +160,7 @@ typedef NSInteger NSOperationQueuePriority; */ - (void) setQueuePriority: (NSOperationQueuePriority)priority; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** Sets the thread priority to be used while executing then -main method. * The priority change is implemented in the -start method, so if you are * replacing -start you are responsible for managing this.
@@ -184,7 +184,7 @@ typedef NSInteger NSOperationQueuePriority; */ - (void) start; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** Returns the thread priority to be used executing the -main method. * The default is 0.5 */ @@ -219,7 +219,7 @@ enum { @private id _internal; #endif } -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** If called from within the -main method of an operation which is * currently being executed by a queue, this returns the queue instance * in use. @@ -235,7 +235,7 @@ enum { */ - (void) addOperation: (NSOperation *)op; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** Adds multiple operations to the receiver and (optionally) waits for * all the operations in the queue to finish. */ @@ -257,7 +257,7 @@ enum { */ - (NSInteger) maxConcurrentOperationCount; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** Return the name of this operation queue. */ - (NSString*) name; @@ -278,7 +278,7 @@ enum { */ - (void) setMaxConcurrentOperationCount: (NSInteger)cnt; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) /** Sets the name for this operation queue. */ - (void) setName: (NSString*)s; diff --git a/Headers/Foundation/NSPathUtilities.h b/Headers/Foundation/NSPathUtilities.h index 103195a9a..825f49678 100644 --- a/Headers/Foundation/NSPathUtilities.h +++ b/Headers/Foundation/NSPathUtilities.h @@ -116,18 +116,18 @@ enum NSDeveloperDirectory, /** Developer */ NSUserDirectory, /** user home directories */ NSDocumentationDirectory, /** Documentation */ -#if OS_API_VERSION(100200, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST) NSDocumentDirectory, /** Documents */ #endif -#if OS_API_VERSION(100300, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST) NSCoreServicesDirectory, /** CoreServices */ #endif -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) NSDesktopDirectory = 12, /** location of users desktop */ NSCachesDirectory = 13, /** location of users cache files */ NSApplicationSupportDirectory = 14, /** location of app support files */ #endif -#if OS_API_VERSION(100500, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) NSDownloadsDirectory = 15, /** location of downloaded files */ #endif diff --git a/Headers/Foundation/NSPointerArray.h b/Headers/Foundation/NSPointerArray.h index 8d87bf65f..af5bca968 100644 --- a/Headers/Foundation/NSPointerArray.h +++ b/Headers/Foundation/NSPointerArray.h @@ -30,7 +30,7 @@ #import #import -#if OS_API_VERSION(100500, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) #if defined(__cplusplus) extern "C" { diff --git a/Headers/Foundation/NSPointerFunctions.h b/Headers/Foundation/NSPointerFunctions.h index 5ce2d1f08..dbbe64933 100644 --- a/Headers/Foundation/NSPointerFunctions.h +++ b/Headers/Foundation/NSPointerFunctions.h @@ -28,7 +28,7 @@ #import -#if OS_API_VERSION(100500, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) #if defined(__cplusplus) extern "C" { @@ -154,5 +154,5 @@ typedef NSUInteger NSPointerFunctionsOptions; } #endif -#endif /* OS_API_VERSION(100500, GS_API_LATEST) */ +#endif /* OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) */ #endif /* __NSPointerFunctions_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/Foundation/NSPredicate.h b/Headers/Foundation/NSPredicate.h index 7e94e0809..2c4527ec8 100644 --- a/Headers/Foundation/NSPredicate.h +++ b/Headers/Foundation/NSPredicate.h @@ -26,7 +26,7 @@ #define __NSPredicate_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100400, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST) #import #import diff --git a/Headers/Foundation/NSProcessInfo.h b/Headers/Foundation/NSProcessInfo.h index 7e44c4a4e..fd20a9747 100644 --- a/Headers/Foundation/NSProcessInfo.h +++ b/Headers/Foundation/NSProcessInfo.h @@ -166,7 +166,7 @@ enum { * Returns a human readable version string for the current operating system * version. */ -#if OS_API_VERSION(100200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) - (NSString *) operatingSystemVersionString; #endif @@ -189,7 +189,7 @@ enum { */ - (void) setProcessName: (NSString*)newName; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Not implemented */ - (NSUInteger) processorCount; /** Not implemented */ diff --git a/Headers/Foundation/NSPropertyList.h b/Headers/Foundation/NSPropertyList.h index 24413561e..83bcb9f99 100644 --- a/Headers/Foundation/NSPropertyList.h +++ b/Headers/Foundation/NSPropertyList.h @@ -65,7 +65,7 @@ enum { NSPropertyListGNUstepBinaryFormat }; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) typedef NSUInteger NSPropertyListWriteOptions; typedef NSUInteger NSPropertyListReadOptions; @class NSError; @@ -261,7 +261,7 @@ typedef NSUInteger NSPropertyListFormat; format: (NSPropertyListFormat*)aFormat errorDescription: (NSString**)anErrorString; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) + (NSData *) dataWithPropertyList: (id)aPropertyList format: (NSPropertyListFormat)aFormat options: (NSPropertyListWriteOptions)anOption diff --git a/Headers/Foundation/NSScanner.h b/Headers/Foundation/NSScanner.h index d64290084..a3b61ddd5 100644 --- a/Headers/Foundation/NSScanner.h +++ b/Headers/Foundation/NSScanner.h @@ -110,7 +110,7 @@ extern "C" { #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) - (BOOL) scanDecimal: (NSDecimal*)value; #endif -#if OS_API_VERSION(100500, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) /** Not implemented */ - (BOOL) scanHexDouble: (double *)result; /** Not implemented */ diff --git a/Headers/Foundation/NSSet.h b/Headers/Foundation/NSSet.h index 51ba07e3e..12844aabc 100644 --- a/Headers/Foundation/NSSet.h +++ b/Headers/Foundation/NSSet.h @@ -80,7 +80,7 @@ extern "C" { - (id) member: (id)anObject; - (NSEnumerator*) objectEnumerator; -#if OS_API_VERSION(100600, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) DEFINE_BLOCK_TYPE(GSSetEnumeratorBlock, void, id, BOOL*); DEFINE_BLOCK_TYPE(GSSetFilterBlock, BOOL, id, BOOL*); @@ -113,7 +113,7 @@ DEFINE_BLOCK_TYPE(GSSetFilterBlock, BOOL, id, BOOL*); #endif -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) - (NSSet *) setByAddingObject: (id)anObject; - (NSSet *) setByAddingObjectsFromSet: (NSSet *)other; - (NSSet *) setByAddingObjectsFromArray: (NSArray *)other; diff --git a/Headers/Foundation/NSSortDescriptor.h b/Headers/Foundation/NSSortDescriptor.h index fffd61225..bb98c1358 100644 --- a/Headers/Foundation/NSSortDescriptor.h +++ b/Headers/Foundation/NSSortDescriptor.h @@ -26,7 +26,7 @@ #define __NSSortDescriptor_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) #import #import diff --git a/Headers/Foundation/NSSpellServer.h b/Headers/Foundation/NSSpellServer.h index 3568a8679..302c56343 100644 --- a/Headers/Foundation/NSSpellServer.h +++ b/Headers/Foundation/NSSpellServer.h @@ -47,7 +47,7 @@ extern "C" { @class NSMutableArray; @class NSMutableDictionary; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) GS_EXPORT NSString *const NSGrammarCorrections; GS_EXPORT NSString *const NSGrammarRange; GS_EXPORT NSString *const NSGrammarUserDescription; @@ -143,7 +143,7 @@ findMisspelledWordInString: (NSString *)stringToCheck didForgetWord: (NSString *)word inLanguage: (NSString *)language; -#if OS_API_VERSION(100300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) /** Not implemented */ - (NSArray *) spellServer: (NSSpellServer *)sender suggestCompletionsForPartialWordRange: (NSRange)range @@ -151,7 +151,7 @@ findMisspelledWordInString: (NSString *)stringToCheck language: (NSString *)language; #endif -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** Not implemented */ - (NSRange) spellServer: (NSSpellServer *)sender checkGrammarInString: (NSString *)stringToCheck diff --git a/Headers/Foundation/NSStream.h b/Headers/Foundation/NSStream.h index 0b49413c4..7ef1e249d 100644 --- a/Headers/Foundation/NSStream.h +++ b/Headers/Foundation/NSStream.h @@ -25,7 +25,7 @@ #define __NSStream_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSString.h b/Headers/Foundation/NSString.h index 5097d4e61..42c81713e 100644 --- a/Headers/Foundation/NSString.h +++ b/Headers/Foundation/NSString.h @@ -81,7 +81,7 @@ extern "C" { */ typedef uint16_t unichar; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) #define NSMaximumStringLength (INT_MAX-1) #endif @@ -104,13 +104,13 @@ enum NSBackwardsSearch = 4, NSAnchoredSearch = 8, NSNumericSearch = 64 /* MacOS-X 10.2 */ -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) , NSDiacriticInsensitiveSearch = 128, NSWidthInsensitiveSearch = 256, NSForcedOrderingSearch = 512 #endif -#if OS_API_VERSION(100700,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST) , /** * Treats the search string as a regular expression. This option may be @@ -196,7 +196,7 @@ typedef enum _NSStringEncoding NSBIG5StringEncoding, // Traditional chinese NSKoreanEUCStringEncoding // Korean -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) , NSUTF16BigEndianStringEncoding = 0x90000100, NSUTF16LittleEndianStringEncoding = 0x94000100, @@ -210,7 +210,7 @@ enum { NSOpenStepUnicodeReservedBase = 0xF400 }; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) enum { NSStringEncodingConversionAllowLossy = 1, NSStringEncodingConversionExternalRepresentation = 2 @@ -267,7 +267,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; + (id) string; + (id) stringWithCharacters: (const unichar*)chars length: (NSUInteger)length; -#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) + (id) stringWithCString: (const char*)byteString encoding: (NSStringEncoding)encoding; #endif @@ -279,7 +279,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; // Initializing Newly Allocated Strings - (id) init; -#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) - (id) initWithBytes: (const void*)bytes length: (NSUInteger)length encoding: (NSStringEncoding)encoding; @@ -288,7 +288,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; encoding: (NSStringEncoding)encoding freeWhenDone: (BOOL)flag; #endif -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) + (id) stringWithContentsOfFile: (NSString*)path usedEncoding: (NSStringEncoding*)enc error: (NSError**)error; @@ -322,7 +322,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; encoding: (NSStringEncoding)enc error: (NSError**)error; #endif -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) - (NSString*)stringByReplacingOccurrencesOfString: (NSString*)replace withString: (NSString*)by options: (NSStringCompareOptions)opts @@ -386,8 +386,26 @@ typedef NSUInteger NSStringEncodingConversionOptions; // Determining Composed Character Sequences - (NSRange) rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)anIndex; +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) +/** Returns a copy of the receiver normalised using the KD form. + */ +- (NSString *) decomposedStringWithCompatibilityMapping; + +/** Returns a copy of the receiver normalised using the D form. + */ +- (NSString *) decomposedStringWithCanonicalMapping; + +/** Returns a copy of the receiver normalised using the KC form. + */ +- (NSString *) precomposedStringWithCompatibilityMapping; + +/** Returns a copy of the receiver normalised using the C form. + */ +- (NSString *) precomposedStringWithCanonicalMapping; +#endif + // Converting String Contents into a Property List -- (id)propertyList; +- (id) propertyList; - (NSDictionary*) propertyListFromStringsFileFormat; // Identifying and Comparing Strings @@ -416,7 +434,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; - (const char*) cString; #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) -#if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) - (const char*) cStringUsingEncoding: (NSStringEncoding)encoding; - (BOOL) getCString: (char*)buffer maxLength: (NSUInteger)maxLength @@ -765,7 +783,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; - (const char *)UTF8String; #endif -#if OS_API_VERSION(100300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) /** Not implemented */ - (void) getParagraphStart: (NSUInteger *)startIndex end: (NSUInteger *)parEndIndex @@ -775,7 +793,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; - (NSRange) paragraphRangeForRange: (NSRange)range; #endif -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** * Returns YES when scanning the receiver's text from left to right * finds an initial digit in the range 1-9 or a letter in the set diff --git a/Headers/Foundation/NSTimeZone.h b/Headers/Foundation/NSTimeZone.h index 23c7cf767..0cdef62f9 100644 --- a/Headers/Foundation/NSTimeZone.h +++ b/Headers/Foundation/NSTimeZone.h @@ -35,7 +35,7 @@ extern "C" { @class NSLocale; @class NSString; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) enum { NSTimeZoneNameStyleStandard, NSTimeZoneNameStyleShortStandard, @@ -87,7 +87,7 @@ GS_EXPORT NSString * const NSSystemTimeZoneDidChangeNotification; - (NSInteger) secondsFromGMTForDate: (NSDate*)aDate; #endif -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) - (NSTimeInterval) daylightSavingTimeOffsetForDate: (NSDate *)aDate; /** Not implemented */ - (NSDate *) nextDaylightSavingTimeTransitionAfterDate: (NSDate *)aDate; diff --git a/Headers/Foundation/NSTimer.h b/Headers/Foundation/NSTimer.h index aa02050b1..1ee7f6815 100644 --- a/Headers/Foundation/NSTimer.h +++ b/Headers/Foundation/NSTimer.h @@ -92,7 +92,7 @@ extern "C" { - (NSTimeInterval) timeInterval; #endif -#if OS_API_VERSION(100200, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST) - (id) initWithFireDate: (NSDate*)fd interval: (NSTimeInterval)ti target: (id)object diff --git a/Headers/Foundation/NSURL.h b/Headers/Foundation/NSURL.h index 9c366b3ab..4525b45f6 100644 --- a/Headers/Foundation/NSURL.h +++ b/Headers/Foundation/NSURL.h @@ -70,7 +70,7 @@ GS_EXPORT NSString* const NSURLFileScheme; */ + (id) fileURLWithPath: (NSString*)aPath; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) /** Creates a file URL using a path built from components. */ + (NSURL*) fileURLWithPathComponents: (NSArray*)components; @@ -104,7 +104,7 @@ GS_EXPORT NSString* const NSURLFileScheme; */ - (id) initFileURLWithPath: (NSString*)aPath; -#if OS_API_VERSION(100500,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) /** * Initialise as a file URL with the specified path (which must * be a valid path on the local filesystem).
@@ -166,7 +166,7 @@ GS_EXPORT NSString* const NSURLFileScheme; */ - (NSURL*) baseURL; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) /** Attempts to load from the specified URL and provides an error * response if the data is unrachable.
* Returns YES on success, NO on failure. @@ -197,7 +197,7 @@ GS_EXPORT NSString* const NSURLFileScheme; */ - (BOOL) isFileURL; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) /** Returns the last (rightmost) path component of the receiver. */ - (NSString*) lastPathComponent; @@ -260,7 +260,7 @@ GS_EXPORT NSString* const NSURLFileScheme; */ - (NSString*) path; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) /** Returns thepath components of the receiver.
* See [NSString-pathComponents]. */ @@ -346,7 +346,7 @@ GS_EXPORT NSString* const NSURLFileScheme; */ - (NSURL*) standardizedURL; -#if OS_API_VERSION(100600,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) /** Returns a URL formed by adding a path component to the path of the * receiver.
* See [NSString-stringByAppendingPathComponent:]. diff --git a/Headers/Foundation/NSURLAuthenticationChallenge.h b/Headers/Foundation/NSURLAuthenticationChallenge.h index 56169eba2..2e95e5ecf 100644 --- a/Headers/Foundation/NSURLAuthenticationChallenge.h +++ b/Headers/Foundation/NSURLAuthenticationChallenge.h @@ -26,7 +26,7 @@ #define __NSURLAuthenticationChallenge_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLCache.h b/Headers/Foundation/NSURLCache.h index 5554d35e3..6556191e6 100644 --- a/Headers/Foundation/NSURLCache.h +++ b/Headers/Foundation/NSURLCache.h @@ -26,7 +26,7 @@ #define __NSURLCache_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLConnection.h b/Headers/Foundation/NSURLConnection.h index 35bc816f9..65f3ad6b3 100644 --- a/Headers/Foundation/NSURLConnection.h +++ b/Headers/Foundation/NSURLConnection.h @@ -26,7 +26,7 @@ #define __NSURLConnection_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLCredential.h b/Headers/Foundation/NSURLCredential.h index c531fc6e8..477154509 100644 --- a/Headers/Foundation/NSURLCredential.h +++ b/Headers/Foundation/NSURLCredential.h @@ -26,7 +26,7 @@ #define __NSURLCredential_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLCredentialStorage.h b/Headers/Foundation/NSURLCredentialStorage.h index 7d1b13206..be9f45097 100644 --- a/Headers/Foundation/NSURLCredentialStorage.h +++ b/Headers/Foundation/NSURLCredentialStorage.h @@ -26,7 +26,7 @@ #define __NSURLCredentialStorage_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLDownload.h b/Headers/Foundation/NSURLDownload.h index 47b90b83a..144393aa8 100644 --- a/Headers/Foundation/NSURLDownload.h +++ b/Headers/Foundation/NSURLDownload.h @@ -26,7 +26,7 @@ #define __NSURLDownload_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLError.h b/Headers/Foundation/NSURLError.h index 500ee0d78..20b30f0b0 100644 --- a/Headers/Foundation/NSURLError.h +++ b/Headers/Foundation/NSURLError.h @@ -26,7 +26,7 @@ #define __NSURLError_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLProtectionSpace.h b/Headers/Foundation/NSURLProtectionSpace.h index ea8150756..f09e9a2b3 100644 --- a/Headers/Foundation/NSURLProtectionSpace.h +++ b/Headers/Foundation/NSURLProtectionSpace.h @@ -26,7 +26,7 @@ #define __NSURLProtectionSpace_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLProtocol.h b/Headers/Foundation/NSURLProtocol.h index ae9bfcc17..9e48fe57e 100644 --- a/Headers/Foundation/NSURLProtocol.h +++ b/Headers/Foundation/NSURLProtocol.h @@ -26,7 +26,7 @@ #define __NSURLProtocol_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSURLRequest.h b/Headers/Foundation/NSURLRequest.h index fa43dcb53..752464c62 100644 --- a/Headers/Foundation/NSURLRequest.h +++ b/Headers/Foundation/NSURLRequest.h @@ -26,7 +26,7 @@ #define __NSURLRequest_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST) #import @@ -193,7 +193,7 @@ typedef NSUInteger NSURLRequestCachePolicy; */ - (NSData *) HTTPBody; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** * Returns the currently set stream (if any) to be used to provide data * to send as the request body.
@@ -242,7 +242,7 @@ typedef NSUInteger NSURLRequestCachePolicy; */ - (void) setAllHTTPHeaderFields: (NSDictionary *)headerFields; -#if OS_API_VERSION(100400,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** * Sets the request body to be the contents of the given stream.
* The stream should be unopened when it is set, and the load process diff --git a/Headers/Foundation/NSURLResponse.h b/Headers/Foundation/NSURLResponse.h index 0d20c5cfb..f81719de8 100644 --- a/Headers/Foundation/NSURLResponse.h +++ b/Headers/Foundation/NSURLResponse.h @@ -26,7 +26,7 @@ #define __NSURLResponse_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) #import @@ -67,7 +67,7 @@ extern "C" { expectedContentLength: (NSInteger)length textEncodingName: (NSString *)name; -#if OS_API_VERSION(100700,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST) /** * Initialises the receiver with the URL, statusCode, HTTPVersion, and * headerFields provided. diff --git a/Headers/Foundation/NSValueTransformer.h b/Headers/Foundation/NSValueTransformer.h index f8f6b30b2..a94590a0e 100644 --- a/Headers/Foundation/NSValueTransformer.h +++ b/Headers/Foundation/NSValueTransformer.h @@ -27,7 +27,7 @@ #define __NSValueTransformer_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST) #import diff --git a/Headers/Foundation/NSXMLElement.h b/Headers/Foundation/NSXMLElement.h index 0fd0f9c73..9caddb4e2 100644 --- a/Headers/Foundation/NSXMLElement.h +++ b/Headers/Foundation/NSXMLElement.h @@ -104,7 +104,7 @@ extern "C" { */ - (void) setAttributesAsDictionary: (NSDictionary*)attributes; -#if OS_API_VERSION(100700, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST) /** * Sets attributes from the supplied dictionary. */ diff --git a/Headers/Foundation/NSXMLParser.h b/Headers/Foundation/NSXMLParser.h index 9496c4473..df862a75d 100644 --- a/Headers/Foundation/NSXMLParser.h +++ b/Headers/Foundation/NSXMLParser.h @@ -28,7 +28,7 @@ #define __NSXMLParser_h_GNUSTEP_BASE_INCLUDE #import -#if OS_API_VERSION(100300, GS_API_LATEST) +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST) #import diff --git a/Headers/GNUstepBase/GSVersionMacros.h b/Headers/GNUstepBase/GSVersionMacros.h index 9bbbcc939..20d7f63a7 100644 --- a/Headers/GNUstepBase/GSVersionMacros.h +++ b/Headers/GNUstepBase/GSVersionMacros.h @@ -43,22 +43,28 @@ # define NO_GNUSTEP 1 #endif -/* - * For MacOS-X compatibility, we define the MacOS-X version constants and - * we allow MAC_OS_X_VERSION_MIN_ALLOWED or MAC_OS_X_VERSION_MAX_ALLOWED - * instead of GS_OPENSTEP_V +/* Define the GS_OSX_ADJUST() macro to adjust OSX style version macros + * to GNUstep style version macros. */ +#define GS_OSX_ADJUST(V) ((V) < 10000 ? (V) : (V) * 100) -#ifndef MAC_OS_X_VERSION_10_0 -#define MAC_OS_X_VERSION_10_0 100000 -#define MAC_OS_X_VERSION_10_1 100100 -#define MAC_OS_X_VERSION_10_2 100200 -#define MAC_OS_X_VERSION_10_3 100300 -#define MAC_OS_X_VERSION_10_4 100400 -#define MAC_OS_X_VERSION_10_5 100500 -#define MAC_OS_X_VERSION_10_6 100600 +/* Define OSX compatibility version macros if necessary. + */ +#if !defined(MAC_OS_X_VERSION_10_0) +#define MAC_OS_X_VERSION_10_0 1000 +#define MAC_OS_X_VERSION_10_1 1001 +#define MAC_OS_X_VERSION_10_2 1002 +#define MAC_OS_X_VERSION_10_3 1003 +#define MAC_OS_X_VERSION_10_4 1004 +#define MAC_OS_X_VERSION_10_5 1005 +#define MAC_OS_X_VERSION_10_6 1006 +#define MAC_OS_X_VERSION_10_7 1007 +#define MAC_OS_X_VERSION_10_8 1008 #endif /* MAC_OS_X_VERSION_10_0 */ +/* Allow MAC_OS_X_VERSION_MIN_ALLOWED or MAC_OS_X_VERSION_MAX_ALLOWED to be + * used in place of GS_OPENSTEP_V + */ #ifndef GS_OPENSTEP_V #ifdef MAC_OS_X_VERSION_MIN_ALLOWED #define GS_OPENSTEP_V MAC_OS_X_VERSION_MIN_ALLOWED @@ -69,6 +75,7 @@ #endif /* MAC_OS_X_VERSION_MIN_ALLOWED */ #endif /* GS_OPENSTEP_V */ + /* * NB. The version values below must be integers ... by convention these are * made up of two digits each for major, minor and subminor version numbers @@ -135,7 +142,7 @@ *

*/ #define OS_API_VERSION(ADD,REM) \ - (!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= ADD && GS_OPENSTEP_V < REM)) + (!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= GS_OSX_ADJUST(ADD) && GS_OPENSTEP_V < GS_OSX_ADJUST(REM))) /** * A constant which is the lowest possible version number (0) so that diff --git a/Headers/GNUstepBase/config.h.in b/Headers/GNUstepBase/config.h.in index 782790676..119dece7e 100644 --- a/Headers/GNUstepBase/config.h.in +++ b/Headers/GNUstepBase/config.h.in @@ -198,6 +198,9 @@ /* Define to 1 if you have the `ctime' function. */ #undef HAVE_CTIME +/* Define if you have currency_symbol field in struct lconv */ +#undef HAVE_CURRENCY_SYMBOL_IN_LCONV + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R @@ -685,6 +688,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNICODE_ULOC_H +/* Define to 1 if you have the header file. */ +#undef HAVE_UNICODE_UNORM2_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNICODE_UNUM_H diff --git a/Source/NSString.m b/Source/NSString.m index 1bad340ea..2e1a3b731 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -99,6 +99,9 @@ #if defined(HAVE_UNICODE_UCOL_H) # include #endif +#if defined(HAVE_UNICODE_UNORM2_H) +# include +#endif #if defined(HAVE_UNICODE_USTRING_H) # include #endif @@ -589,10 +592,11 @@ handle_printf_atsign (FILE *stream, #if GS_USE_ICU == 1 /** * Returns an ICU collator for the given locale and options, or returns - * NULL if a collator couldn't be created or the GNUstep comparison code should be - * used instead. + * NULL if a collator couldn't be created or the GNUstep comparison code + * should be used instead. */ -static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale) +static UCollator * +GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale) { UErrorCode status = U_ZERO_ERROR; const char *localeCString; @@ -605,12 +609,12 @@ static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *local if (locale == nil) { - /* - * a nil locale should trigger POSIX collation (i.e. 'A'-'Z' sort before 'a'), - * and support for this was added in ICU 4.6 under the locale name - * en_US_POSIX, but it doesn't fit our requirements (e.g. 'e' and 'E' don't - * compare as equal with case insensitive comparison.) - so return NULL to - * indicate that the GNUstep comparison code should be used. + /* A nil locale should trigger POSIX collation (i.e. 'A'-'Z' sort + * before 'a'), and support for this was added in ICU 4.6 under the + * locale name en_US_POSIX, but it doesn't fit our requirements + * (e.g. 'e' and 'E' don't compare as equal with case insensitive + * comparison.) - so return NULL to indicate that the GNUstep + * comparison code should be used. */ return NULL; } @@ -657,6 +661,94 @@ static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *local ucol_close(coll); return NULL; } + +- (NSString *) _normalizedICUStringOfType: (const char*)normalization + mode: (UNormalizationMode)mode +{ + UErrorCode err; + const UNormalizer2 *normalizer; + int32_t length; + int32_t newLength; + NSString *newString; + + length = (uint32_t)[self length]; + if (0 == length) + { + return @""; // Simple case ... empty string + } + + err = 0; + normalizer = unorm2_getInstance(NULL, normalization, UNORM2_COMPOSE, &err); + if (U_FAILURE(err)) + { + [NSException raise: NSCharacterConversionException + format: @"libicu unorm2_getInstance() failed"]; + } + + if (length < 200) + { + unichar src[length]; + unichar dst[length*3]; + + /* For a short string, it's very efficient to just use on-stack + * buffers for the libicu work, and then let the standard string + * initialiser convert that to an inline string. + */ + [self getCharacters: (unichar *)src range: NSMakeRange(0, length)]; + err = 0; + newLength = unorm2_normalize(normalizer, (UChar*)src, length, + (UChar*)dst, length*3, &err); + if (U_FAILURE(err)) + { + [NSException raise: NSCharacterConversionException + format: @"precompose/decompose failed"]; + } + newString = [[NSString alloc] initWithCharacters: dst length: newLength]; + } + else + { + unichar *src; + unichar *dst; + + /* For longer strings, we copy the source into a buffer on the heap + * for the libicu operation, determine the length needed for the + * output buffer, then do the actual conversion to build the string. + */ + src = (unichar*)malloc(length * sizeof(unichar)); + [self getCharacters: (unichar*)src range: NSMakeRange(0, length)]; + err = 0; + newLength = unorm2_normalize(normalizer, (UChar*)src, length, + 0, 0, &err); + if (U_BUFFER_OVERFLOW_ERROR != err) + { + free(src); + [NSException raise: NSCharacterConversionException + format: @"precompose/decompose length check failed"]; + } +#if GS_WITH_GC + dst = NSAllocateCollectable(newLength * sizeof(unichar), 0); +#else + dst = NSZoneMalloc(NSDefaultMallocZone(), newLength * sizeof(unichar)); +#endif + err = 0; + unorm2_normalize(normalizer, (UChar*)src, length, + (UChar*)dst, newLength, &err); + free(src); + if (U_FAILURE(err)) + { +#if !GS_WITH_GC + NSZoneFree(NSDefaultMallocZone(), dst); +#endif + [NSException raise: NSCharacterConversionException + format: @"precompose/decompose failed"]; + } + newString = [[NSString alloc] initWithCharactersNoCopy: dst + length: newLength + freeWhenDone: YES]; + } + + return AUTORELEASE(newString); +} #endif + (void) atExit @@ -1675,6 +1767,24 @@ static UCollator *GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *local return (unichar)0; } +- (NSString *) decomposedStringWithCompatibilityMapping +{ +#if GS_USE_ICU == 1 + return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_DECOMPOSE]; +#else + return [self notImplemented: _cmd]; +#endif +} + +- (NSString *) decomposedStringWithCanonicalMapping +{ +#if GS_USE_ICU == 1 + return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_DECOMPOSE]; +#else + return [self notImplemented: _cmd]; +#endif +} + /** * Returns this string as an array of 16-bit unichar (unsigned * short) values. buffer must be preallocated and should be capable of @@ -3819,6 +3929,24 @@ static NSFileManager *fm = nil; return @""; } +- (NSString *) precomposedStringWithCompatibilityMapping +{ +#if GS_USE_ICU == 1 + return [self _normalizedICUStringOfType: "nfkc" mode: UNORM2_COMPOSE]; +#else + return [self notImplemented: _cmd]; +#endif +} + +- (NSString *) precomposedStringWithCanonicalMapping +{ +#if GS_USE_ICU == 1 + return [self _normalizedICUStringOfType: "nfc" mode: UNORM2_COMPOSE]; +#else + return [self notImplemented: _cmd]; +#endif +} + - (NSString*) stringByAppendingPathComponent: (NSString*)aString { unsigned originalLength = [self length]; diff --git a/configure b/configure index 594feda22..efdd13dc3 100755 --- a/configure +++ b/configure @@ -13537,6 +13537,11 @@ fi #-------------------------------------------------------------------- # Check for ObjC2 support in runtime #-------------------------------------------------------------------- +if test "$cross_compiling"="yes"; then + { $as_echo "$as_me:$LINENO: \"Cross compiling! Using predefined OBJC2RUNTIME variable\"" >&5 +$as_echo "$as_me: \"Cross compiling! Using predefined OBJC2RUNTIME variable\"" >&6;} + OBJC2RUNTIME="$cross_objc2_runtime" +else for ac_func in objc_setProperty do @@ -13638,10 +13643,11 @@ _ACEOF fi done -if test $ac_cv_func_objc_setProperty = yes ; then - OBJC2RUNTIME=1 -else - OBJC2RUNTIME=0 + if test $ac_cv_func_objc_setProperty = yes ; then + OBJC2RUNTIME=1 + else + OBJC2RUNTIME=0 + fi fi @@ -15815,6 +15821,67 @@ _ACEOF fi +{ $as_echo "$as_me:$LINENO: checking for currency_symbol field in struct lconv" >&5 +$as_echo_n "checking for currency_symbol field in struct lconv... " >&6; } +if test "${ac_cv_have_currency_symbol_in_struct_lconv+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. */ + #include +int +main () +{ + struct lconv l; l.currency_symbol = NULL; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +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_compile") 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_objext; then + ac_cv_have_currency_symbol_in_struct_lconv="yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_currency_symbol_in_struct_lconv="no" + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_currency_symbol_in_struct_lconv" >&5 +$as_echo "$ac_cv_have_currency_symbol_in_struct_lconv" >&6; } +if test "x$ac_cv_have_currency_symbol_in_struct_lconv" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CURRENCY_SYMBOL_IN_LCONV 1 +_ACEOF + +fi + #-------------------------------------------------------------------- # These two headers (functions) needed by Time.m #-------------------------------------------------------------------- @@ -26022,7 +26089,8 @@ $as_echo "yes" >&6; } -for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h + +for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/unorm2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/configure.ac b/configure.ac index f00cad62c..68c25a044 100644 --- a/configure.ac +++ b/configure.ac @@ -3204,7 +3204,7 @@ if test $enable_icu = yes; then if test "$have_icu" = "yes"; then AC_MSG_RESULT(yes) - AC_CHECK_HEADERS(unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h) + AC_CHECK_HEADERS(unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/unorm2.h) LIBS="$LIBS $ICU_LIBS" LDFLAGS="$LDFLAGS $ICU_LDFLAGS" LDIR_FLAGS="$LDIR_FLAGS $ICU_LDFLAGS"