diff --git a/ChangeLog b/ChangeLog index 14d331633..d26a00cdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,195 @@ Use statbuf.st_mtim to get nanosecond precision in modification date, also fix conversion of nanoseconds in creation date. +2021-01-29 Frederik Seiffert + + * Headers/Foundation/NSAffineTransform.h: + * Headers/Foundation/NSAppleEventDescriptor.h: + * Headers/Foundation/NSAppleEventManager.h: + * Headers/Foundation/NSAppleScript.h: + * Headers/Foundation/NSArchiver.h: + * Headers/Foundation/NSArray.h: + * Headers/Foundation/NSAttributedString.h: + * Headers/Foundation/NSAutoreleasePool.h: + * Headers/Foundation/NSBackgroundActivityScheduler.h: + * Headers/Foundation/NSBundle.h: + * Headers/Foundation/NSByteCountFormatter.h: + * Headers/Foundation/NSCache.h: + * Headers/Foundation/NSCalendar.h: + * Headers/Foundation/NSCalendarDate.h: + * Headers/Foundation/NSCharacterSet.h: + * Headers/Foundation/NSClassDescription.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/NSDateComponentsFormatter.h: + * Headers/Foundation/NSDateFormatter.h: + * Headers/Foundation/NSDateInterval.h: + * Headers/Foundation/NSDateIntervalFormatter.h: + * Headers/Foundation/NSDictionary.h: + * Headers/Foundation/NSDistantObject.h: + * Headers/Foundation/NSDistributedLock.h: + * Headers/Foundation/NSEnergyFormatter.h: + * Headers/Foundation/NSEnumerator.h: + * Headers/Foundation/NSError.h: + * Headers/Foundation/NSException.h: + * Headers/Foundation/NSExpression.h: + * Headers/Foundation/NSExtensionContext.h: + * Headers/Foundation/NSExtensionItem.h: + * Headers/Foundation/NSFileCoordinator.h: + * Headers/Foundation/NSFileHandle.h: + * Headers/Foundation/NSFileManager.h: + * Headers/Foundation/NSFileVersion.h: + * Headers/Foundation/NSFileWrapper.h: + * Headers/Foundation/NSGarbageCollector.h: + * Headers/Foundation/NSHTTPCookie.h: + * Headers/Foundation/NSHTTPCookieStorage.h: + * Headers/Foundation/NSHashTable.h: + * Headers/Foundation/NSHost.h: + * Headers/Foundation/NSISO8601DateFormatter.h: + * Headers/Foundation/NSInvocation.h: + * Headers/Foundation/NSInvocationOperation.h: + * Headers/Foundation/NSItemProvider.h: + * Headers/Foundation/NSItemProviderReadingWriting.h: + * Headers/Foundation/NSJSONSerialization.h: + * Headers/Foundation/NSKeyedArchiver.h: + * Headers/Foundation/NSLengthFormatter.h: + * Headers/Foundation/NSLinguisticTagger.h: + * Headers/Foundation/NSLocale.h: + * Headers/Foundation/NSLock.h: + * Headers/Foundation/NSMapTable.h: + * Headers/Foundation/NSMassFormatter.h: + * Headers/Foundation/NSMeasurement.h: + * Headers/Foundation/NSMeasurementFormatter.h: + * Headers/Foundation/NSMetadata.h: + * Headers/Foundation/NSMethodSignature.h: + * Headers/Foundation/NSNetServices.h: + * Headers/Foundation/NSNotification.h: + * Headers/Foundation/NSNotificationQueue.h: + * Headers/Foundation/NSNumberFormatter.h: + * Headers/Foundation/NSObjCRuntime.h: + * Headers/Foundation/NSObject.h: + * Headers/Foundation/NSObjectScripting.h: + * Headers/Foundation/NSOperation.h: + * Headers/Foundation/NSOrderedSet.h: + * Headers/Foundation/NSOrthography.h: + * Headers/Foundation/NSPersonNameComponents.h: + * Headers/Foundation/NSPersonNameComponentsFormatter.h: + * Headers/Foundation/NSPointerArray.h: + * Headers/Foundation/NSPointerFunctions.h: + * Headers/Foundation/NSPort.h: + * Headers/Foundation/NSPortCoder.h: + * Headers/Foundation/NSPortNameServer.h: + * Headers/Foundation/NSPredicate.h: + * Headers/Foundation/NSProcessInfo.h: + * Headers/Foundation/NSProgress.h: + * Headers/Foundation/NSPropertyList.h: + * Headers/Foundation/NSProtocolChecker.h: + * Headers/Foundation/NSProxy.h: + * Headers/Foundation/NSRegularExpression.h: + * Headers/Foundation/NSRunLoop.h: + * Headers/Foundation/NSScanner.h: + * Headers/Foundation/NSScriptClassDescription.h: + * Headers/Foundation/NSScriptCoercionHandler.h: + * Headers/Foundation/NSScriptCommand.h: + * Headers/Foundation/NSScriptCommandDescription.h: + * Headers/Foundation/NSScriptExecutionContext.h: + * Headers/Foundation/NSScriptKeyValueCoding.h: + * Headers/Foundation/NSScriptObjectSpecifiers.h: + * Headers/Foundation/NSScriptStandardSuiteCommands.h: + * Headers/Foundation/NSScriptSuiteRegistry.h: + * Headers/Foundation/NSSerialization.h: + * Headers/Foundation/NSSet.h: + * Headers/Foundation/NSSortDescriptor.h: + * Headers/Foundation/NSSpellServer.h: + * Headers/Foundation/NSStream.h: + * Headers/Foundation/NSString.h: + * Headers/Foundation/NSTask.h: + * Headers/Foundation/NSTextCheckingResult.h: + * Headers/Foundation/NSThread.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/NSURLHandle.h: + * Headers/Foundation/NSURLProtectionSpace.h: + * Headers/Foundation/NSURLProtocol.h: + * Headers/Foundation/NSURLRequest.h: + * Headers/Foundation/NSURLResponse.h: + * Headers/Foundation/NSURLSession.h: + * Headers/Foundation/NSUUID.h: + * Headers/Foundation/NSUbiquitousKeyValueStore.h: + * Headers/Foundation/NSUndoManager.h: + * Headers/Foundation/NSUnit.h: + * Headers/Foundation/NSUserActivity.h: + * Headers/Foundation/NSUserDefaults.h: + * Headers/Foundation/NSUserNotification.h: + * Headers/Foundation/NSUserScriptTask.h: + * Headers/Foundation/NSValue.h: + * Headers/Foundation/NSValueTransformer.h: + * Headers/Foundation/NSXMLDTD.h: + * Headers/Foundation/NSXMLDTDNode.h: + * Headers/Foundation/NSXMLDocument.h: + * Headers/Foundation/NSXMLElement.h: + * Headers/Foundation/NSXMLNode.h: + * Headers/Foundation/NSXMLParser.h: + * Headers/Foundation/NSXPCConnection.h: + * Headers/GNUstepBase/CXXException.h: + * Headers/GNUstepBase/GCObject.h: + * Headers/GNUstepBase/GSConfig.h.in: + * Headers/GNUstepBase/GSMime.h: + * Headers/GNUstepBase/GSTLS.h: + * Headers/GNUstepBase/GSVersionMacros.h: + * Headers/GNUstepBase/GSXML.h: + * Headers/GNUstepBase/NSStream+GNUstepBase.h: + * Source/Additions/GSXML.m: + * Source/Additions/Makefile.preamble: + * Source/CXXException.m: + * Source/GNUmakefile: + * Source/NSException.m: + * Source/NSFileManager.m: + * Source/NSPropertyList.m: + * Source/NSSocketPort.m: + * Source/ObjectiveC2/Makefile.preamble: + * Source/common.h: + * Source/externs.m: + * Source/inet_ntop.m: + * Source/inet_pton.m: + * Source/libgnustep-base-entry.m: + * Source/unix/Makefile.preamble: + * Source/win32/GSFileHandle.m: + * Source/win32/Makefile.preamble: + * Tools/GNUmakefile: + * Tools/Makefile.preamble: + * Tools/gdnc.m: + * Tools/make_strings/make_strings.m: + * Tools/pl2link.m: + * Tools/plutil.m: + * config/config.initialize.m: + * configure: + * configure.ac: + Added support for building on Windows with Clang MSVC target and + libobjc2. This requires using a standard (non-MinGW) Clang build that + e.g. comes with Visual Studio or is available as pre-built binary from + the LLVM website, and requires passing a host to configure like + --host=x86_64-pc-windows. + The build is best done in an MSYS2 shell that does not have any + additional *-devel packages installed that might get picked up by + configure. Alternatively --disable-xxx flags can be used to prevent + these dependencies to be picked up. + Annotates all ObjC class interfaces with GS_EXPORT_CLASS for DLL + export/import declarations, and adds missing GS_DECLARE annotations + in externs.m, in order for these symbols to be correctly exported + in the DLL. + 2021-01-21 Fred Kiefer * Tools/pl2link.m (main): Set key StartupWMClass and allow file diff --git a/Headers/Foundation/NSAffineTransform.h b/Headers/Foundation/NSAffineTransform.h index 8a0050f30..9c371aa32 100644 --- a/Headers/Foundation/NSAffineTransform.h +++ b/Headers/Foundation/NSAffineTransform.h @@ -41,6 +41,7 @@ typedef struct { CGFloat tY; } NSAffineTransformStruct; +GS_EXPORT_CLASS @interface NSAffineTransform : NSObject { #if GS_EXPOSE(NSAffineTransform) diff --git a/Headers/Foundation/NSAppleEventDescriptor.h b/Headers/Foundation/NSAppleEventDescriptor.h index 8021206fd..cb9dbbdc4 100644 --- a/Headers/Foundation/NSAppleEventDescriptor.h +++ b/Headers/Foundation/NSAppleEventDescriptor.h @@ -33,6 +33,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSAppleEventDescriptor : NSObject @end diff --git a/Headers/Foundation/NSAppleEventManager.h b/Headers/Foundation/NSAppleEventManager.h index 1790c1020..5fb7e40a7 100644 --- a/Headers/Foundation/NSAppleEventManager.h +++ b/Headers/Foundation/NSAppleEventManager.h @@ -33,6 +33,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSAppleEventManager : NSObject @end diff --git a/Headers/Foundation/NSAppleScript.h b/Headers/Foundation/NSAppleScript.h index ad2dc16e5..1a1969f74 100644 --- a/Headers/Foundation/NSAppleScript.h +++ b/Headers/Foundation/NSAppleScript.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSAppleScript : NSObject @end diff --git a/Headers/Foundation/NSArchiver.h b/Headers/Foundation/NSArchiver.h index e3e0e47d2..171c24be6 100644 --- a/Headers/Foundation/NSArchiver.h +++ b/Headers/Foundation/NSArchiver.h @@ -40,6 +40,7 @@ extern "C" { #if OS_API_VERSION(GS_API_OSSPEC,GS_API_LATEST) +GS_EXPORT_CLASS @interface NSArchiver : NSCoder { #if GS_EXPOSE(NSArchiver) @@ -157,8 +158,9 @@ extern "C" { @end #endif - + +GS_EXPORT_CLASS @interface NSUnarchiver : NSCoder { #if GS_EXPOSE(NSUnarchiver) diff --git a/Headers/Foundation/NSArray.h b/Headers/Foundation/NSArray.h index 30f375711..6c492568a 100644 --- a/Headers/Foundation/NSArray.h +++ b/Headers/Foundation/NSArray.h @@ -57,6 +57,7 @@ enum typedef NSUInteger NSBinarySearchingOptions; #endif +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSArray, __covariant ElementT) : NSObject @@ -300,7 +301,8 @@ DEFINE_BLOCK_TYPE(GSPredicateBlock, BOOL, GS_GENERIC_TYPE(ElementT), NSUInteger, - (GS_GENERIC_TYPE(ElementT)) objectAtIndexedSubscript: (NSUInteger)anIndex; @end - + +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSMutableArray, ElementT) : GS_GENERIC_CLASS(NSArray, ElementT) + (instancetype) arrayWithCapacity: (NSUInteger)numItems; diff --git a/Headers/Foundation/NSAttributedString.h b/Headers/Foundation/NSAttributedString.h index 263c1c167..42e4cff71 100644 --- a/Headers/Foundation/NSAttributedString.h +++ b/Headers/Foundation/NSAttributedString.h @@ -61,6 +61,7 @@ extern "C" { #import #import +GS_EXPORT_CLASS @interface NSAttributedString : NSObject { } @@ -100,6 +101,7 @@ extern "C" { @end //NSAttributedString +GS_EXPORT_CLASS @interface NSMutableAttributedString : NSAttributedString { } diff --git a/Headers/Foundation/NSAutoreleasePool.h b/Headers/Foundation/NSAutoreleasePool.h index c37aa1e18..8f98270d0 100644 --- a/Headers/Foundation/NSAutoreleasePool.h +++ b/Headers/Foundation/NSAutoreleasePool.h @@ -178,8 +178,8 @@ typedef struct autorelease_array_list * * */ -NS_AUTOMATED_REFCOUNT_UNAVAILABLE -@interface NSAutoreleasePool : NSObject +GS_EXPORT_CLASS NS_AUTOMATED_REFCOUNT_UNAVAILABLE +@interface NSAutoreleasePool : NSObject { #if GS_EXPOSE(NSAutoreleasePool) && !__has_feature(objc_arc) /* For re-setting the current pool when we are dealloc'ed. */ diff --git a/Headers/Foundation/NSBackgroundActivityScheduler.h b/Headers/Foundation/NSBackgroundActivityScheduler.h index a1059a852..c5b20a25b 100644 --- a/Headers/Foundation/NSBackgroundActivityScheduler.h +++ b/Headers/Foundation/NSBackgroundActivityScheduler.h @@ -65,6 +65,7 @@ typedef NSInteger NSQualityOfService; DEFINE_BLOCK_TYPE(GSScheduledBlock, void, NSBackgroundActivityCompletionHandler); //# endif +GS_EXPORT_CLASS @interface NSBackgroundActivityScheduler : NSObject { NSString *_identifier; diff --git a/Headers/Foundation/NSBundle.h b/Headers/Foundation/NSBundle.h index 265aeead1..2a6fc418a 100644 --- a/Headers/Foundation/NSBundle.h +++ b/Headers/Foundation/NSBundle.h @@ -109,6 +109,7 @@ GS_EXPORT NSString* const NSLoadedClasses; bundle.

*/ +GS_EXPORT_CLASS @interface NSBundle : NSObject { #if GS_EXPOSE(NSBundle) diff --git a/Headers/Foundation/NSByteCountFormatter.h b/Headers/Foundation/NSByteCountFormatter.h index 54e08cace..e8abf6462 100644 --- a/Headers/Foundation/NSByteCountFormatter.h +++ b/Headers/Foundation/NSByteCountFormatter.h @@ -60,7 +60,8 @@ enum { NSByteCountFormatterCountStyleBinary = 3, }; typedef NSInteger NSByteCountFormatterCountStyle; - + +GS_EXPORT_CLASS @interface NSByteCountFormatter : NSFormatter { #if GS_EXPOSE(NSByteCountFormatter) diff --git a/Headers/Foundation/NSCache.h b/Headers/Foundation/NSCache.h index b87df2e2a..f514a1947 100644 --- a/Headers/Foundation/NSCache.h +++ b/Headers/Foundation/NSCache.h @@ -38,6 +38,7 @@ extern "C" { @class NSMapTable; @class GS_GENERIC_CLASS(NSMutableArray, ElementT); +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSCache, KeyT, ValT) : NSObject { #if GS_EXPOSE(NSCache) diff --git a/Headers/Foundation/NSCalendar.h b/Headers/Foundation/NSCalendar.h index 28fea7548..17a624c44 100644 --- a/Headers/Foundation/NSCalendar.h +++ b/Headers/Foundation/NSCalendar.h @@ -148,6 +148,7 @@ enum +GS_EXPORT_CLASS @interface NSDateComponents : NSObject { @private @@ -262,6 +263,7 @@ enum +GS_EXPORT_CLASS @interface NSCalendar : NSObject { @private diff --git a/Headers/Foundation/NSCalendarDate.h b/Headers/Foundation/NSCalendarDate.h index edec056c4..8fd8abc9c 100644 --- a/Headers/Foundation/NSCalendarDate.h +++ b/Headers/Foundation/NSCalendarDate.h @@ -32,6 +32,7 @@ extern "C" { @class NSTimeZone; @class NSTimeZoneDetail; +GS_EXPORT_CLASS @interface NSCalendarDate : NSDate { #if GS_EXPOSE(NSCalendarDate) diff --git a/Headers/Foundation/NSCharacterSet.h b/Headers/Foundation/NSCharacterSet.h index b12192450..3c625ab0f 100644 --- a/Headers/Foundation/NSCharacterSet.h +++ b/Headers/Foundation/NSCharacterSet.h @@ -39,6 +39,7 @@ extern "C" { * Represents a set of unicode characters. Used by [NSScanner] and [NSString] * for parsing-related methods. */ +GS_EXPORT_CLASS @interface NSCharacterSet : NSObject /** @@ -238,6 +239,7 @@ extern "C" { /** * An [NSCharacterSet] that can be modified. */ +GS_EXPORT_CLASS @interface NSMutableCharacterSet : NSCharacterSet /** diff --git a/Headers/Foundation/NSClassDescription.h b/Headers/Foundation/NSClassDescription.h index 3ddc8ea3c..a1d66e3ce 100644 --- a/Headers/Foundation/NSClassDescription.h +++ b/Headers/Foundation/NSClassDescription.h @@ -47,6 +47,7 @@ extern "C" { */ GS_EXPORT NSString* const NSClassDescriptionNeededForClassNotification; +GS_EXPORT_CLASS @interface NSClassDescription : NSObject + (NSClassDescription*) classDescriptionForClass: (Class)aClass; diff --git a/Headers/Foundation/NSCoder.h b/Headers/Foundation/NSCoder.h index b80fa3056..c5187d0a7 100644 --- a/Headers/Foundation/NSCoder.h +++ b/Headers/Foundation/NSCoder.h @@ -48,6 +48,7 @@ extern "C" { * preferred for new implementations, since they provide greater * forward/backward compatibility in the face of class changes.

*/ +GS_EXPORT_CLASS @interface NSCoder : NSObject // Encoding Data diff --git a/Headers/Foundation/NSComparisonPredicate.h b/Headers/Foundation/NSComparisonPredicate.h index 68622ebff..8f5a04d13 100644 --- a/Headers/Foundation/NSComparisonPredicate.h +++ b/Headers/Foundation/NSComparisonPredicate.h @@ -69,6 +69,7 @@ typedef enum _NSPredicateOperatorType #endif } NSPredicateOperatorType; +GS_EXPORT_CLASS @interface NSComparisonPredicate : NSPredicate { #if GS_EXPOSE(NSComparisonPredicate) diff --git a/Headers/Foundation/NSCompoundPredicate.h b/Headers/Foundation/NSCompoundPredicate.h index 8f2a22f3b..b087cb0ce 100644 --- a/Headers/Foundation/NSCompoundPredicate.h +++ b/Headers/Foundation/NSCompoundPredicate.h @@ -42,6 +42,7 @@ enum }; typedef NSUInteger NSCompoundPredicateType; +GS_EXPORT_CLASS @interface NSCompoundPredicate : NSPredicate { #if GS_EXPOSE(NSCompoundPredicate) diff --git a/Headers/Foundation/NSConnection.h b/Headers/Foundation/NSConnection.h index 753dcca20..8599bdf04 100644 --- a/Headers/Foundation/NSConnection.h +++ b/Headers/Foundation/NSConnection.h @@ -92,6 +92,7 @@ GS_EXPORT NSString* const NSConnectionProxyCount; /* Objects received */ * * A few methods are in the specification but not yet implemented. */ +GS_EXPORT_CLASS @interface NSConnection : NSObject { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSData.h b/Headers/Foundation/NSData.h index 641ca1854..f9eda8ea7 100644 --- a/Headers/Foundation/NSData.h +++ b/Headers/Foundation/NSData.h @@ -81,6 +81,7 @@ enum { DEFINE_BLOCK_TYPE(GSDataDeallocatorBlock, void, void*, NSUInteger); #endif +GS_EXPORT_CLASS @interface NSData : NSObject // Allocating and Initializing a Data Object @@ -312,6 +313,7 @@ DEFINE_BLOCK_TYPE(GSDataDeallocatorBlock, void, void*, NSUInteger); @end #endif +GS_EXPORT_CLASS @interface NSMutableData : NSData + (id) dataWithCapacity: (NSUInteger)numBytes; diff --git a/Headers/Foundation/NSDate.h b/Headers/Foundation/NSDate.h index 458c20227..6ec56a96c 100644 --- a/Headers/Foundation/NSDate.h +++ b/Headers/Foundation/NSDate.h @@ -56,6 +56,7 @@ GS_EXPORT const NSTimeInterval NSTimeIntervalSince1970; @class NSTimeZone; @class NSTimeZoneDetail; +GS_EXPORT_CLASS @interface NSDate : NSObject { } diff --git a/Headers/Foundation/NSDateComponentsFormatter.h b/Headers/Foundation/NSDateComponentsFormatter.h index 26465fccd..863ef0451 100644 --- a/Headers/Foundation/NSDateComponentsFormatter.h +++ b/Headers/Foundation/NSDateComponentsFormatter.h @@ -72,7 +72,8 @@ enum typedef NSUInteger NSDateComponentsFormatterZeroFormattingBehavior; @class NSString, NSDate; - + +GS_EXPORT_CLASS @interface NSDateComponentsFormatter : NSFormatter { NSCalendar *_calendar; diff --git a/Headers/Foundation/NSDateFormatter.h b/Headers/Foundation/NSDateFormatter.h index 833b1f767..6ab6288f7 100644 --- a/Headers/Foundation/NSDateFormatter.h +++ b/Headers/Foundation/NSDateFormatter.h @@ -122,6 +122,7 @@ typedef NSUInteger NSDateFormatterBehavior; * time zone offset in hours and minutes from GMT (HHMM) * */ +GS_EXPORT_CLASS @interface NSDateFormatter : NSFormatter { #if GS_EXPOSE(NSDateFormatter) diff --git a/Headers/Foundation/NSDateInterval.h b/Headers/Foundation/NSDateInterval.h index 30a1cd718..439df9e3c 100644 --- a/Headers/Foundation/NSDateInterval.h +++ b/Headers/Foundation/NSDateInterval.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSDateInterval : NSObject { NSTimeInterval _duration; diff --git a/Headers/Foundation/NSDateIntervalFormatter.h b/Headers/Foundation/NSDateIntervalFormatter.h index 32cd6a511..6a75bf762 100644 --- a/Headers/Foundation/NSDateIntervalFormatter.h +++ b/Headers/Foundation/NSDateIntervalFormatter.h @@ -44,7 +44,8 @@ enum { typedef NSUInteger NSDateIntervalFormatterStyle; @class NSCalendar, NSLocale, NSDateInterval; - + +GS_EXPORT_CLASS @interface NSDateIntervalFormatter : NSFormatter { NSLocale *_locale; diff --git a/Headers/Foundation/NSDictionary.h b/Headers/Foundation/NSDictionary.h index 57e6b5f60..046aed3dc 100644 --- a/Headers/Foundation/NSDictionary.h +++ b/Headers/Foundation/NSDictionary.h @@ -37,6 +37,7 @@ extern "C" { @class GS_GENERIC_CLASS(NSSet, ElementT); @class NSString, NSURL; +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSDictionary, __covariant KeyT:id, __covariant ValT) : NSObject @@ -132,6 +133,7 @@ DEFINE_BLOCK_TYPE(GSKeysAndObjectsPredicateBlock, BOOL, GS_GENERIC_TYPE_F(KeyT,i (GS_GENERIC_TYPE(KeyT))aKey; @end +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSMutableDictionary, KeyT:id, ValT) : GS_GENERIC_CLASS(NSDictionary, KeyT, ValT) diff --git a/Headers/Foundation/NSDistantObject.h b/Headers/Foundation/NSDistantObject.h index 735ed2c51..ba11ab074 100644 --- a/Headers/Foundation/NSDistantObject.h +++ b/Headers/Foundation/NSDistantObject.h @@ -35,6 +35,7 @@ extern "C" { @class NSConnection; +GS_EXPORT_CLASS @interface NSDistantObject : NSProxy { #if GS_EXPOSE(NSDistantObject) diff --git a/Headers/Foundation/NSDistributedLock.h b/Headers/Foundation/NSDistributedLock.h index dc6a4720e..734ec6d91 100644 --- a/Headers/Foundation/NSDistributedLock.h +++ b/Headers/Foundation/NSDistributedLock.h @@ -36,6 +36,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSDistributedLock : NSObject { #if GS_EXPOSE(NSDistributedLock) diff --git a/Headers/Foundation/NSEnergyFormatter.h b/Headers/Foundation/NSEnergyFormatter.h index c6b85a9ad..e0eb47bb8 100644 --- a/Headers/Foundation/NSEnergyFormatter.h +++ b/Headers/Foundation/NSEnergyFormatter.h @@ -43,6 +43,7 @@ enum { }; typedef NSInteger NSEnergyFormatterUnit; +GS_EXPORT_CLASS @interface NSEnergyFormatter : NSFormatter { BOOL _isForFoodEnergyUse; diff --git a/Headers/Foundation/NSEnumerator.h b/Headers/Foundation/NSEnumerator.h index 27b6bca9a..0094fef59 100644 --- a/Headers/Foundation/NSEnumerator.h +++ b/Headers/Foundation/NSEnumerator.h @@ -51,6 +51,7 @@ typedef struct count: (NSUInteger)len; @end +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSEnumerator, IterT) : NSObject - (GS_GENERIC_CLASS(NSArray, IterT) *) allObjects; - (GS_GENERIC_TYPE(IterT)) nextObject; diff --git a/Headers/Foundation/NSError.h b/Headers/Foundation/NSError.h index 490cbc972..8b7cbe120 100644 --- a/Headers/Foundation/NSError.h +++ b/Headers/Foundation/NSError.h @@ -129,6 +129,7 @@ GS_EXPORT NSErrorDomain const NSCocoaErrorDomain; * by external factors (such as a resource file not being present) * rather than a programming error (where NSException should be used). */ +GS_EXPORT_CLASS @interface NSError : NSObject { #if GS_EXPOSE(NSError) diff --git a/Headers/Foundation/NSException.h b/Headers/Foundation/NSException.h index 8c11dafa2..567ed4537 100644 --- a/Headers/Foundation/NSException.h +++ b/Headers/Foundation/NSException.h @@ -110,6 +110,7 @@ extern "C" { message before the program terminates.

*/ +GS_EXPORT_CLASS @interface NSException : NSObject { #if GS_EXPOSE(NSException) @@ -420,6 +421,7 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler ); * The numbered macros arre obsolete, dating from a time when NSAssert() and * NSCAssert() did not support a variable number of arguments. */ +GS_EXPORT_CLASS @interface NSAssertionHandler : NSObject + (NSAssertionHandler*) currentHandler; diff --git a/Headers/Foundation/NSExpression.h b/Headers/Foundation/NSExpression.h index da7bc5ee5..d84ef1bd7 100644 --- a/Headers/Foundation/NSExpression.h +++ b/Headers/Foundation/NSExpression.h @@ -48,6 +48,7 @@ enum }; typedef NSUInteger NSExpressionType; +GS_EXPORT_CLASS @interface NSExpression : NSObject { #if GS_EXPOSE(NSExpression) diff --git a/Headers/Foundation/NSExtensionContext.h b/Headers/Foundation/NSExtensionContext.h index 10898add8..e8bc94276 100644 --- a/Headers/Foundation/NSExtensionContext.h +++ b/Headers/Foundation/NSExtensionContext.h @@ -37,7 +37,8 @@ DEFINE_BLOCK_TYPE(GSExtensionContextReturningItemsCompletionHandler, void, BOOL) DEFINE_BLOCK_TYPE(GSOpenURLCompletionHandler, void, BOOL); @class NSError, NSArray, NSURL; - + +GS_EXPORT_CLASS @interface NSExtensionContext : NSObject { NSArray *_inputItems; diff --git a/Headers/Foundation/NSExtensionItem.h b/Headers/Foundation/NSExtensionItem.h index 0ead0906d..b9fcb1d6d 100644 --- a/Headers/Foundation/NSExtensionItem.h +++ b/Headers/Foundation/NSExtensionItem.h @@ -34,7 +34,8 @@ extern "C" { #endif @class NSAttributedString, NSArray, NSDictionary; - + +GS_EXPORT_CLASS @interface NSExtensionItem : NSObject { NSAttributedString *_attributedTitle; diff --git a/Headers/Foundation/NSFileCoordinator.h b/Headers/Foundation/NSFileCoordinator.h index 6f63daaa0..31279f0d8 100644 --- a/Headers/Foundation/NSFileCoordinator.h +++ b/Headers/Foundation/NSFileCoordinator.h @@ -52,6 +52,7 @@ enum { }; typedef NSUInteger NSFileCoordinatorWritingOptions; +GS_EXPORT_CLASS @interface NSFileAccessIntent : NSObject { NSURL *_url; @@ -72,6 +73,7 @@ DEFINE_BLOCK_TYPE(GSDualWriteURLCallbackHandler, void, NSURL*, NSURL*); DEFINE_BLOCK_TYPE_NO_ARGS(GSBatchAccessorCompletionHandler, void); DEFINE_BLOCK_TYPE(GSBatchAccessorCompositeBlock, void, GSBatchAccessorCompletionHandler); +GS_EXPORT_CLASS @interface NSFileCoordinator : NSObject { id _purposeIdentifier; diff --git a/Headers/Foundation/NSFileHandle.h b/Headers/Foundation/NSFileHandle.h index 6380d32af..f78896527 100644 --- a/Headers/Foundation/NSFileHandle.h +++ b/Headers/Foundation/NSFileHandle.h @@ -41,6 +41,7 @@ extern "C" { @class NSString; @class NSURL; +GS_EXPORT_CLASS @interface NSFileHandle : NSObject // Allocating and Initializing a FileHandle Object @@ -163,6 +164,7 @@ GS_EXPORT NSString * const NSFileHandleNotificationMonitorModes; */ GS_EXPORT NSString * const NSFileHandleOperationException; +GS_EXPORT_CLASS @interface NSPipe : NSObject { #if GS_EXPOSE(NSPipe) diff --git a/Headers/Foundation/NSFileManager.h b/Headers/Foundation/NSFileManager.h index 7eac63f7b..c8efb3631 100644 --- a/Headers/Foundation/NSFileManager.h +++ b/Headers/Foundation/NSFileManager.h @@ -210,6 +210,7 @@ enum _NSDirectoryEnumerationOptions }; typedef NSUInteger NSDirectoryEnumerationOptions; +GS_EXPORT_CLASS @interface NSFileManager : NSObject { #if GS_EXPOSE(NSFileManager) @@ -557,6 +558,7 @@ typedef NSUInteger NSDirectoryEnumerationOptions; * and in the current implementation the natural order of the underlying * filesystem is used.

*/ +GS_EXPORT_CLASS @interface NSDirectoryEnumerator : NSEnumerator { #if GS_EXPOSE(NSDirectoryEnumerator) diff --git a/Headers/Foundation/NSFileVersion.h b/Headers/Foundation/NSFileVersion.h index 7a7e5ec76..2590daf42 100644 --- a/Headers/Foundation/NSFileVersion.h +++ b/Headers/Foundation/NSFileVersion.h @@ -42,6 +42,7 @@ enum { }; typedef NSUInteger NSFileVersionAddingOptions; +GS_EXPORT_CLASS @interface NSFileVersion : NSObject { @private diff --git a/Headers/Foundation/NSFileWrapper.h b/Headers/Foundation/NSFileWrapper.h index bb282dc7d..db56dba96 100644 --- a/Headers/Foundation/NSFileWrapper.h +++ b/Headers/Foundation/NSFileWrapper.h @@ -61,6 +61,7 @@ enum { typedef NSUInteger NSFileWrapperWritingOptions; #endif +GS_EXPORT_CLASS @interface NSFileWrapper : NSObject { NSString *_filename; diff --git a/Headers/Foundation/NSGarbageCollector.h b/Headers/Foundation/NSGarbageCollector.h index 9e68e6e19..2a2c7bb44 100644 --- a/Headers/Foundation/NSGarbageCollector.h +++ b/Headers/Foundation/NSGarbageCollector.h @@ -38,6 +38,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSGarbageCollector : NSObject /** Returns the garbage collector instance ... there is only one.
diff --git a/Headers/Foundation/NSHTTPCookie.h b/Headers/Foundation/NSHTTPCookie.h index 9c941f3bb..ebe1f4fce 100644 --- a/Headers/Foundation/NSHTTPCookie.h +++ b/Headers/Foundation/NSHTTPCookie.h @@ -63,6 +63,7 @@ extern NSString * const NSHTTPCookieVersion; /** Obtain cookie version */ * as originally produced by netscape, as well as more recent standardised * and versioned cookies. */ +GS_EXPORT_CLASS @interface NSHTTPCookie : NSObject { #if GS_EXPOSE(NSHTTPCookie) diff --git a/Headers/Foundation/NSHTTPCookieStorage.h b/Headers/Foundation/NSHTTPCookieStorage.h index ae032ed7e..4dc7082c5 100644 --- a/Headers/Foundation/NSHTTPCookieStorage.h +++ b/Headers/Foundation/NSHTTPCookieStorage.h @@ -67,7 +67,7 @@ extern NSString * const NSHTTPCookieManagerCookiesChangedNotification; * The NSHTTPCookieStorage class provides a shared instance which handles * the shared cookie store.
*/ - +GS_EXPORT_CLASS @interface NSHTTPCookieStorage : NSObject { #if GS_EXPOSE(NSHTTPCookieStorage) diff --git a/Headers/Foundation/NSHashTable.h b/Headers/Foundation/NSHashTable.h index 516a25fc3..86e6b7eb0 100644 --- a/Headers/Foundation/NSHashTable.h +++ b/Headers/Foundation/NSHashTable.h @@ -61,6 +61,7 @@ enum { typedef NSUInteger NSHashTableOptions; +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSHashTable, ElementT) : NSObject + (instancetype) hashTableWithOptions: (NSPointerFunctionsOptions)options; diff --git a/Headers/Foundation/NSHost.h b/Headers/Foundation/NSHost.h index 7df92e5db..341c7a05c 100644 --- a/Headers/Foundation/NSHost.h +++ b/Headers/Foundation/NSHost.h @@ -37,6 +37,7 @@ extern "C" { * Instances of this class encapsulate host information. Constructors based * on host name or numeric address are provided. */ +GS_EXPORT_CLASS @interface NSHost : NSObject { #if GS_EXPOSE(NSHost) diff --git a/Headers/Foundation/NSISO8601DateFormatter.h b/Headers/Foundation/NSISO8601DateFormatter.h index b3cd1434f..4c692a29f 100644 --- a/Headers/Foundation/NSISO8601DateFormatter.h +++ b/Headers/Foundation/NSISO8601DateFormatter.h @@ -59,7 +59,8 @@ enum typedef NSUInteger NSISO8601DateFormatOptions; @class NSTimeZone, NSString, NSDate, NSDateFormatter; - + +GS_EXPORT_CLASS @interface NSISO8601DateFormatter : NSFormatter { NSTimeZone *_timeZone; diff --git a/Headers/Foundation/NSInvocation.h b/Headers/Foundation/NSInvocation.h index 20a102a0e..b4137bb73 100644 --- a/Headers/Foundation/NSInvocation.h +++ b/Headers/Foundation/NSInvocation.h @@ -33,6 +33,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSInvocation : NSObject { #if GS_EXPOSE(NSInvocation) diff --git a/Headers/Foundation/NSInvocationOperation.h b/Headers/Foundation/NSInvocationOperation.h index 2df3b8082..ef4ecfa8b 100644 --- a/Headers/Foundation/NSInvocationOperation.h +++ b/Headers/Foundation/NSInvocationOperation.h @@ -36,6 +36,7 @@ extern "C" { @class NSInvocation; @class NSException; +GS_EXPORT_CLASS @interface NSInvocationOperation : NSOperation { @private diff --git a/Headers/Foundation/NSItemProvider.h b/Headers/Foundation/NSItemProvider.h index e9f82bff6..bfe879eff 100644 --- a/Headers/Foundation/NSItemProvider.h +++ b/Headers/Foundation/NSItemProvider.h @@ -90,6 +90,7 @@ typedef NSInteger NSItemProviderFileOptions; @end +GS_EXPORT_CLASS @interface NSItemProvider : NSObject - (instancetype) init; diff --git a/Headers/Foundation/NSItemProviderReadingWriting.h b/Headers/Foundation/NSItemProviderReadingWriting.h index e1589db38..9bb5ec0f2 100644 --- a/Headers/Foundation/NSItemProviderReadingWriting.h +++ b/Headers/Foundation/NSItemProviderReadingWriting.h @@ -33,6 +33,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSItemProviderReadingWriting : NSObject @end @@ -44,4 +45,3 @@ extern "C" { #endif /* GS_API_MACOSX */ #endif /* _NSItemProviderReadingWriting_h_GNUSTEP_BASE_INCLUDE */ - diff --git a/Headers/Foundation/NSJSONSerialization.h b/Headers/Foundation/NSJSONSerialization.h index 62f39c856..30cb109cc 100644 --- a/Headers/Foundation/NSJSONSerialization.h +++ b/Headers/Foundation/NSJSONSerialization.h @@ -45,6 +45,7 @@ typedef NSUInteger NSJSONReadingOptions; * NSJSONSerialization implements serializing and deserializing acyclic object * graphs in JSON. */ +GS_EXPORT_CLASS @interface NSJSONSerialization : NSObject + (NSData *)dataWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt diff --git a/Headers/Foundation/NSKeyedArchiver.h b/Headers/Foundation/NSKeyedArchiver.h index 69b070df2..033868a3b 100644 --- a/Headers/Foundation/NSKeyedArchiver.h +++ b/Headers/Foundation/NSKeyedArchiver.h @@ -50,6 +50,7 @@ extern "C" { * ...forKey: [NSCoder] methods, which provide for more robust * forwards and backwards compatibility. */ +GS_EXPORT_CLASS @interface NSKeyedArchiver : NSCoder { #if GS_EXPOSE(NSKeyedArchiver) @@ -250,6 +251,7 @@ extern "C" { * ...forKey: [NSCoder] methods, which provide for more robust * forwards and backwards compatibility. */ +GS_EXPORT_CLASS @interface NSKeyedUnarchiver : NSCoder { #if GS_EXPOSE(NSKeyedUnarchiver) diff --git a/Headers/Foundation/NSLengthFormatter.h b/Headers/Foundation/NSLengthFormatter.h index a40b73a1c..4fd57adaa 100644 --- a/Headers/Foundation/NSLengthFormatter.h +++ b/Headers/Foundation/NSLengthFormatter.h @@ -46,7 +46,8 @@ enum { typedef NSInteger NSLengthFormatterUnit; @class NSNumberFormatter, NSString; - + +GS_EXPORT_CLASS @interface NSLengthFormatter : NSFormatter { BOOL _isForPersonHeightUse; diff --git a/Headers/Foundation/NSLinguisticTagger.h b/Headers/Foundation/NSLinguisticTagger.h index 0125d3739..b0d95c692 100644 --- a/Headers/Foundation/NSLinguisticTagger.h +++ b/Headers/Foundation/NSLinguisticTagger.h @@ -107,7 +107,8 @@ typedef NSUInteger NSLinguisticTaggerOptions; DEFINE_BLOCK_TYPE(GSLinguisticTagRangeBoolBlock, void, NSLinguisticTag, NSRange, BOOL); DEFINE_BLOCK_TYPE(GSLinguisticTagRangeRangeBoolBlock, void, NSLinguisticTag, NSRange, NSRange, BOOL); - + +GS_EXPORT_CLASS @interface NSLinguisticTagger : NSObject { NSArray *_schemes; diff --git a/Headers/Foundation/NSLocale.h b/Headers/Foundation/NSLocale.h index 96d864a35..2741d6e02 100644 --- a/Headers/Foundation/NSLocale.h +++ b/Headers/Foundation/NSLocale.h @@ -98,6 +98,7 @@ GS_EXPORT NSString * const NSISO8601Calendar; * Provides information describing language, date and time, and currency * information. */ +GS_EXPORT_CLASS @interface NSLocale : NSObject { #if GS_EXPOSE(NSLocale) diff --git a/Headers/Foundation/NSLock.h b/Headers/Foundation/NSLock.h index 547e4f87b..03fd5a5d6 100644 --- a/Headers/Foundation/NSLock.h +++ b/Headers/Foundation/NSLock.h @@ -69,6 +69,7 @@ extern "C" { * [NSRecursiveLock], have different restrictions. *

*/ +GS_EXPORT_CLASS @interface NSLock : NSObject { #if GS_EXPOSE(NSLock) diff --git a/Headers/Foundation/NSMapTable.h b/Headers/Foundation/NSMapTable.h index ac1184b3f..fcd845ea7 100644 --- a/Headers/Foundation/NSMapTable.h +++ b/Headers/Foundation/NSMapTable.h @@ -59,6 +59,7 @@ enum { typedef NSUInteger NSMapTableOptions; +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSMapTable, KeyT, ValT) : NSObject diff --git a/Headers/Foundation/NSMassFormatter.h b/Headers/Foundation/NSMassFormatter.h index c7bfc0d77..7f55b8dcf 100644 --- a/Headers/Foundation/NSMassFormatter.h +++ b/Headers/Foundation/NSMassFormatter.h @@ -44,7 +44,8 @@ enum { typedef NSInteger NSMassFormatterUnit; @class NSNumberFormatter; - + +GS_EXPORT_CLASS @interface NSMassFormatter : NSObject { NSNumberFormatter *_numberFormatter; diff --git a/Headers/Foundation/NSMeasurement.h b/Headers/Foundation/NSMeasurement.h index 45ae7d184..6fb9083a6 100644 --- a/Headers/Foundation/NSMeasurement.h +++ b/Headers/Foundation/NSMeasurement.h @@ -34,7 +34,8 @@ extern "C" { #endif @class NSUnit; - + +GS_EXPORT_CLASS @interface NSMeasurement : NSObject { NSUnit *_unit; diff --git a/Headers/Foundation/NSMeasurementFormatter.h b/Headers/Foundation/NSMeasurementFormatter.h index 5032274b4..cc0faf147 100644 --- a/Headers/Foundation/NSMeasurementFormatter.h +++ b/Headers/Foundation/NSMeasurementFormatter.h @@ -41,7 +41,8 @@ enum { NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = (1UL << 2), }; typedef NSUInteger NSMeasurementFormatterUnitOptions; - + +GS_EXPORT_CLASS @interface NSMeasurementFormatter : NSFormatter { NSMeasurementFormatterUnitOptions _unitOptions; diff --git a/Headers/Foundation/NSMetadata.h b/Headers/Foundation/NSMetadata.h index 3412ec396..8fff01ffc 100644 --- a/Headers/Foundation/NSMetadata.h +++ b/Headers/Foundation/NSMetadata.h @@ -35,6 +35,7 @@ @class NSPredicate, NSMutableDictionary, NSDictionary, NSMutableArray; @protocol NSMetadataQueryDelegate; +GS_EXPORT_CLASS @interface NSMetadataItem : NSObject { #if GS_EXPOSE(NSMetadataItem) @@ -61,6 +62,7 @@ GS_EXPORT NSString * const NSMetadataQueryDidUpdateNotification; GS_EXPORT NSString * const NSMetadataQueryGatheringProgressNotification; /* Abstract interface for metadata query... */ +GS_EXPORT_CLASS @interface NSMetadataQuery : NSObject { #if GS_EXPOSE(NSMetadataQuery) @@ -135,6 +137,7 @@ GS_EXPORT NSString * const NSMetadataQueryGatheringProgressNotification; value: (id)attributeValue; @end +GS_EXPORT_CLASS @interface NSMetadataQueryAttributeValueTuple : NSObject { #if GS_EXPOSE(NSMetadataQueryAttributeValueTuple) @@ -150,6 +153,7 @@ GS_EXPORT NSString * const NSMetadataQueryGatheringProgressNotification; @end +GS_EXPORT_CLASS @interface NSMetadataQueryResultGroup : NSObject { #if GS_EXPOSE(NSMetadataQueryResultGroup) diff --git a/Headers/Foundation/NSMethodSignature.h b/Headers/Foundation/NSMethodSignature.h index a97181c0a..bdb803987 100644 --- a/Headers/Foundation/NSMethodSignature.h +++ b/Headers/Foundation/NSMethodSignature.h @@ -47,6 +47,7 @@ extern "C" { * self (type id, at position 0) and * _cmd (type SEL, at position 1).

*/ +GS_EXPORT_CLASS @interface NSMethodSignature : NSObject { #if GS_EXPOSE(NSMethodSignature) diff --git a/Headers/Foundation/NSNetServices.h b/Headers/Foundation/NSNetServices.h index fae871ecf..76cc63383 100644 --- a/Headers/Foundation/NSNetServices.h +++ b/Headers/Foundation/NSNetServices.h @@ -355,7 +355,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain; * superclass for concrete implementations of its functionality. *

*/ - +GS_EXPORT_CLASS @interface NSNetService : NSObject { #if GS_EXPOSE(NSNetService) @@ -441,7 +441,7 @@ GS_EXPORT NSString * const NSNetServicesErrorDomain; * functionality. *

*/ - +GS_EXPORT_CLASS @interface NSNetServiceBrowser : NSObject { #if GS_EXPOSE(NSNetServiceBrowser) diff --git a/Headers/Foundation/NSNotification.h b/Headers/Foundation/NSNotification.h index be7104570..890242214 100644 --- a/Headers/Foundation/NSNotification.h +++ b/Headers/Foundation/NSNotification.h @@ -44,7 +44,8 @@ extern "C" { @class NSOperationQueue; typedef NSString* NSNotificationName; - + +GS_EXPORT_CLASS @interface NSNotification : NSObject /* Creating a Notification Object */ @@ -68,6 +69,7 @@ typedef NSString* NSNotificationName; DEFINE_BLOCK_TYPE(GSNotificationBlock, void, NSNotification *); #endif +GS_EXPORT_CLASS @interface NSNotificationCenter : NSObject { #if GS_EXPOSE(NSNotificationCenter) diff --git a/Headers/Foundation/NSNotificationQueue.h b/Headers/Foundation/NSNotificationQueue.h index e2daad29f..d62a15912 100644 --- a/Headers/Foundation/NSNotificationQueue.h +++ b/Headers/Foundation/NSNotificationQueue.h @@ -107,6 +107,7 @@ typedef NSUInteger NSNotificationCoalescing; */ struct _NSNotificationQueueList; +GS_EXPORT_CLASS @interface NSNotificationQueue : NSObject { #if GS_EXPOSE(NSNotificationQueue) diff --git a/Headers/Foundation/NSNumberFormatter.h b/Headers/Foundation/NSNumberFormatter.h index 127dec0cf..59932dd79 100644 --- a/Headers/Foundation/NSNumberFormatter.h +++ b/Headers/Foundation/NSNumberFormatter.h @@ -118,6 +118,7 @@ typedef NSUInteger NSNumberFormatterRoundingMode; * of attributes for positive and negative numbers, and for specific cases * including 0, NaN, and nil...

*/ +GS_EXPORT_CLASS @interface NSNumberFormatter : NSFormatter { #if GS_EXPOSE(NSNumberFormatter) diff --git a/Headers/Foundation/NSObjCRuntime.h b/Headers/Foundation/NSObjCRuntime.h index 2bd0b9a2d..f15c65c0f 100644 --- a/Headers/Foundation/NSObjCRuntime.h +++ b/Headers/Foundation/NSObjCRuntime.h @@ -315,4 +315,9 @@ typedef NSString* NSExceptionName; #endif #endif +/* Undefine "interface" defined in Visual Studio MSVC headers. */ +#if defined(_MSC_VER) && defined(interface) +#undef interface +#endif + #endif /* __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/Foundation/NSObject.h b/Headers/Foundation/NSObject.h index 72a348b0f..000f7e4f8 100644 --- a/Headers/Foundation/NSObject.h +++ b/Headers/Foundation/NSObject.h @@ -288,7 +288,8 @@ extern "C" { @end -GS_ROOT_CLASS @interface NSObject +GS_EXPORT_CLASS GS_ROOT_CLASS +@interface NSObject { /** * Points to instance's class. Used by runtime to access method diff --git a/Headers/Foundation/NSObjectScripting.h b/Headers/Foundation/NSObjectScripting.h index b72ae3411..fa2dc8178 100644 --- a/Headers/Foundation/NSObjectScripting.h +++ b/Headers/Foundation/NSObjectScripting.h @@ -33,6 +33,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSObjectScripting : NSObject @end diff --git a/Headers/Foundation/NSOperation.h b/Headers/Foundation/NSOperation.h index e6b86df3b..46890129c 100644 --- a/Headers/Foundation/NSOperation.h +++ b/Headers/Foundation/NSOperation.h @@ -52,6 +52,7 @@ enum { typedef NSInteger NSOperationQueuePriority; +GS_EXPORT_CLASS @interface NSOperation : NSObject { #if GS_NONFRAGILE @@ -200,6 +201,7 @@ typedef NSInteger NSOperationQueuePriority; @end +GS_EXPORT_CLASS @interface NSBlockOperation : NSOperation { @private @@ -223,6 +225,7 @@ enum { NSOperationQueueDefaultMaxConcurrentOperationCount = -1 }; +GS_EXPORT_CLASS @interface NSOperationQueue : NSObject { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSOrderedSet.h b/Headers/Foundation/NSOrderedSet.h index 80fadaef4..d22d939cb 100644 --- a/Headers/Foundation/NSOrderedSet.h +++ b/Headers/Foundation/NSOrderedSet.h @@ -47,6 +47,7 @@ extern "C" { @class NSString; @class NSPredicate; +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSOrderedSet, __covariant ElementT) : NSObject { NSDictionary *_languageMap; diff --git a/Headers/Foundation/NSPersonNameComponents.h b/Headers/Foundation/NSPersonNameComponents.h index cf0292fb5..30226b4e2 100644 --- a/Headers/Foundation/NSPersonNameComponents.h +++ b/Headers/Foundation/NSPersonNameComponents.h @@ -31,6 +31,7 @@ @class NSString; +GS_EXPORT_CLASS @interface NSPersonNameComponents : NSObject { @private diff --git a/Headers/Foundation/NSPersonNameComponentsFormatter.h b/Headers/Foundation/NSPersonNameComponentsFormatter.h index 6f7d5a32a..2e8be798d 100644 --- a/Headers/Foundation/NSPersonNameComponentsFormatter.h +++ b/Headers/Foundation/NSPersonNameComponentsFormatter.h @@ -47,6 +47,7 @@ typedef NSUInteger NSPersonNameComponentsFormatterOptions; @class NSString; +GS_EXPORT_CLASS @interface NSPersonNameComponentsFormatter : NSFormatter { @private diff --git a/Headers/Foundation/NSPointerArray.h b/Headers/Foundation/NSPointerArray.h index b7734f450..b78654293 100644 --- a/Headers/Foundation/NSPointerArray.h +++ b/Headers/Foundation/NSPointerArray.h @@ -42,7 +42,7 @@ extern "C" { * The count can also be set causing the array to shrink (discarding items) * or grow (adding nil/zero items). */ - +GS_EXPORT_CLASS @interface NSPointerArray : NSObject /** Allocate an instance, initialise using initWithOptions: and diff --git a/Headers/Foundation/NSPointerFunctions.h b/Headers/Foundation/NSPointerFunctions.h index 506750775..821bf4c13 100644 --- a/Headers/Foundation/NSPointerFunctions.h +++ b/Headers/Foundation/NSPointerFunctions.h @@ -102,6 +102,7 @@ enum { */ typedef NSUInteger NSPointerFunctionsOptions; +GS_EXPORT_CLASS @interface NSPointerFunctions : NSObject + (id) pointerFunctionsWithOptions: (NSPointerFunctionsOptions)options; diff --git a/Headers/Foundation/NSPort.h b/Headers/Foundation/NSPort.h index 12f637a99..aa9fc5687 100644 --- a/Headers/Foundation/NSPort.h +++ b/Headers/Foundation/NSPort.h @@ -33,7 +33,7 @@ #import #import -#if defined(__MINGW__) +#if defined(_WIN32) #include #include #else @@ -72,6 +72,7 @@ extern "C" { *

This class also implements the functionality of the * NSMachPort class on OS X.

*/ +GS_EXPORT_CLASS @interface NSPort : NSObject { #if GS_EXPOSE(NSPort) @@ -197,6 +198,7 @@ typedef SOCKET NSSocketNativeHandle; * *

Note that this class is incompatible with the latest OS X version.

*/ +GS_EXPORT_CLASS @interface NSSocketPort : NSPort { #if GS_EXPOSE(NSSocketPort) @@ -206,7 +208,7 @@ typedef SOCKET NSSocketNativeHandle; uint16_t portNum; /* TCP port in host byte order. */ SOCKET listener; NSMapTable *handles; /* Handles indexed by socket. */ -#if defined(__MINGW__) +#if defined(_WIN32) WSAEVENT eventListener; NSMapTable *events; #endif @@ -279,6 +281,7 @@ typedef SOCKET NSSocketNativeHandle; * which can be used for interthread/interprocess communications * on the same host, but not between different hosts. */ +GS_EXPORT_CLASS @interface NSMessagePort : NSPort { #if GS_EXPOSE(NSMessagePort) diff --git a/Headers/Foundation/NSPortCoder.h b/Headers/Foundation/NSPortCoder.h index 74469a2f5..a42241768 100644 --- a/Headers/Foundation/NSPortCoder.h +++ b/Headers/Foundation/NSPortCoder.h @@ -48,6 +48,7 @@ extern "C" { //FIXME: the above is what Apple's docs say, but looking at the code the // NSConnection is actually created by this class rather than the other way // around, so maybe the docs should be changed.. +GS_EXPORT_CLASS @interface NSPortCoder : NSCoder { #if GS_EXPOSE(NSPortCoder) diff --git a/Headers/Foundation/NSPortNameServer.h b/Headers/Foundation/NSPortNameServer.h index b6fd46453..de4664a39 100644 --- a/Headers/Foundation/NSPortNameServer.h +++ b/Headers/Foundation/NSPortNameServer.h @@ -44,6 +44,7 @@ extern "C" { @class NSPort, NSString, NSMutableArray; +GS_EXPORT_CLASS @interface NSPortNameServer : NSObject + (id) systemDefaultPortNameServer; - (NSPort*) portForName: (NSString*)name; @@ -54,6 +55,7 @@ extern "C" { - (BOOL) removePortForName: (NSString*)name; @end +GS_EXPORT_CLASS @interface NSSocketPortNameServer : NSPortNameServer { #if GS_EXPOSE(NSSocketPortNameServer) @@ -79,6 +81,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSMessagePortNameServer : NSPortNameServer + (id) sharedInstance; diff --git a/Headers/Foundation/NSPredicate.h b/Headers/Foundation/NSPredicate.h index e493ec372..660a7b735 100644 --- a/Headers/Foundation/NSPredicate.h +++ b/Headers/Foundation/NSPredicate.h @@ -42,6 +42,7 @@ extern "C" { DEFINE_BLOCK_TYPE(GSBlockPredicateBlock, BOOL, id, GS_GENERIC_CLASS(NSDictionary,NSString*,id)*); #endif +GS_EXPORT_CLASS @interface NSPredicate : NSObject + (NSPredicate *) predicateWithFormat: (NSString *)format, ...; diff --git a/Headers/Foundation/NSProcessInfo.h b/Headers/Foundation/NSProcessInfo.h index 38352b472..592e6f77e 100644 --- a/Headers/Foundation/NSProcessInfo.h +++ b/Headers/Foundation/NSProcessInfo.h @@ -98,6 +98,7 @@ enum { #endif /* OS_API_VERSION(GS_API_MACOSX,GS_API_LATEST) */ +GS_EXPORT_CLASS @interface NSProcessInfo: NSObject /** diff --git a/Headers/Foundation/NSProgress.h b/Headers/Foundation/NSProgress.h index f16d5ecd9..b47d8088c 100644 --- a/Headers/Foundation/NSProgress.h +++ b/Headers/Foundation/NSProgress.h @@ -48,6 +48,7 @@ DEFINE_BLOCK_TYPE_NO_ARGS(NSProgressUnpublishingHandler, void); DEFINE_BLOCK_TYPE_NO_ARGS(GSProgressPendingUnitCountBlock, void); DEFINE_BLOCK_TYPE_NO_ARGS(GSProgressResumingHandler, void); +GS_EXPORT_CLASS @interface NSProgress : NSObject { #if GS_EXPOSE(NSProgress) diff --git a/Headers/Foundation/NSPropertyList.h b/Headers/Foundation/NSPropertyList.h index c815b2f45..8729ee830 100644 --- a/Headers/Foundation/NSPropertyList.h +++ b/Headers/Foundation/NSPropertyList.h @@ -229,6 +229,7 @@ typedef NSUInteger NSPropertyListFormat; * * */ +GS_EXPORT_CLASS @interface NSPropertyListSerialization : NSObject { } diff --git a/Headers/Foundation/NSProtocolChecker.h b/Headers/Foundation/NSProtocolChecker.h index fd525385a..f6a05fa1f 100644 --- a/Headers/Foundation/NSProtocolChecker.h +++ b/Headers/Foundation/NSProtocolChecker.h @@ -35,6 +35,7 @@ extern "C" { @class Protocol; +GS_EXPORT_CLASS @interface NSProtocolChecker : NSProxy { #if GS_EXPOSE(NSProtocolChecker) diff --git a/Headers/Foundation/NSProxy.h b/Headers/Foundation/NSProxy.h index 42d02b7bd..1af4b73b8 100644 --- a/Headers/Foundation/NSProxy.h +++ b/Headers/Foundation/NSProxy.h @@ -32,7 +32,8 @@ extern "C" { #endif -GS_ROOT_CLASS @interface NSProxy +GS_EXPORT_CLASS GS_ROOT_CLASS +@interface NSProxy { @public Class isa; diff --git a/Headers/Foundation/NSRegularExpression.h b/Headers/Foundation/NSRegularExpression.h index b1d03132e..74e3f08d9 100644 --- a/Headers/Foundation/NSRegularExpression.h +++ b/Headers/Foundation/NSRegularExpression.h @@ -86,6 +86,7 @@ DEFINE_BLOCK_TYPE(GSRegexBlock, void, NSTextCheckingResult*, * pattern, but it usually in the order of milliseconds. The preset 1500, * setting value to 0 disables the work limit. */ +GS_EXPORT_CLASS @interface NSRegularExpression : NSObject { #if GS_EXPOSE(NSRegularExpression) diff --git a/Headers/Foundation/NSRunLoop.h b/Headers/Foundation/NSRunLoop.h index 40e38044b..b2eb5f6a6 100644 --- a/Headers/Foundation/NSRunLoop.h +++ b/Headers/Foundation/NSRunLoop.h @@ -44,6 +44,7 @@ typedef NSString* NSRunLoopMode; GS_EXPORT NSRunLoopMode const NSDefaultRunLoopMode; GS_EXPORT NSRunLoopMode const NSRunLoopCommonModes; +GS_EXPORT_CLASS @interface NSRunLoop : NSObject { #if GS_EXPOSE(NSRunLoop) @@ -127,7 +128,7 @@ GS_EXPORT NSRunLoopMode const NSRunLoopCommonModes; * run loop. */ typedef enum { -#ifdef __MINGW__ +#ifdef _WIN32 ET_HANDLE, /* Watch for an I/O event on a handle. */ ET_RPORT, /* Watch for message arriving on port. */ ET_WINMSG, /* Watch for a message on a window handle. */ diff --git a/Headers/Foundation/NSScanner.h b/Headers/Foundation/NSScanner.h index a027cbdd1..ec13b1bd4 100644 --- a/Headers/Foundation/NSScanner.h +++ b/Headers/Foundation/NSScanner.h @@ -37,6 +37,7 @@ extern "C" { /* * NSScanner class */ +GS_EXPORT_CLASS @interface NSScanner : NSObject { #if GS_EXPOSE(NSScanner) diff --git a/Headers/Foundation/NSScriptClassDescription.h b/Headers/Foundation/NSScriptClassDescription.h index 389149c2c..be4b18171 100644 --- a/Headers/Foundation/NSScriptClassDescription.h +++ b/Headers/Foundation/NSScriptClassDescription.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptClassDescription : NSClassDescription @end diff --git a/Headers/Foundation/NSScriptCoercionHandler.h b/Headers/Foundation/NSScriptCoercionHandler.h index 6eef03376..a729716bf 100644 --- a/Headers/Foundation/NSScriptCoercionHandler.h +++ b/Headers/Foundation/NSScriptCoercionHandler.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptCoercionHandler : NSObject @end diff --git a/Headers/Foundation/NSScriptCommand.h b/Headers/Foundation/NSScriptCommand.h index ea7018c3c..addb45d22 100644 --- a/Headers/Foundation/NSScriptCommand.h +++ b/Headers/Foundation/NSScriptCommand.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptCommand : NSObject @end diff --git a/Headers/Foundation/NSScriptCommandDescription.h b/Headers/Foundation/NSScriptCommandDescription.h index 4b4d45a2d..0ddca7f15 100644 --- a/Headers/Foundation/NSScriptCommandDescription.h +++ b/Headers/Foundation/NSScriptCommandDescription.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptCommandDescription : NSObject @end diff --git a/Headers/Foundation/NSScriptExecutionContext.h b/Headers/Foundation/NSScriptExecutionContext.h index 12d1b4ead..748e04f37 100644 --- a/Headers/Foundation/NSScriptExecutionContext.h +++ b/Headers/Foundation/NSScriptExecutionContext.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptExecutionContext : NSObject @end diff --git a/Headers/Foundation/NSScriptKeyValueCoding.h b/Headers/Foundation/NSScriptKeyValueCoding.h index e91917e4a..ca9553ad6 100644 --- a/Headers/Foundation/NSScriptKeyValueCoding.h +++ b/Headers/Foundation/NSScriptKeyValueCoding.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptKeyValueCoding : NSObject @end diff --git a/Headers/Foundation/NSScriptObjectSpecifiers.h b/Headers/Foundation/NSScriptObjectSpecifiers.h index 47be660fa..3d6c9c1e7 100644 --- a/Headers/Foundation/NSScriptObjectSpecifiers.h +++ b/Headers/Foundation/NSScriptObjectSpecifiers.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptObjectSpecifiers : NSObject @end diff --git a/Headers/Foundation/NSScriptStandardSuiteCommands.h b/Headers/Foundation/NSScriptStandardSuiteCommands.h index a32ac0e7d..def75be00 100644 --- a/Headers/Foundation/NSScriptStandardSuiteCommands.h +++ b/Headers/Foundation/NSScriptStandardSuiteCommands.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptStandardSuiteCommands : NSObject @end diff --git a/Headers/Foundation/NSScriptSuiteRegistry.h b/Headers/Foundation/NSScriptSuiteRegistry.h index 44afe16d2..c0f2c77a1 100644 --- a/Headers/Foundation/NSScriptSuiteRegistry.h +++ b/Headers/Foundation/NSScriptSuiteRegistry.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSScriptSuiteRegistry : NSObject @end diff --git a/Headers/Foundation/NSSerialization.h b/Headers/Foundation/NSSerialization.h index c9c710e51..05428cbb2 100644 --- a/Headers/Foundation/NSSerialization.h +++ b/Headers/Foundation/NSSerialization.h @@ -70,6 +70,7 @@ extern "C" { * representation of a property list (NSArray or NSDictionary plus limited * contents).

*/ +GS_EXPORT_CLASS @interface NSSerializer: NSObject /** @@ -129,6 +130,7 @@ extern "C" { * property list (NSArray or NSDictionary plus limited contents) from a * byte-array (actually string) representation. */ +GS_EXPORT_CLASS @interface NSDeserializer: NSObject /** diff --git a/Headers/Foundation/NSSet.h b/Headers/Foundation/NSSet.h index efad268ef..a7c51aa22 100644 --- a/Headers/Foundation/NSSet.h +++ b/Headers/Foundation/NSSet.h @@ -43,6 +43,7 @@ extern "C" { @class GS_GENERIC_CLASS(NSDictionary, KeyT:id, ValT); @class NSString; +GS_EXPORT_CLASS @interface GS_GENERIC_CLASS(NSSet, __covariant ElementT) : NSObject { #if GS_EXPOSE(NSSortDescriptor) diff --git a/Headers/Foundation/NSSpellServer.h b/Headers/Foundation/NSSpellServer.h index 2074519dc..69c2843ce 100644 --- a/Headers/Foundation/NSSpellServer.h +++ b/Headers/Foundation/NSSpellServer.h @@ -53,6 +53,7 @@ GS_EXPORT NSString *const NSGrammarRange; GS_EXPORT NSString *const NSGrammarUserDescription; #endif +GS_EXPORT_CLASS @interface NSSpellServer : NSObject { #if GS_EXPOSE(NSSpellServer) diff --git a/Headers/Foundation/NSStream.h b/Headers/Foundation/NSStream.h index 3e885277a..8d69823f8 100644 --- a/Headers/Foundation/NSStream.h +++ b/Headers/Foundation/NSStream.h @@ -66,6 +66,7 @@ typedef NSUInteger NSStreamEvent; /** * NSStream is an abstract class for objects representing streams. */ +GS_EXPORT_CLASS @interface NSStream : NSObject /** diff --git a/Headers/Foundation/NSString.h b/Headers/Foundation/NSString.h index a5fa61e91..8182d5226 100644 --- a/Headers/Foundation/NSString.h +++ b/Headers/Foundation/NSString.h @@ -279,6 +279,8 @@ typedef NSUInteger NSStringEncodingConversionOptions; * that of the receiver which returned them. *

*/ + +GS_EXPORT_CLASS @interface NSString :NSObject + (id) string; @@ -855,6 +857,7 @@ typedef NSUInteger NSStringEncodingConversionOptions; @end +GS_EXPORT_CLASS @interface NSMutableString : NSString // Creating Temporary Strings @@ -916,6 +919,8 @@ typedef NSUInteger NSStringEncodingConversionOptions; * What follows is a dummy declaration of the class to keep the compiler * happy. */ + +GS_EXPORT_CLASS @interface NXConstantString : NSString { @public diff --git a/Headers/Foundation/NSTask.h b/Headers/Foundation/NSTask.h index c748fc69a..1a5e73b60 100644 --- a/Headers/Foundation/NSTask.h +++ b/Headers/Foundation/NSTask.h @@ -46,6 +46,7 @@ enum { typedef NSInteger NSTaskTerminationReason; #endif +GS_EXPORT_CLASS @interface NSTask : NSObject { #if GS_EXPOSE(NSTask) diff --git a/Headers/Foundation/NSTextCheckingResult.h b/Headers/Foundation/NSTextCheckingResult.h index f0e3ae97f..52ad3805d 100644 --- a/Headers/Foundation/NSTextCheckingResult.h +++ b/Headers/Foundation/NSTextCheckingResult.h @@ -65,6 +65,7 @@ enum * NSTextCheckingResult is an abstract class encapsulating the result of some * operation that checks */ +GS_EXPORT_CLASS @interface NSTextCheckingResult : NSObject #if GS_HAS_DECLARED_PROPERTIES @property(readonly) NSDictionary *addressComponents; diff --git a/Headers/Foundation/NSThread.h b/Headers/Foundation/NSThread.h index 032b40783..4bc9a6e45 100644 --- a/Headers/Foundation/NSThread.h +++ b/Headers/Foundation/NSThread.h @@ -54,6 +54,7 @@ extern "C" { * without threading. Non-threaded applications are more efficient * (no locking is required) and are easier to debug during development. */ +GS_EXPORT_CLASS @interface NSThread : NSObject { #if GS_EXPOSE(NSThread) diff --git a/Headers/Foundation/NSTimeZone.h b/Headers/Foundation/NSTimeZone.h index f9ed26db3..327ec1e7c 100644 --- a/Headers/Foundation/NSTimeZone.h +++ b/Headers/Foundation/NSTimeZone.h @@ -46,6 +46,7 @@ typedef NSInteger NSTimeZoneNameStyle; GS_EXPORT NSString * const NSSystemTimeZoneDidChangeNotification; #endif +GS_EXPORT_CLASS @interface NSTimeZone : NSObject //Creating and Initializing an NSTimeZone @@ -116,6 +117,7 @@ GS_EXPORT NSString * const NSSystemTimeZoneDidChangeNotification; @end #if OS_API_VERSION(GS_API_OPENSTEP, GS_API_MACOSX) +GS_EXPORT_CLASS @interface NSTimeZoneDetail : NSTimeZone - (BOOL) isDaylightSavingTimeZone; - (NSString*) timeZoneAbbreviation; diff --git a/Headers/Foundation/NSTimer.h b/Headers/Foundation/NSTimer.h index a2ec00023..6902723b1 100644 --- a/Headers/Foundation/NSTimer.h +++ b/Headers/Foundation/NSTimer.h @@ -42,6 +42,7 @@ extern "C" { * Other classes must not attempt to use instance variables as * they are subject to change. */ +GS_EXPORT_CLASS @interface NSTimer : NSObject { #if GS_EXPOSE(NSTimer) diff --git a/Headers/Foundation/NSURL.h b/Headers/Foundation/NSURL.h index e30ff95a4..dda356421 100644 --- a/Headers/Foundation/NSURL.h +++ b/Headers/Foundation/NSURL.h @@ -68,6 +68,7 @@ enum * Handling of the underlying resources is carried out by NSURLHandle * objects, but NSURL provides a simplified API wrapping these objects. */ +GS_EXPORT_CLASS @interface NSURL: NSObject { #if GS_EXPOSE(NSURL) @@ -610,6 +611,7 @@ GS_EXPORT NSString* const NSURLUbiquitousItemDownloadingStatusCurrent; #if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSURLQueryItem : NSObject { #if GS_EXPOSE(NSURLQueryItem) @@ -643,7 +645,8 @@ GS_NSURLQueryItem_IVARS; #endif // OS_API_VERSION #if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST) - + +GS_EXPORT_CLASS @interface NSURLComponents : NSObject { #if GS_EXPOSE(NSURLComponents) diff --git a/Headers/Foundation/NSURLAuthenticationChallenge.h b/Headers/Foundation/NSURLAuthenticationChallenge.h index e83a43dd2..73bae2804 100644 --- a/Headers/Foundation/NSURLAuthenticationChallenge.h +++ b/Headers/Foundation/NSURLAuthenticationChallenge.h @@ -77,6 +77,7 @@ extern "C" { * Class to represent an authentication challenge and indicate when the * challenge is complete. */ +GS_EXPORT_CLASS @interface NSURLAuthenticationChallenge : NSObject { #if GS_EXPOSE(NSURLAuthenticationChallenge) diff --git a/Headers/Foundation/NSURLCache.h b/Headers/Foundation/NSURLCache.h index 97a90eee2..f2486d5cf 100644 --- a/Headers/Foundation/NSURLCache.h +++ b/Headers/Foundation/NSURLCache.h @@ -54,6 +54,7 @@ typedef enum /** * Encapsulates a cached response to a URL load request. */ +GS_EXPORT_CLASS @interface NSCachedURLResponse : NSObject { #if GS_EXPOSE(NSCachedURLResponse) @@ -100,6 +101,7 @@ typedef enum @end +GS_EXPORT_CLASS @interface NSURLCache : NSObject { #if GS_EXPOSE(NSURLCache) diff --git a/Headers/Foundation/NSURLConnection.h b/Headers/Foundation/NSURLConnection.h index ff2eac3c1..12c184999 100644 --- a/Headers/Foundation/NSURLConnection.h +++ b/Headers/Foundation/NSURLConnection.h @@ -44,6 +44,7 @@ extern "C" { /** */ +GS_EXPORT_CLASS @interface NSURLConnection : NSObject { #if GS_EXPOSE(NSURLConnection) diff --git a/Headers/Foundation/NSURLCredential.h b/Headers/Foundation/NSURLCredential.h index 1e5d245c5..d0c180466 100644 --- a/Headers/Foundation/NSURLCredential.h +++ b/Headers/Foundation/NSURLCredential.h @@ -51,6 +51,7 @@ typedef enum { /** * Represents a user/password credential */ +GS_EXPORT_CLASS @interface NSURLCredential : NSObject { #if GS_EXPOSE(NSURLCredential) diff --git a/Headers/Foundation/NSURLCredentialStorage.h b/Headers/Foundation/NSURLCredentialStorage.h index 777f79f8c..6bb52b44e 100644 --- a/Headers/Foundation/NSURLCredentialStorage.h +++ b/Headers/Foundation/NSURLCredentialStorage.h @@ -47,6 +47,7 @@ extern NSString *const NSURLCredentialStorageChangedNotification; /** * Provides shared storage of credentials. */ +GS_EXPORT_CLASS @interface NSURLCredentialStorage : NSObject { #if GS_EXPOSE(NSURLCredentialStorage) diff --git a/Headers/Foundation/NSURLDownload.h b/Headers/Foundation/NSURLDownload.h index d060375d9..4ee4ba48e 100644 --- a/Headers/Foundation/NSURLDownload.h +++ b/Headers/Foundation/NSURLDownload.h @@ -44,6 +44,7 @@ extern "C" { /** * Handles download to file. */ +GS_EXPORT_CLASS @interface NSURLDownload : NSObject { #if GS_EXPOSE(NSURLDownload) diff --git a/Headers/Foundation/NSURLHandle.h b/Headers/Foundation/NSURLHandle.h index 7ad045589..b426ff034 100644 --- a/Headers/Foundation/NSURLHandle.h +++ b/Headers/Foundation/NSURLHandle.h @@ -177,6 +177,7 @@ typedef NSUInteger NSURLHandleStatus; - (void) URLHandleResourceDidFinishLoading: (NSURLHandle*)sender; @end +GS_EXPORT_CLASS @interface NSURLHandle : NSObject { #if GS_EXPOSE(NSURLHandle) diff --git a/Headers/Foundation/NSURLProtectionSpace.h b/Headers/Foundation/NSURLProtectionSpace.h index 5f8654e9b..74ee68f21 100644 --- a/Headers/Foundation/NSURLProtectionSpace.h +++ b/Headers/Foundation/NSURLProtectionSpace.h @@ -67,6 +67,7 @@ extern NSString * const NSURLAuthenticationMethodServerTrust; * Class to encapsulate a protection space ... where authentication is * required. */ +GS_EXPORT_CLASS @interface NSURLProtectionSpace : NSObject { #if GS_EXPOSE(NSURLProtectionSpace) diff --git a/Headers/Foundation/NSURLProtocol.h b/Headers/Foundation/NSURLProtocol.h index 1cd11408f..7f85d40e9 100644 --- a/Headers/Foundation/NSURLProtocol.h +++ b/Headers/Foundation/NSURLProtocol.h @@ -117,6 +117,7 @@ extern "C" { * ever be done by other classes within the URL loading system. *

*/ +GS_EXPORT_CLASS @interface NSURLProtocol : NSObject { #if GS_EXPOSE(NSURLProtocol) diff --git a/Headers/Foundation/NSURLRequest.h b/Headers/Foundation/NSURLRequest.h index 91a525100..a6956bfd7 100644 --- a/Headers/Foundation/NSURLRequest.h +++ b/Headers/Foundation/NSURLRequest.h @@ -87,6 +87,7 @@ typedef NSUInteger NSURLRequestCachePolicy; * URL, how to cache the results, and when to deal with a slow/hung * load process by timing out. */ +GS_EXPORT_CLASS @interface NSURLRequest : NSObject { #if GS_EXPOSE(NSURLRequest) @@ -155,6 +156,7 @@ typedef NSUInteger NSURLRequestCachePolicy; /** */ +GS_EXPORT_CLASS @interface NSMutableURLRequest : NSURLRequest /** diff --git a/Headers/Foundation/NSURLResponse.h b/Headers/Foundation/NSURLResponse.h index 00de3b381..1e97193ff 100644 --- a/Headers/Foundation/NSURLResponse.h +++ b/Headers/Foundation/NSURLResponse.h @@ -44,6 +44,7 @@ extern "C" { /** * The response to an NSURLRequest */ +GS_EXPORT_CLASS @interface NSURLResponse : NSObject { #if GS_EXPOSE(NSURLResponse) @@ -114,6 +115,7 @@ extern "C" { /** * HTTP specific additions to an NSURLResponse */ +GS_EXPORT_CLASS @interface NSHTTPURLResponse : NSURLResponse /** diff --git a/Headers/Foundation/NSURLSession.h b/Headers/Foundation/NSURLSession.h index 40af03ac5..c642beaf3 100644 --- a/Headers/Foundation/NSURLSession.h +++ b/Headers/Foundation/NSURLSession.h @@ -51,6 +51,7 @@ * task most commonly associated with retrieving objects for immediate parsing * by the consumer. */ +GS_EXPORT_CLASS @interface NSURLSession : NSObject { NSOperationQueue *_delegateQueue; @@ -127,6 +128,7 @@ typedef NS_ENUM(NSUInteger, NSURLSessionTaskState) { * NSURLSessionTask - a cancelable object that refers to the lifetime * of processing a given request. */ +GS_EXPORT_CLASS @interface NSURLSessionTask : NSObject { /** An identifier for this task, assigned by and unique @@ -238,16 +240,20 @@ typedef NS_ENUM(NSUInteger, NSURLSessionTaskState) { @end +GS_EXPORT_CLASS @interface NSURLSessionDataTask : NSURLSessionTask @end +GS_EXPORT_CLASS @interface NSURLSessionUploadTask : NSURLSessionDataTask @end +GS_EXPORT_CLASS @interface NSURLSessionDownloadTask : NSURLSessionTask @end #if OS_API_VERSION(MAC_OS_X_VERSION_10_11,GS_API_LATEST) +GS_EXPORT_CLASS @interface NSURLSessionStreamTask : NSURLSessionTask @end #endif @@ -257,6 +263,7 @@ typedef NS_ENUM(NSUInteger, NSURLSessionTaskState) { * created, a copy of the configuration object is made - you cannot * modify the configuration of a session after it has been created. */ +GS_EXPORT_CLASS @interface NSURLSessionConfiguration : NSObject { NSURLCache *_URLCache; diff --git a/Headers/Foundation/NSUUID.h b/Headers/Foundation/NSUUID.h index 1513be6e6..2757b4f18 100644 --- a/Headers/Foundation/NSUUID.h +++ b/Headers/Foundation/NSUUID.h @@ -44,6 +44,7 @@ typedef uint8_t gsuuid_t[16]; @class NSString; +GS_EXPORT_CLASS @interface NSUUID : NSObject { @private diff --git a/Headers/Foundation/NSUbiquitousKeyValueStore.h b/Headers/Foundation/NSUbiquitousKeyValueStore.h index 6a6a04a64..02b204bbc 100644 --- a/Headers/Foundation/NSUbiquitousKeyValueStore.h +++ b/Headers/Foundation/NSUbiquitousKeyValueStore.h @@ -40,6 +40,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSUbiquitousKeyValueStore : NSObject // Getting the Shared Instance @@ -107,12 +108,12 @@ extern "C" { // A dictionary containing all of the key-value pairs in the key-value store. - (NSDictionary *) dictionaryRepresentation; +@end + // Notifications & constants GS_EXPORT NSString* const NSUbiquitousKeyValueStoreDidChangeExternallyNotification; GS_EXPORT NSString* const NSUbiquitousKeyValueStoreChangeReasonKey; -@end - #if defined(__cplusplus) } #endif diff --git a/Headers/Foundation/NSUndoManager.h b/Headers/Foundation/NSUndoManager.h index 07e0b4ef4..e761cc054 100644 --- a/Headers/Foundation/NSUndoManager.h +++ b/Headers/Foundation/NSUndoManager.h @@ -82,6 +82,7 @@ GS_EXPORT NSString* const NSUndoManagerWillRedoChangeNotification; */ GS_EXPORT NSString* const NSUndoManagerWillUndoChangeNotification; +GS_EXPORT_CLASS @interface NSUndoManager : NSObject { #if GS_EXPOSE(NSUndoManager) diff --git a/Headers/Foundation/NSUnit.h b/Headers/Foundation/NSUnit.h index 3c661ac09..61a9449a1 100644 --- a/Headers/Foundation/NSUnit.h +++ b/Headers/Foundation/NSUnit.h @@ -34,12 +34,14 @@ extern "C" { #endif // Unit converter +GS_EXPORT_CLASS @interface NSUnitConverter : NSObject - (double) baseUnitValueFromValue: (double)value; - (double) valueFromBaseUnitValue: (double)baseUnitValue; @end // Linea converter... for things like C <-> F conversion... +GS_EXPORT_CLASS @interface NSUnitConverterLinear : NSUnitConverter { double _coefficient; @@ -53,6 +55,7 @@ extern "C" { @end // Units... abstract... +GS_EXPORT_CLASS @interface NSUnit : NSObject { NSString *_symbol; @@ -65,6 +68,7 @@ extern "C" { @end // Dimension using units.... +GS_EXPORT_CLASS @interface NSDimension : NSUnit { double _value; @@ -78,6 +82,7 @@ extern "C" { @end // Predefined.... +GS_EXPORT_CLASS @interface NSUnitAcceleration : NSDimension /* Base unit - metersPerSecondSquared @@ -88,6 +93,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitAngle : NSDimension /* Base unit - degrees @@ -102,6 +108,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitArea : NSDimension /* Base unit - squareMeters @@ -124,6 +131,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitConcentrationMass : NSDimension /* Base unit - gramsPerLiter @@ -136,6 +144,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitDispersion : NSDimension /* Base unit - partsPerMillion @@ -144,6 +153,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitDuration : NSDimension /* Base unit - seconds @@ -155,6 +165,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitElectricCharge : NSDimension /* Base unit - coulombs @@ -169,6 +180,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitElectricCurrent : NSDimension /* Base unit - amperes @@ -182,6 +194,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitElectricPotentialDifference : NSDimension /* Base unit - volts @@ -195,6 +208,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitElectricResistance : NSDimension /* Base unit - ohms @@ -208,6 +222,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitEnergy : NSDimension /* Base unit - joules @@ -221,6 +236,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitFrequency : NSDimension /* Base unit - hertz @@ -237,6 +253,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitFuelEfficiency : NSDimension /* Base unit - litersPer100Kilometers @@ -248,6 +265,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitLength : NSDimension /* Base unit - meters @@ -278,6 +296,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitIlluminance : NSDimension /* Base unit - lux @@ -287,6 +306,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitMass : NSDimension /* Base unit - kilograms @@ -311,6 +331,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitPower : NSDimension /* Base unit - watts @@ -330,6 +351,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitPressure : NSDimension /* Base unit - newtonsPerMetersSquared (equivalent to 1 pascal) @@ -348,6 +370,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitSpeed : NSDimension /* Base unit - metersPerSecond @@ -360,6 +383,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitTemperature : NSDimension /* Base unit - kelvin @@ -371,6 +395,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface NSUnitVolume : NSDimension /* Base unit - liters diff --git a/Headers/Foundation/NSUserActivity.h b/Headers/Foundation/NSUserActivity.h index 5b16a9c5a..5b5889dd9 100644 --- a/Headers/Foundation/NSUserActivity.h +++ b/Headers/Foundation/NSUserActivity.h @@ -33,6 +33,7 @@ extern "C" { #endif +GS_EXPORT_CLASS @interface NSUserActivity : NSObject @end diff --git a/Headers/Foundation/NSUserDefaults.h b/Headers/Foundation/NSUserDefaults.h index a5484b8f5..be77f5cf5 100644 --- a/Headers/Foundation/NSUserDefaults.h +++ b/Headers/Foundation/NSUserDefaults.h @@ -212,6 +212,7 @@ GS_EXPORT NSString* const GSLocale; - write docs : -( */ +GS_EXPORT_CLASS @interface NSUserDefaults : NSObject { #if GS_EXPOSE(NSUserDefaults) diff --git a/Headers/Foundation/NSUserNotification.h b/Headers/Foundation/NSUserNotification.h index 261aad84e..788829d22 100644 --- a/Headers/Foundation/NSUserNotification.h +++ b/Headers/Foundation/NSUserNotification.h @@ -54,6 +54,7 @@ enum typedef NSInteger NSUserNotificationActivationType; +GS_EXPORT_CLASS @interface NSUserNotification : NSObject { #if GS_EXPOSE(NSUserNotification) @@ -93,6 +94,7 @@ typedef NSInteger NSUserNotificationActivationType; GS_EXPORT NSString * const NSUserNotificationDefaultSoundName; +GS_EXPORT_CLASS @interface NSUserNotificationCenter : NSObject { #if GS_EXPOSE(NSUserNotificationCenter) diff --git a/Headers/Foundation/NSUserScriptTask.h b/Headers/Foundation/NSUserScriptTask.h index 010722bfd..ff5a92d2c 100644 --- a/Headers/Foundation/NSUserScriptTask.h +++ b/Headers/Foundation/NSUserScriptTask.h @@ -34,6 +34,7 @@ extern "C" { #if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) +GS_EXPORT_CLASS @interface NSUserScriptTask : NSObject @end diff --git a/Headers/Foundation/NSValue.h b/Headers/Foundation/NSValue.h index 39b310ddd..d048d7ddd 100644 --- a/Headers/Foundation/NSValue.h +++ b/Headers/Foundation/NSValue.h @@ -45,6 +45,7 @@ extern "C" { * be careful this does not get freed until after the NSValue is * no longer used. */ +GS_EXPORT_CLASS @interface NSValue : NSObject // Allocating and Initializing @@ -173,6 +174,7 @@ extern "C" { * and accessing as any C primitive numeric type. On access, the value will * be type-converted if necessary, using standard C conversion rules. */ +GS_EXPORT_CLASS @interface NSNumber : NSValue // Allocating and Initializing diff --git a/Headers/Foundation/NSValueTransformer.h b/Headers/Foundation/NSValueTransformer.h index ef2238a1f..7ae5c0f44 100644 --- a/Headers/Foundation/NSValueTransformer.h +++ b/Headers/Foundation/NSValueTransformer.h @@ -62,6 +62,7 @@ GS_EXPORT NSString* const NSUnarchiveFromDataTransformerName; * abstract and its methods must be overridden by subclasses to do * the actual work. */ +GS_EXPORT_CLASS @interface NSValueTransformer : NSObject /** diff --git a/Headers/Foundation/NSXMLDTD.h b/Headers/Foundation/NSXMLDTD.h index 6cb8eb0dd..95afc459d 100644 --- a/Headers/Foundation/NSXMLDTD.h +++ b/Headers/Foundation/NSXMLDTD.h @@ -39,6 +39,7 @@ extern "C" { /** * Encapsulates document type definition data. */ +GS_EXPORT_CLASS @interface NSXMLDTD : NSXMLNode { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSXMLDTDNode.h b/Headers/Foundation/NSXMLDTDNode.h index 855c5610b..26b92947c 100644 --- a/Headers/Foundation/NSXMLDTDNode.h +++ b/Headers/Foundation/NSXMLDTDNode.h @@ -73,6 +73,7 @@ typedef NSUInteger NSXMLDTDNodeKind; * nil * */ +GS_EXPORT_CLASS @interface NSXMLDTDNode : NSXMLNode { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSXMLDocument.h b/Headers/Foundation/NSXMLDocument.h index bac5825ef..f4d23bd8d 100644 --- a/Headers/Foundation/NSXMLDocument.h +++ b/Headers/Foundation/NSXMLDocument.h @@ -72,6 +72,7 @@ typedef NSUInteger NSXMLDocumentContentKind; * An XMLDocument encapsulates an entire document. * This must contain a single element node. */ +GS_EXPORT_CLASS @interface NSXMLDocument : NSXMLNode { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSXMLElement.h b/Headers/Foundation/NSXMLElement.h index e18cc2a3a..9b0ec2895 100644 --- a/Headers/Foundation/NSXMLElement.h +++ b/Headers/Foundation/NSXMLElement.h @@ -37,6 +37,7 @@ extern "C" { /** * Represents an XML element.
*/ +GS_EXPORT_CLASS @interface NSXMLElement : NSXMLNode { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSXMLNode.h b/Headers/Foundation/NSXMLNode.h index aa405814f..f454af0db 100644 --- a/Headers/Foundation/NSXMLNode.h +++ b/Headers/Foundation/NSXMLNode.h @@ -86,6 +86,7 @@ typedef NSUInteger NSXMLNodeKind; /** * The most primitive unit in an XML document. */ +GS_EXPORT_CLASS @interface NSXMLNode : NSObject { #if GS_NONFRAGILE diff --git a/Headers/Foundation/NSXMLParser.h b/Headers/Foundation/NSXMLParser.h index f3c540fad..9d33b9ab3 100644 --- a/Headers/Foundation/NSXMLParser.h +++ b/Headers/Foundation/NSXMLParser.h @@ -67,6 +67,7 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain; * to handle the parsing process. *

*/ +GS_EXPORT_CLASS @interface NSXMLParser : NSObject { #if GS_EXPOSE(NSXMLParser) diff --git a/Headers/Foundation/NSXPCConnection.h b/Headers/Foundation/NSXPCConnection.h index 4a286c9f6..3301ac8c2 100644 --- a/Headers/Foundation/NSXPCConnection.h +++ b/Headers/Foundation/NSXPCConnection.h @@ -32,7 +32,10 @@ #if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST) -#if defined (__MINGW__) +#if defined(_WIN32) +#if defined(_MSC_VER) +typedef unsigned pid_t; +#endif typedef unsigned gid_t; typedef unsigned uid_t; #endif @@ -66,6 +69,7 @@ enum }; typedef NSUInteger NSXPCConnectionOptions; +GS_EXPORT_CLASS @interface NSXPCConnection : NSObject - (instancetype) initWithListenerEndpoint: (NSXPCListenerEndpoint *)endpoint; @@ -172,6 +176,7 @@ typedef NSUInteger NSXPCConnectionOptions; @end +GS_EXPORT_CLASS @interface NSXPCListenerEndpoint : NSObject // NSSecureCoding @end @@ -182,4 +187,3 @@ typedef NSUInteger NSXPCConnectionOptions; #endif /* GS_API_MACOSX */ #endif /* _NSXPCConnection_h_GNUSTEP_BASE_INCLUDE */ - diff --git a/Headers/GNUstepBase/CXXException.h b/Headers/GNUstepBase/CXXException.h index 3edb501fb..fb78516c9 100644 --- a/Headers/GNUstepBase/CXXException.h +++ b/Headers/GNUstepBase/CXXException.h @@ -12,6 +12,7 @@ struct _Unwind_Exception; * The caught instance will be autoreleased and does not need to be manually * freed. */ +GS_EXPORT_CLASS @interface CXXException : NSObject { /** Exception object, as defined by the CodeSourcery exception ABI. */ diff --git a/Headers/GNUstepBase/GCObject.h b/Headers/GNUstepBase/GCObject.h index 69af1c9d7..10d6dafb8 100644 --- a/Headers/GNUstepBase/GCObject.h +++ b/Headers/GNUstepBase/GCObject.h @@ -56,6 +56,7 @@ typedef struct { } flags; } gcInfo; +GS_EXPORT_CLASS @interface GCObject : NSObject { gcInfo gc; @@ -81,6 +82,7 @@ typedef struct { - (void) gcSetVisited: (BOOL)flag; @end +GS_EXPORT_CLASS @interface GCArray : NSArray { gcInfo gc; @@ -90,7 +92,7 @@ typedef struct { } @end - +GS_EXPORT_CLASS @interface GCMutableArray : NSMutableArray { gcInfo gc; @@ -101,6 +103,7 @@ typedef struct { } @end +GS_EXPORT_CLASS @interface GCDictionary : NSDictionary { gcInfo gc; @@ -108,6 +111,7 @@ typedef struct { } @end +GS_EXPORT_CLASS @interface GCMutableDictionary : NSMutableDictionary { gcInfo gc; diff --git a/Headers/GNUstepBase/GSConfig.h.in b/Headers/GNUstepBase/GSConfig.h.in index 89d927847..673f83603 100644 --- a/Headers/GNUstepBase/GSConfig.h.in +++ b/Headers/GNUstepBase/GSConfig.h.in @@ -295,34 +295,42 @@ typedef struct { #endif #if defined(_WIN32) -#define BOOL WinBOOL -#define __OBJC_BOOL 1 -#include -#ifndef _WIN32_WINNT -#define _WIN32_WINNT Windows2000 -#endif -#if !defined(WINVER) -#define WINVER Windows2000 -#elif (WINVER < Windows2000) -#undef WINVER -#define WINVER Windows2000 -#endif +# define BOOL WinBOOL +# define __OBJC_BOOL 1 + +# if defined(__MINGW__) +# include +# define GS_WINVER Windows2000 +# elif defined(_MSC_VER) +# include +# define GS_WINVER _WIN32_WINNT_WIN10 +# endif + +# ifndef _WIN32_WINNT +# define _WIN32_WINNT GS_WINVER +# endif +# if !defined(WINVER) +# define WINVER GS_WINVER +# elif (WINVER < GS_WINVER) +# undef WINVER +# define WINVER GS_WINVER +# endif // Trick to distinguish between MSYS/MinGW and MSYS2/MinGW32, the latter defines // __MINGW32_MAJOR_VERSION and __MINGW32_MINOR_VERSION for compatibility // but to a lower version than older MSYS/MinGW, but not the compound version // -#if defined(__MINGW32_VERSION) -#define __USE_W32_SOCKETS -#include -#include -#else -#include -#include -#endif +# if defined(__MINGW32_VERSION) +# define __USE_W32_SOCKETS +# include +# include +# else +# include +# include +# endif -#undef __OBJC_BOOL -#undef BOOL +# undef __OBJC_BOOL +# undef BOOL #endif /* Include the blocks runtime header if it's available (It shouldn't matter diff --git a/Headers/GNUstepBase/GSMime.h b/Headers/GNUstepBase/GSMime.h index 856014f3b..158b729b7 100644 --- a/Headers/GNUstepBase/GSMime.h +++ b/Headers/GNUstepBase/GSMime.h @@ -56,6 +56,7 @@ extern "C" { * A trivial class for mantaining state while decoding/encoding data. * Each encoding type requires its own subclass. */ +GS_EXPORT_CLASS @interface GSMimeCodingContext : NSObject { BOOL atEnd; /* Flag to say that data has ended. */ @@ -67,6 +68,7 @@ extern "C" { - (void) setAtEnd: (BOOL)flag; @end +GS_EXPORT_CLASS @interface GSMimeHeader : NSObject { #if GS_EXPOSE(GSMimeHeader) @@ -124,7 +126,7 @@ extern "C" { - (NSString*) value; @end - +GS_EXPORT_CLASS @interface GSMimeDocument : NSObject { #if GS_EXPOSE(GSMimeDocument) @@ -216,6 +218,7 @@ extern "C" { @end +GS_EXPORT_CLASS @interface GSMimeParser : NSObject { #if GS_EXPOSE(GSMimeParser) @@ -297,6 +300,7 @@ extern "C" { * in a form suitable for sending as an Email over the SMTP protocol * or in other forms. */ +GS_EXPORT_CLASS @interface GSMimeSerializer : NSObject { NSUInteger foldAt; /** Fold long lines at this position */ @@ -402,6 +406,7 @@ typedef enum { /** The GSMimeSMTPClient class provides the ability to send EMails * ([GSMimeDocument] instances) via an SMTP server. */ +GS_EXPORT_CLASS @interface GSMimeSMTPClient : NSObject { #if GS_NONFRAGILE diff --git a/Headers/GNUstepBase/GSTLS.h b/Headers/GNUstepBase/GSTLS.h index aaa9ca676..9dc79b33b 100644 --- a/Headers/GNUstepBase/GSTLS.h +++ b/Headers/GNUstepBase/GSTLS.h @@ -60,6 +60,7 @@ extern NSString * const GSTLSVerify; * and key information in memory by associating a 'filename' with the * cached data. */ +GS_EXPORT_CLASS @interface GSTLSObject : NSObject /** Returns either the cached data for this file name (if any), or the @@ -82,6 +83,7 @@ extern NSString * const GSTLSVerify; /* This class provides the current autogenerated Diffie Hellman parameters * for server negotiation and/or parameters laoded from file. */ +GS_EXPORT_CLASS @interface GSTLSDHParams : GSTLSObject { NSTimeInterval when; @@ -109,6 +111,7 @@ extern NSString * const GSTLSVerify; /* Manage certificate lists (for servers and clients) and also provide * DH params. */ +GS_EXPORT_CLASS @interface GSTLSCertificateList : GSTLSObject { NSTimeInterval when; @@ -137,6 +140,7 @@ extern NSString * const GSTLSVerify; /* This encapsulates private keys used to unlock certificates */ +GS_EXPORT_CLASS @interface GSTLSPrivateKey : GSTLSObject { NSTimeInterval when; @@ -150,6 +154,7 @@ extern NSString * const GSTLSVerify; /* This encapsulates a credentials setup for a sessions */ +GS_EXPORT_CLASS @interface GSTLSCredentials : GSTLSObject { NSTimeInterval when; @@ -187,6 +192,7 @@ typedef ssize_t (*GSTLSIOW)(gnutls_transport_ptr_t, const void *, size_t); * defining how they will operate. The handle, pushFunc and pullFunc * provide the I/O mechanism. */ +GS_EXPORT_CLASS @interface GSTLSSession : GSTLSObject { NSDictionary *opts; diff --git a/Headers/GNUstepBase/GSVersionMacros.h b/Headers/GNUstepBase/GSVersionMacros.h index 9497f65eb..d6c4510aa 100644 --- a/Headers/GNUstepBase/GSVersionMacros.h +++ b/Headers/GNUstepBase/GSVersionMacros.h @@ -384,19 +384,28 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; } /* On Mingw, the compiler will export all symbols automatically, so * __declspec(dllexport) is not needed. */ +# define GS_EXPORT_CLASS # define GS_EXPORT extern # define GS_DECLARE # else -# define GS_EXPORT __declspec(dllexport) +# define GS_EXPORT_CLASS __declspec(dllexport) +# define GS_EXPORT extern __declspec(dllexport) # define GS_DECLARE __declspec(dllexport) # endif #else +# if defined(__MINGW__) + /* MinGW does not need dllimport on ObjC classes and produces warnings. */ +# define GS_EXPORT_CLASS +# else +# define GS_EXPORT_CLASS __declspec(dllimport) +# endif # define GS_EXPORT extern __declspec(dllimport) # define GS_DECLARE __declspec(dllimport) #endif #else /* GNUSTEP_WITH[OUT]_DLL */ +# define GS_EXPORT_CLASS # define GS_EXPORT extern # define GS_DECLARE diff --git a/Headers/GNUstepBase/GSXML.h b/Headers/GNUstepBase/GSXML.h index d2bb529be..6e5a05786 100644 --- a/Headers/GNUstepBase/GSXML.h +++ b/Headers/GNUstepBase/GSXML.h @@ -85,6 +85,7 @@ extern "C" { - (NSString*) stringByUnescapingXML; @end +GS_EXPORT_CLASS @interface GSXMLDocument : NSObject { void *lib; // pointer to xmllib pointer of xmlDoc struct @@ -114,6 +115,7 @@ extern "C" { +GS_EXPORT_CLASS @interface GSXMLNamespace : NSObject { void *lib; /* pointer to struct xmlNs in the gnome xmllib */ @@ -135,6 +137,7 @@ extern "C" { /* XML Node */ +GS_EXPORT_CLASS @interface GSXMLNode : NSObject { void *lib; /* pointer to struct xmlNode from libxml */ @@ -184,10 +187,12 @@ extern "C" { @end +GS_EXPORT_CLASS @interface GSXMLAttribute : GSXMLNode - (NSString*) value; @end +GS_EXPORT_CLASS @interface GSXMLParser : NSObject { id src; /* source for parsing */ @@ -239,11 +244,13 @@ extern "C" { @end +GS_EXPORT_CLASS @interface GSHTMLParser : GSXMLParser { } @end +GS_EXPORT_CLASS @interface GSSAXHandler : NSObject { void *lib; // xmlSAXHandlerPtr @@ -350,9 +357,11 @@ extern "C" { @end +GS_EXPORT_CLASS @interface GSTreeSAXHandler : GSSAXHandler @end +GS_EXPORT_CLASS @interface GSHTMLSAXHandler : GSSAXHandler @end @@ -384,6 +393,7 @@ extern "C" { * NSLog (@"Got %@", [result stringValue]); * */ +GS_EXPORT_CLASS @interface GSXPathContext : NSObject { void *_lib; // xmlXPathContext @@ -405,6 +415,7 @@ extern "C" { * the returned type of each GSXPath query to make sure it's what you * meant it to be. */ +GS_EXPORT_CLASS @interface GSXPathObject : NSObject { void *_lib; // xmlXPathObject @@ -415,6 +426,7 @@ extern "C" { /** * For XPath queries returning true/false. */ +GS_EXPORT_CLASS @interface GSXPathBoolean : GSXPathObject - (BOOL) booleanValue; @end @@ -422,6 +434,7 @@ extern "C" { /** * For XPath queries returning a number. */ +GS_EXPORT_CLASS @interface GSXPathNumber : GSXPathObject - (double) doubleValue; @end @@ -429,6 +442,7 @@ extern "C" { /** * For XPath queries returning a string. */ +GS_EXPORT_CLASS @interface GSXPathString : GSXPathObject - (NSString *) stringValue; @end @@ -436,6 +450,7 @@ extern "C" { /** * For XPath queries returning a node set. */ +GS_EXPORT_CLASS @interface GSXPathNodeSet : GSXPathObject - (NSUInteger) count; - (NSUInteger) length; diff --git a/Headers/GNUstepBase/NSStream+GNUstepBase.h b/Headers/GNUstepBase/NSStream+GNUstepBase.h index 0762ca8a7..ef57857fc 100644 --- a/Headers/GNUstepBase/NSStream+GNUstepBase.h +++ b/Headers/GNUstepBase/NSStream+GNUstepBase.h @@ -68,6 +68,7 @@ extern "C" { * Currently NOT implemented when using the Apple Foundation!
* Please contribute an Apple implementation. */ +GS_EXPORT_CLASS @interface GSServerStream : NSStream /** diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index d6eeff9ae..bdb66f2c0 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.m @@ -4427,20 +4427,34 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use /* * Build dummy implementations of the classes if libxml is not available */ +GS_EXPORT_CLASS @interface GSXMLDummy : NSObject @end + +GS_EXPORT_CLASS @interface GSXMLDocument : GSXMLDummy @end + +GS_EXPORT_CLASS @interface GSXMLNamespace : GSXMLDummy @end + +GS_EXPORT_CLASS @interface GSXMLNode : GSXMLDummy @end + +GS_EXPORT_CLASS @interface GSSAXHandler : GSXMLDummy @end + +GS_EXPORT_CLASS @interface GSXMLParser : GSXMLDummy @end + +GS_EXPORT_CLASS @interface GSXMLAttribute : GSXMLNode @end + @implementation GSXMLDummy + (id) allocWithZone: (NSZone*)z { @@ -4470,16 +4484,28 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use return nil; } @end + +GS_EXPORT_CLASS @implementation GSXMLDocument @end + +GS_EXPORT_CLASS @implementation GSXMLNamespace @end + +GS_EXPORT_CLASS @implementation GSXMLNode @end + +GS_EXPORT_CLASS @implementation GSSAXHandler @end + +GS_EXPORT_CLASS @implementation GSXMLParser @end + +GS_EXPORT_CLASS @implementation GSXMLAttribute @end diff --git a/Source/Additions/Makefile.preamble b/Source/Additions/Makefile.preamble index b240868be..9ebaa196e 100644 --- a/Source/Additions/Makefile.preamble +++ b/Source/Additions/Makefile.preamble @@ -52,6 +52,8 @@ else ifeq ($(GNUSTEP_TARGET_OS),mingw64) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 else ifeq ($(GNUSTEP_TARGET_OS),cygwin) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 +else ifeq ($(GNUSTEP_TARGET_OS),windows) + ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 endif # Additional flags to pass to the C compiler diff --git a/Source/CXXException.m b/Source/CXXException.m index 192970cba..1dcd6271a 100644 --- a/Source/CXXException.m +++ b/Source/CXXException.m @@ -85,10 +85,12 @@ static Class boxClass(int64_t foo) } - (void) rethrow { +#if defined(WITH_UNWIND) struct _Unwind_Exception *re = ex; // We aren't allowed to hold onto the exception if it's been rethrown. ex = 0; _Unwind_Resume_or_Rethrow(re); +#endif } - (void) dealloc { diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 832c85591..bc685c006 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -82,12 +82,12 @@ libgnustep-baseadd_SUBPROJECTS += Additions ifeq ($(GNUSTEP_TARGET_OS), mingw32) libgnustep-base_SUBPROJECTS += win32 +else ifeq ($(GNUSTEP_TARGET_OS), mingw64) + libgnustep-base_SUBPROJECTS += win32 +else ifeq ($(GNUSTEP_TARGET_OS), windows) + libgnustep-base_SUBPROJECTS += win32 else - ifeq ($(GNUSTEP_TARGET_OS), mingw64) - libgnustep-base_SUBPROJECTS += win32 - else - libgnustep-base_SUBPROJECTS += unix - endif + libgnustep-base_SUBPROJECTS += unix endif DEFS+= -DGNUSTEP_TARGET_DIR=\"$(GNUSTEP_TARGET_DIR)\" \ @@ -109,8 +109,9 @@ endif ifeq ($(GNUSTEP_TARGET_OS), mingw32) GNU_MFILES += libgnustep-base-entry.m -endif -ifeq ($(GNUSTEP_TARGET_OS), mingw64) +else ifeq ($(GNUSTEP_TARGET_OS), mingw64) + GNU_MFILES += libgnustep-base-entry.m +else ifeq ($(GNUSTEP_TARGET_OS), windows) GNU_MFILES += libgnustep-base-entry.m endif @@ -361,10 +362,12 @@ objc-load.m ifneq ($(GNUSTEP_TARGET_OS), mingw32) ifneq ($(GNUSTEP_TARGET_OS), mingw64) - BASE_MFILES += \ + ifneq ($(GNUSTEP_TARGET_OS), windows) + BASE_MFILES += \ GSFileHandle.m \ NSMessagePort.m \ NSMessagePortNameServer.m + endif endif endif diff --git a/Source/NSException.m b/Source/NSException.m index c5bc28f5a..b6dcdffb0 100644 --- a/Source/NSException.m +++ b/Source/NSException.m @@ -900,7 +900,7 @@ GSPrivateReturnAddresses(NSUInteger **returns) *returns = malloc(numReturns * sizeof(void*)); memcpy(*returns, addr, numReturns * sizeof(void*)); } -#elif defined(HAVE_UNWIND_H) +#elif defined(WITH_UNWIND) void *addr[MAXFRAMES]; struct GSBacktraceState state = {addr, addr + MAXFRAMES}; @@ -1282,7 +1282,7 @@ GSPrivateReturnAddresses(NSUInteger **returns) } symbols = [[NSArray alloc] initWithObjects: symbolArray count: count]; free(strs); -#elif defined(HAVE_UNWIND_H) +#elif defined(WITH_UNWIND) void **ptrs = (void**)&returns[FrameOffset]; NSString **symbolArray; @@ -1345,28 +1345,28 @@ GSPrivateReturnAddresses(NSUInteger **returns) @end -NSString* const NSCharacterConversionException +GS_DECLARE NSString* const NSCharacterConversionException = @"NSCharacterConversionException"; -NSString* const NSGenericException +GS_DECLARE NSString* const NSGenericException = @"NSGenericException"; -NSString* const NSInternalInconsistencyException +GS_DECLARE NSString* const NSInternalInconsistencyException = @"NSInternalInconsistencyException"; -NSString* const NSInvalidArgumentException +GS_DECLARE NSString* const NSInvalidArgumentException = @"NSInvalidArgumentException"; -NSString* const NSMallocException +GS_DECLARE NSString* const NSMallocException = @"NSMallocException"; -NSString* const NSOldStyleException +GS_DECLARE NSString* const NSOldStyleException = @"NSOldStyleException"; -NSString* const NSParseErrorException +GS_DECLARE NSString* const NSParseErrorException = @"NSParseErrorException"; -NSString* const NSRangeException +GS_DECLARE NSString* const NSRangeException = @"NSRangeException"; static void _terminate() diff --git a/Source/NSFileManager.m b/Source/NSFileManager.m index 3c2c6b632..4eea76a63 100644 --- a/Source/NSFileManager.m +++ b/Source/NSFileManager.m @@ -196,7 +196,28 @@ * Macros to handle unichar filesystem support. */ -#if defined(_WIN32) +#if defined(_MSC_VER) + +#warning NSFileManager is currently unsupported on Windows MSVC + +#define _CHMOD(A,B) 0 +#define _CLOSEDIR(A) +#define _OPENDIR(A) NULL +#define _READDIR(A) NULL +#define _RENAME(A,B) -1 +#define _RMDIR(A) -1 +#define _STAT(A,B) -1 +#define _UTIME(A,B) -1 + +#define _CHAR unichar +#define _DIR void +#define _DIRENT {const char *d_name;} +#define _STATB {int st_ctime; int st_gid; int st_atime; int st_mtime; int st_mode; int st_uid; int st_size; int st_ino; int st_dev; int st_nlink;} +#define _UTIMB {int actime; int modtime;} + +#define _NUL L'\0' + +#elif defined(_WIN32) #define _CHMOD(A,B) _wchmod(A,B) #define _CLOSEDIR(A) _wclosedir(A) @@ -4050,11 +4071,15 @@ static NSSet *fileKeys = nil; case S_IFREG: return NSFileTypeRegular; case S_IFDIR: return NSFileTypeDirectory; case S_IFCHR: return NSFileTypeCharacterSpecial; +#ifdef S_IFBLK case S_IFBLK: return NSFileTypeBlockSpecial; +#endif #ifdef S_IFLNK case S_IFLNK: return NSFileTypeSymbolicLink; #endif +#ifdef S_IFIFO case S_IFIFO: return NSFileTypeFifo; +#endif #ifdef S_IFSOCK case S_IFSOCK: return NSFileTypeSocket; #endif diff --git a/Source/NSPropertyList.m b/Source/NSPropertyList.m index 7bb539787..7f08c8ed6 100644 --- a/Source/NSPropertyList.m +++ b/Source/NSPropertyList.m @@ -2491,7 +2491,7 @@ static BOOL classInitialized = NO; *
  • xml enables XML formatting.
  • * */ -void +GS_DECLARE void GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml, BOOL forDescription, unsigned step, id *str) { diff --git a/Source/NSSocketPort.m b/Source/NSSocketPort.m index a3c89d5b3..746ef9163 100644 --- a/Source/NSSocketPort.m +++ b/Source/NSSocketPort.m @@ -68,13 +68,15 @@ # include #endif +#ifdef HAVE_SYS_TIME_H +# include +#endif + #ifdef _WIN32 #include #include #include -#include #else -#include #include #include #include diff --git a/Source/ObjectiveC2/Makefile.preamble b/Source/ObjectiveC2/Makefile.preamble index 68a737556..7e419f49d 100644 --- a/Source/ObjectiveC2/Makefile.preamble +++ b/Source/ObjectiveC2/Makefile.preamble @@ -51,6 +51,8 @@ else ifeq ($(GNUSTEP_TARGET_OS),mingw64) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 else ifeq ($(GNUSTEP_TARGET_OS),cygwin) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 +else ifeq ($(GNUSTEP_TARGET_OS),windows) + ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 endif # Additional flags to pass to the C compiler diff --git a/Source/common.h b/Source/common.h index 9014acf3b..174b6006a 100644 --- a/Source/common.h +++ b/Source/common.h @@ -85,4 +85,13 @@ # endif #endif +/* Redefine some function names when using the MSVC ABI on Windows. + */ +#ifdef _MSC_VER +# define strncasecmp _strnicmp +# define strcasecmp _stricmp +# define write(fd, buffer, count) _write(fd, buffer, count) +# define close(fd) _close(fd) +#endif + #endif /* COMMON_H */ diff --git a/Source/externs.m b/Source/externs.m index 0c3978f11..ef815a5c3 100644 --- a/Source/externs.m +++ b/Source/externs.m @@ -40,297 +40,297 @@ /* * NSConnection Notification Strings. */ -NSString *NSConnectionDidDieNotification = @"NSConnectionDidDieNotification"; +GS_DECLARE NSString *NSConnectionDidDieNotification = @"NSConnectionDidDieNotification"; -NSString *NSConnectionDidInitializeNotification = @"NSConnectionDidInitializeNotification"; +GS_DECLARE NSString *NSConnectionDidInitializeNotification = @"NSConnectionDidInitializeNotification"; /* * NSDistributedNotificationCenter types. */ -NSString *NSLocalNotificationCenterType = @"NSLocalNotificationCenterType"; -NSString *GSNetworkNotificationCenterType = @"GSNetworkNotificationCenterType"; -NSString *GSPublicNotificationCenterType = @"GSPublicNotificationCenterType"; +GS_DECLARE NSString *NSLocalNotificationCenterType = @"NSLocalNotificationCenterType"; +GS_DECLARE NSString *GSNetworkNotificationCenterType = @"GSNetworkNotificationCenterType"; +GS_DECLARE NSString *GSPublicNotificationCenterType = @"GSPublicNotificationCenterType"; /* * NSThread Notifications */ -NSString *NSWillBecomeMultiThreadedNotification = @"NSWillBecomeMultiThreadedNotification"; +GS_DECLARE NSString *NSWillBecomeMultiThreadedNotification = @"NSWillBecomeMultiThreadedNotification"; -NSString *NSThreadDidStartNotification = @"NSThreadDidStartNotification"; +GS_DECLARE NSString *NSThreadDidStartNotification = @"NSThreadDidStartNotification"; -NSString *NSThreadWillExitNotification = @"NSThreadWillExitNotification"; +GS_DECLARE NSString *NSThreadWillExitNotification = @"NSThreadWillExitNotification"; /* * Port Notifications */ -NSString *NSPortDidBecomeInvalidNotification = @"NSPortDidBecomeInvalidNotification"; +GS_DECLARE NSString *NSPortDidBecomeInvalidNotification = @"NSPortDidBecomeInvalidNotification"; /* NSTask notifications */ -NSString *NSTaskDidTerminateNotification = @"NSTaskDidTerminateNotification"; +GS_DECLARE NSString *NSTaskDidTerminateNotification = @"NSTaskDidTerminateNotification"; /* NSUndoManager notifications */ -NSString *NSUndoManagerCheckpointNotification = @"NSUndoManagerCheckpointNotification"; +GS_DECLARE NSString *NSUndoManagerCheckpointNotification = @"NSUndoManagerCheckpointNotification"; -NSString *NSUndoManagerDidOpenUndoGroupNotification = @"NSUndoManagerDidOpenUndoGroupNotification"; +GS_DECLARE NSString *NSUndoManagerDidOpenUndoGroupNotification = @"NSUndoManagerDidOpenUndoGroupNotification"; -NSString *NSUndoManagerDidRedoChangeNotification = @"NSUndoManagerDidRedoChangeNotification"; +GS_DECLARE NSString *NSUndoManagerDidRedoChangeNotification = @"NSUndoManagerDidRedoChangeNotification"; -NSString *NSUndoManagerDidUndoChangeNotification = @"NSUndoManagerDidUndoChangeNotification"; +GS_DECLARE NSString *NSUndoManagerDidUndoChangeNotification = @"NSUndoManagerDidUndoChangeNotification"; -NSString *NSUndoManagerWillCloseUndoGroupNotification = @"NSUndoManagerWillCloseUndoGroupNotification"; +GS_DECLARE NSString *NSUndoManagerWillCloseUndoGroupNotification = @"NSUndoManagerWillCloseUndoGroupNotification"; -NSString *NSUndoManagerWillRedoChangeNotification = @"NSUndoManagerWillRedoChangeNotification"; +GS_DECLARE NSString *NSUndoManagerWillRedoChangeNotification = @"NSUndoManagerWillRedoChangeNotification"; -NSString *NSUndoManagerWillUndoChangeNotification = @"NSUndoManagerWillUndoChangeNotification"; +GS_DECLARE NSString *NSUndoManagerWillUndoChangeNotification = @"NSUndoManagerWillUndoChangeNotification"; /* * NSUbiquitousKeyValueStore notifications */ -NSString *NSUbiquitousKeyValueStoreDidChangeExternallyNotification = @"NSUbiquitousKeyValueStoreDidChangeExternallyNotification"; -NSString *NSUbiquitousKeyValueStoreChangeReasonKey = @"NSUbiquitousKeyValueStoreChangeReasonKey"; +GS_DECLARE NSString *NSUbiquitousKeyValueStoreDidChangeExternallyNotification = @"NSUbiquitousKeyValueStoreDidChangeExternallyNotification"; +GS_DECLARE NSString *NSUbiquitousKeyValueStoreChangeReasonKey = @"NSUbiquitousKeyValueStoreChangeReasonKey"; /* NSURL constants */ -NSString *NSURLFileScheme = @"file"; +GS_DECLARE NSString *NSURLFileScheme = @"file"; #if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) -NSString *NSURLNameKey = @"NSURLNameKey"; -NSString *NSURLLocalizedNameKey = @"NSURLLocalizedNameKey"; -NSString *NSURLIsRegularFileKey = @"NSURLIsRegularFileKey"; -NSString *NSURLIsDirectoryKey = @"NSURLIsDirectoryKey"; -NSString *NSURLIsSymbolicLinkKey = @"NSURLIsSymbolicLinkKey"; -NSString *NSURLIsVolumeKey = @"NSURLIsVolumeKey"; -NSString *NSURLIsPackageKey = @"NSURLIsPackageKey"; -NSString *NSURLIsSystemImmutableKey = @"NSURLIsSystemImmutableKey"; -NSString *NSURLIsUserImmutableKey = @"NSURLIsUserImmutableKey"; -NSString *NSURLIsHiddenKey = @"NSURLIsHiddenKey"; -NSString *NSURLHasHiddenExtensionKey = @"NSURLHasHiddenExtensionKey"; -NSString *NSURLCreationDateKey = @"NSURLCreationDateKey"; -NSString *NSURLContentAccessDateKey = @"NSURLContentAccessDateKey"; -NSString *NSURLContentModificationDateKey = @"NSURLContentModificationDateKey"; -NSString *NSURLAttributeModificationDateKey = @"NSURLAttributeModificationDateKey"; -NSString *NSURLLinkCountKey = @"NSURLLinkCountKey"; -NSString *NSURLParentDirectoryURLKey = @"NSURLParentDirectoryURLKey"; -NSString *NSURLVolumeURLKey = @"NSURLVolumeURLKey"; -NSString *NSURLTypeIdentifierKey = @"NSURLTypeIdentifierKey"; -NSString *NSURLLocalizedTypeDescriptionKey = @"NSURLLocalizedTypeDescriptionKey"; -NSString *NSURLLabelNumberKey = @"NSURLLabelNumberKey"; -NSString *NSURLLabelColorKey = @"NSURLLabelColorKey"; -NSString *NSURLLocalizedLabelKey = @"NSURLLocalizedLabelKey"; -NSString *NSURLEffectiveIconKey = @"NSURLEffectiveIconKey"; -NSString *NSURLCustomIconKey = @"NSURLCustomIconKey"; -NSString *NSURLFileSizeKey = @"NSURLFileSizeKey"; -NSString *NSURLFileAllocatedSizeKey = @"NSURLFileAllocatedSizeKey"; -NSString *NSURLIsAliasFileKey = @"NSURLIsAliasFileKey"; -NSString *NSURLVolumeLocalizedFormatDescriptionKey = @"NSURLVolumeLocalizedFormatDescriptionKey"; -NSString *NSURLVolumeTotalCapacityKey = @"NSURLVolumeTotalCapacityKey"; -NSString *NSURLVolumeAvailableCapacityKey = @"NSURLVolumeAvailableCapacityKey"; -NSString *NSURLVolumeResourceCountKey = @"NSURLVolumeResourceCountKey"; -NSString *NSURLVolumeSupportsPersistentIDsKey = @"NSURLVolumeSupportsPersistentIDsKey"; -NSString *NSURLVolumeSupportsSymbolicLinksKey = @"NSURLVolumeSupportsSymbolicLinksKey"; -NSString *NSURLVolumeSupportsHardLinksKey = @"NSURLVolumeSupportsHardLinksKey"; -NSString *NSURLVolumeSupportsJournalingKey = @"NSURLVolumeSupportsJournalingKey"; -NSString *NSURLVolumeIsJournalingKey = @"NSURLVolumeIsJournalingKey"; -NSString *NSURLVolumeSupportsSparseFilesKey = @"NSURLVolumeSupportsSparseFilesKey"; -NSString *NSURLVolumeSupportsZeroRunsKey = @"NSURLVolumeSupportsZeroRunsKey"; -NSString *NSURLVolumeSupportsCaseSensitiveNamesKey = @"NSURLVolumeSupportsCaseSensitiveNamesKey"; -NSString *NSURLVolumeSupportsCasePreservedNamesKey = @"NSURLVolumeSupportsCasePreservedNamesKey"; +GS_DECLARE NSString *NSURLNameKey = @"NSURLNameKey"; +GS_DECLARE NSString *NSURLLocalizedNameKey = @"NSURLLocalizedNameKey"; +GS_DECLARE NSString *NSURLIsRegularFileKey = @"NSURLIsRegularFileKey"; +GS_DECLARE NSString *NSURLIsDirectoryKey = @"NSURLIsDirectoryKey"; +GS_DECLARE NSString *NSURLIsSymbolicLinkKey = @"NSURLIsSymbolicLinkKey"; +GS_DECLARE NSString *NSURLIsVolumeKey = @"NSURLIsVolumeKey"; +GS_DECLARE NSString *NSURLIsPackageKey = @"NSURLIsPackageKey"; +GS_DECLARE NSString *NSURLIsSystemImmutableKey = @"NSURLIsSystemImmutableKey"; +GS_DECLARE NSString *NSURLIsUserImmutableKey = @"NSURLIsUserImmutableKey"; +GS_DECLARE NSString *NSURLIsHiddenKey = @"NSURLIsHiddenKey"; +GS_DECLARE NSString *NSURLHasHiddenExtensionKey = @"NSURLHasHiddenExtensionKey"; +GS_DECLARE NSString *NSURLCreationDateKey = @"NSURLCreationDateKey"; +GS_DECLARE NSString *NSURLContentAccessDateKey = @"NSURLContentAccessDateKey"; +GS_DECLARE NSString *NSURLContentModificationDateKey = @"NSURLContentModificationDateKey"; +GS_DECLARE NSString *NSURLAttributeModificationDateKey = @"NSURLAttributeModificationDateKey"; +GS_DECLARE NSString *NSURLLinkCountKey = @"NSURLLinkCountKey"; +GS_DECLARE NSString *NSURLParentDirectoryURLKey = @"NSURLParentDirectoryURLKey"; +GS_DECLARE NSString *NSURLVolumeURLKey = @"NSURLVolumeURLKey"; +GS_DECLARE NSString *NSURLTypeIdentifierKey = @"NSURLTypeIdentifierKey"; +GS_DECLARE NSString *NSURLLocalizedTypeDescriptionKey = @"NSURLLocalizedTypeDescriptionKey"; +GS_DECLARE NSString *NSURLLabelNumberKey = @"NSURLLabelNumberKey"; +GS_DECLARE NSString *NSURLLabelColorKey = @"NSURLLabelColorKey"; +GS_DECLARE NSString *NSURLLocalizedLabelKey = @"NSURLLocalizedLabelKey"; +GS_DECLARE NSString *NSURLEffectiveIconKey = @"NSURLEffectiveIconKey"; +GS_DECLARE NSString *NSURLCustomIconKey = @"NSURLCustomIconKey"; +GS_DECLARE NSString *NSURLFileSizeKey = @"NSURLFileSizeKey"; +GS_DECLARE NSString *NSURLFileAllocatedSizeKey = @"NSURLFileAllocatedSizeKey"; +GS_DECLARE NSString *NSURLIsAliasFileKey = @"NSURLIsAliasFileKey"; +GS_DECLARE NSString *NSURLVolumeLocalizedFormatDescriptionKey = @"NSURLVolumeLocalizedFormatDescriptionKey"; +GS_DECLARE NSString *NSURLVolumeTotalCapacityKey = @"NSURLVolumeTotalCapacityKey"; +GS_DECLARE NSString *NSURLVolumeAvailableCapacityKey = @"NSURLVolumeAvailableCapacityKey"; +GS_DECLARE NSString *NSURLVolumeResourceCountKey = @"NSURLVolumeResourceCountKey"; +GS_DECLARE NSString *NSURLVolumeSupportsPersistentIDsKey = @"NSURLVolumeSupportsPersistentIDsKey"; +GS_DECLARE NSString *NSURLVolumeSupportsSymbolicLinksKey = @"NSURLVolumeSupportsSymbolicLinksKey"; +GS_DECLARE NSString *NSURLVolumeSupportsHardLinksKey = @"NSURLVolumeSupportsHardLinksKey"; +GS_DECLARE NSString *NSURLVolumeSupportsJournalingKey = @"NSURLVolumeSupportsJournalingKey"; +GS_DECLARE NSString *NSURLVolumeIsJournalingKey = @"NSURLVolumeIsJournalingKey"; +GS_DECLARE NSString *NSURLVolumeSupportsSparseFilesKey = @"NSURLVolumeSupportsSparseFilesKey"; +GS_DECLARE NSString *NSURLVolumeSupportsZeroRunsKey = @"NSURLVolumeSupportsZeroRunsKey"; +GS_DECLARE NSString *NSURLVolumeSupportsCaseSensitiveNamesKey = @"NSURLVolumeSupportsCaseSensitiveNamesKey"; +GS_DECLARE NSString *NSURLVolumeSupportsCasePreservedNamesKey = @"NSURLVolumeSupportsCasePreservedNamesKey"; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST) -NSString *NSURLFileResourceIdentifierKey = @"NSURLFileResourceIdentifierKey"; -NSString *NSURLVolumeIdentifierKey = @"NSURLVolumeIdentifierKey"; -NSString *NSURLPreferredIOBlockSizeKey = @"NSURLPreferredIOBlockSizeKey"; -NSString *NSURLIsReadableKey = @"NSURLIsReadableKey"; -NSString *NSURLIsWritableKey = @"NSURLIsWritableKey"; -NSString *NSURLIsExecutableKey = @"NSURLIsExecutableKey"; -NSString *NSURLFileSecurityKey = @"NSURLFileSecurityKey"; -NSString *NSURLIsMountTriggerKey = @"NSURLIsMountTriggerKey"; -NSString *NSURLFileResourceTypeKey = @"NSURLFileResourceTypeKey"; -NSString *NSURLTotalFileSizeKey = @"NSURLTotalFileSizeKey"; -NSString *NSURLTotalFileAllocatedSizeKey = @"NSURLTotalFileAllocatedSizeKey"; -NSString *NSURLVolumeSupportsRootDirectoryDatesKey = @"NSURLVolumeSupportsRootDirectoryDatesKey"; -NSString *NSURLVolumeSupportsVolumeSizesKey = @"NSURLVolumeSupportsVolumeSizesKey"; -NSString *NSURLVolumeSupportsRenamingKey = @"NSURLVolumeSupportsRenamingKey"; -NSString *NSURLVolumeSupportsAdvisoryFileLockingKey = @"NSURLVolumeSupportsAdvisoryFileLockingKey"; -NSString *NSURLVolumeSupportsExtendedSecurityKey = @"NSURLVolumeSupportsExtendedSecurityKey"; -NSString *NSURLVolumeIsBrowsableKey = @"NSURLVolumeIsBrowsableKey"; -NSString *NSURLVolumeMaximumFileSizeKey = @"NSURLVolumeMaximumFileSizeKey"; -NSString *NSURLVolumeIsEjectableKey = @"NSURLVolumeIsEjectableKey"; -NSString *NSURLVolumeIsRemovableKey = @"NSURLVolumeIsRemovableKey"; -NSString *NSURLVolumeIsInternalKey = @"NSURLVolumeIsInternalKey"; -NSString *NSURLVolumeIsAutomountedKey = @"NSURLVolumeIsAutomountedKey"; -NSString *NSURLVolumeIsLocalKey = @"NSURLVolumeIsLocalKey"; -NSString *NSURLVolumeIsReadOnlyKey = @"NSURLVolumeIsReadOnlyKey"; -NSString *NSURLVolumeCreationDateKey = @"NSURLVolumeCreationDateKey"; -NSString *NSURLVolumeURLForRemountingKey = @"NSURLVolumeURLForRemountingKey"; -NSString *NSURLVolumeUUIDStringKey = @"NSURLVolumeUUIDStringKey"; -NSString *NSURLVolumeNameKey = @"NSURLVolumeNameKey"; -NSString *NSURLVolumeLocalizedNameKey = @"NSURLVolumeLocalizedNameKey"; -NSString *NSURLIsUbiquitousItemKey = @"NSURLIsUbiquitousItemKey"; -NSString *NSURLUbiquitousItemHasUnresolvedConflictsKey = @"NSURLUbiquitousItemHasUnresolvedConflictsKey"; -NSString *NSURLUbiquitousItemIsDownloadingKey = @"NSURLUbiquitousItemIsDownloadingKey"; -NSString *NSURLUbiquitousItemIsUploadedKey = @"NSURLUbiquitousItemIsUploadedKey"; -NSString *NSURLUbiquitousItemIsUploadingKey = @"NSURLUbiquitousItemIsUploadingKey"; +GS_DECLARE NSString *NSURLFileResourceIdentifierKey = @"NSURLFileResourceIdentifierKey"; +GS_DECLARE NSString *NSURLVolumeIdentifierKey = @"NSURLVolumeIdentifierKey"; +GS_DECLARE NSString *NSURLPreferredIOBlockSizeKey = @"NSURLPreferredIOBlockSizeKey"; +GS_DECLARE NSString *NSURLIsReadableKey = @"NSURLIsReadableKey"; +GS_DECLARE NSString *NSURLIsWritableKey = @"NSURLIsWritableKey"; +GS_DECLARE NSString *NSURLIsExecutableKey = @"NSURLIsExecutableKey"; +GS_DECLARE NSString *NSURLFileSecurityKey = @"NSURLFileSecurityKey"; +GS_DECLARE NSString *NSURLIsMountTriggerKey = @"NSURLIsMountTriggerKey"; +GS_DECLARE NSString *NSURLFileResourceTypeKey = @"NSURLFileResourceTypeKey"; +GS_DECLARE NSString *NSURLTotalFileSizeKey = @"NSURLTotalFileSizeKey"; +GS_DECLARE NSString *NSURLTotalFileAllocatedSizeKey = @"NSURLTotalFileAllocatedSizeKey"; +GS_DECLARE NSString *NSURLVolumeSupportsRootDirectoryDatesKey = @"NSURLVolumeSupportsRootDirectoryDatesKey"; +GS_DECLARE NSString *NSURLVolumeSupportsVolumeSizesKey = @"NSURLVolumeSupportsVolumeSizesKey"; +GS_DECLARE NSString *NSURLVolumeSupportsRenamingKey = @"NSURLVolumeSupportsRenamingKey"; +GS_DECLARE NSString *NSURLVolumeSupportsAdvisoryFileLockingKey = @"NSURLVolumeSupportsAdvisoryFileLockingKey"; +GS_DECLARE NSString *NSURLVolumeSupportsExtendedSecurityKey = @"NSURLVolumeSupportsExtendedSecurityKey"; +GS_DECLARE NSString *NSURLVolumeIsBrowsableKey = @"NSURLVolumeIsBrowsableKey"; +GS_DECLARE NSString *NSURLVolumeMaximumFileSizeKey = @"NSURLVolumeMaximumFileSizeKey"; +GS_DECLARE NSString *NSURLVolumeIsEjectableKey = @"NSURLVolumeIsEjectableKey"; +GS_DECLARE NSString *NSURLVolumeIsRemovableKey = @"NSURLVolumeIsRemovableKey"; +GS_DECLARE NSString *NSURLVolumeIsInternalKey = @"NSURLVolumeIsInternalKey"; +GS_DECLARE NSString *NSURLVolumeIsAutomountedKey = @"NSURLVolumeIsAutomountedKey"; +GS_DECLARE NSString *NSURLVolumeIsLocalKey = @"NSURLVolumeIsLocalKey"; +GS_DECLARE NSString *NSURLVolumeIsReadOnlyKey = @"NSURLVolumeIsReadOnlyKey"; +GS_DECLARE NSString *NSURLVolumeCreationDateKey = @"NSURLVolumeCreationDateKey"; +GS_DECLARE NSString *NSURLVolumeURLForRemountingKey = @"NSURLVolumeURLForRemountingKey"; +GS_DECLARE NSString *NSURLVolumeUUIDStringKey = @"NSURLVolumeUUIDStringKey"; +GS_DECLARE NSString *NSURLVolumeNameKey = @"NSURLVolumeNameKey"; +GS_DECLARE NSString *NSURLVolumeLocalizedNameKey = @"NSURLVolumeLocalizedNameKey"; +GS_DECLARE NSString *NSURLIsUbiquitousItemKey = @"NSURLIsUbiquitousItemKey"; +GS_DECLARE NSString *NSURLUbiquitousItemHasUnresolvedConflictsKey = @"NSURLUbiquitousItemHasUnresolvedConflictsKey"; +GS_DECLARE NSString *NSURLUbiquitousItemIsDownloadingKey = @"NSURLUbiquitousItemIsDownloadingKey"; +GS_DECLARE NSString *NSURLUbiquitousItemIsUploadedKey = @"NSURLUbiquitousItemIsUploadedKey"; +GS_DECLARE NSString *NSURLUbiquitousItemIsUploadingKey = @"NSURLUbiquitousItemIsUploadingKey"; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST) -NSString *NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey"; -NSString *NSURLPathKey = @"NSURLPathKey"; +GS_DECLARE NSString *NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey"; +GS_DECLARE NSString *NSURLPathKey = @"NSURLPathKey"; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST) -NSString *NSURLTagNamesKey = @"NSURLTagNamesKey"; -NSString *NSURLUbiquitousItemDownloadingStatusKey = @"NSURLUbiquitousItemDownloadingStatusKey"; -NSString *NSURLUbiquitousItemDownloadingErrorKey = @"NSURLUbiquitousItemDownloadingErrorKey"; -NSString *NSURLUbiquitousItemUploadingErrorKey = @"NSURLUbiquitousItemUploadingErrorKey"; +GS_DECLARE NSString *NSURLTagNamesKey = @"NSURLTagNamesKey"; +GS_DECLARE NSString *NSURLUbiquitousItemDownloadingStatusKey = @"NSURLUbiquitousItemDownloadingStatusKey"; +GS_DECLARE NSString *NSURLUbiquitousItemDownloadingErrorKey = @"NSURLUbiquitousItemDownloadingErrorKey"; +GS_DECLARE NSString *NSURLUbiquitousItemUploadingErrorKey = @"NSURLUbiquitousItemUploadingErrorKey"; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST) -NSString *NSURLGenerationIdentifierKey = @"NSURLGenerationIdentifierKey"; -NSString *NSURLDocumentIdentifierKey = @"NSURLDocumentIdentifierKey"; -NSString *NSURLAddedToDirectoryDateKey = @"NSURLAddedToDirectoryDateKey"; -NSString *NSURLQuarantinePropertiesKey = @"NSURLQuarantinePropertiesKey"; -NSString *NSThumbnail1024x1024SizeKey = @"NSThumbnail1024x1024SizeKey"; -NSString *NSURLUbiquitousItemDownloadRequestedKey = @"NSURLUbiquitousItemDownloadRequestedKey"; -NSString *NSURLUbiquitousItemContainerDisplayNameKey = @"NSURLUbiquitousItemContainerDisplayNameKey"; +GS_DECLARE NSString *NSURLGenerationIdentifierKey = @"NSURLGenerationIdentifierKey"; +GS_DECLARE NSString *NSURLDocumentIdentifierKey = @"NSURLDocumentIdentifierKey"; +GS_DECLARE NSString *NSURLAddedToDirectoryDateKey = @"NSURLAddedToDirectoryDateKey"; +GS_DECLARE NSString *NSURLQuarantinePropertiesKey = @"NSURLQuarantinePropertiesKey"; +GS_DECLARE NSString *NSThumbnail1024x1024SizeKey = @"NSThumbnail1024x1024SizeKey"; +GS_DECLARE NSString *NSURLUbiquitousItemDownloadRequestedKey = @"NSURLUbiquitousItemDownloadRequestedKey"; +GS_DECLARE NSString *NSURLUbiquitousItemContainerDisplayNameKey = @"NSURLUbiquitousItemContainerDisplayNameKey"; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST) -NSString *NSURLIsApplicationKey = @"NSURLIsApplicationKey"; -NSString *NSURLApplicationIsScriptableKey = @"NSURLApplicationIsScriptableKey"; +GS_DECLARE NSString *NSURLIsApplicationKey = @"NSURLIsApplicationKey"; +GS_DECLARE NSString *NSURLApplicationIsScriptableKey = @"NSURLApplicationIsScriptableKey"; #endif #if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST) -NSString *NSURLFileResourceTypeNamedPipe = @"NSURLFileResourceTypeNamedPipe"; -NSString *NSURLFileResourceTypeCharacterSpecial = @"NSURLFileResourceTypeCharacterSpecial"; -NSString *NSURLFileResourceTypeDirectory = @"NSURLFileResourceTypeDirectory"; -NSString *NSURLFileResourceTypeBlockSpecial = @"NSURLFileResourceTypeBlockSpecial"; -NSString *NSURLFileResourceTypeRegular = @"NSURLFileResourceTypeRegular"; -NSString *NSURLFileResourceTypeSymbolicLink = @"NSURLFileResourceTypeSymbolicLink"; -NSString *NSURLFileResourceTypeSocket = @"NSURLFileResourceTypeSocket"; -NSString *NSURLFileResourceTypeUnknown = @"NSURLFileResourceTypeUnknown"; +GS_DECLARE NSString *NSURLFileResourceTypeNamedPipe = @"NSURLFileResourceTypeNamedPipe"; +GS_DECLARE NSString *NSURLFileResourceTypeCharacterSpecial = @"NSURLFileResourceTypeCharacterSpecial"; +GS_DECLARE NSString *NSURLFileResourceTypeDirectory = @"NSURLFileResourceTypeDirectory"; +GS_DECLARE NSString *NSURLFileResourceTypeBlockSpecial = @"NSURLFileResourceTypeBlockSpecial"; +GS_DECLARE NSString *NSURLFileResourceTypeRegular = @"NSURLFileResourceTypeRegular"; +GS_DECLARE NSString *NSURLFileResourceTypeSymbolicLink = @"NSURLFileResourceTypeSymbolicLink"; +GS_DECLARE NSString *NSURLFileResourceTypeSocket = @"NSURLFileResourceTypeSocket"; +GS_DECLARE NSString *NSURLFileResourceTypeUnknown = @"NSURLFileResourceTypeUnknown"; #endif /** Possible values for Ubiquitous Item Downloading Key **/ #if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST) -NSString *NSURLUbiquitousItemDownloadingStatusNotDownloaded = @"NSURLUbiquitousItemDownloadingStatusNotDownloaded"; -NSString *NSURLUbiquitousItemDownloadingStatusDownloaded = @"NSURLUbiquitousItemDownloadingStatusDownloaded"; -NSString *NSURLUbiquitousItemDownloadingStatusCurrent = @"NSURLUbiquitousItemDownloadingStatusCurrent"; +GS_DECLARE NSString *NSURLUbiquitousItemDownloadingStatusNotDownloaded = @"NSURLUbiquitousItemDownloadingStatusNotDownloaded"; +GS_DECLARE NSString *NSURLUbiquitousItemDownloadingStatusDownloaded = @"NSURLUbiquitousItemDownloadingStatusDownloaded"; +GS_DECLARE NSString *NSURLUbiquitousItemDownloadingStatusCurrent = @"NSURLUbiquitousItemDownloadingStatusCurrent"; #endif /* RunLoop modes */ -NSString *NSConnectionReplyMode = @"NSConnectionReplyMode"; +GS_DECLARE NSString *NSConnectionReplyMode = @"NSConnectionReplyMode"; /* NSValueTransformer constants */ -NSString *const NSNegateBooleanTransformerName +GS_DECLARE NSString *const NSNegateBooleanTransformerName = @"NSNegateBoolean"; -NSString *const NSIsNilTransformerName +GS_DECLARE NSString *const NSIsNilTransformerName = @"NSIsNil"; -NSString *const NSIsNotNilTransformerName +GS_DECLARE NSString *const NSIsNotNilTransformerName = @"NSIsNotNil"; -NSString *const NSUnarchiveFromDataTransformerName +GS_DECLARE NSString *const NSUnarchiveFromDataTransformerName = @"NSUnarchiveFromData"; /* Standard domains */ -NSString *NSArgumentDomain = @"NSArgumentDomain"; +GS_DECLARE NSString *NSArgumentDomain = @"NSArgumentDomain"; -NSString *NSGlobalDomain = @"NSGlobalDomain"; +GS_DECLARE NSString *NSGlobalDomain = @"NSGlobalDomain"; -NSString *NSRegistrationDomain = @"NSRegistrationDomain"; +GS_DECLARE NSString *NSRegistrationDomain = @"NSRegistrationDomain"; -NSString *GSConfigDomain = @"GSConfigDomain"; +GS_DECLARE NSString *GSConfigDomain = @"GSConfigDomain"; /* Public notification */ -NSString *NSUserDefaultsDidChangeNotification = @"NSUserDefaultsDidChangeNotification"; +GS_DECLARE NSString *NSUserDefaultsDidChangeNotification = @"NSUserDefaultsDidChangeNotification"; /* Keys for language-dependent information */ -NSString *NSWeekDayNameArray = @"NSWeekDayNameArray"; +GS_DECLARE NSString *NSWeekDayNameArray = @"NSWeekDayNameArray"; -NSString *NSShortWeekDayNameArray = @"NSShortWeekDayNameArray"; +GS_DECLARE NSString *NSShortWeekDayNameArray = @"NSShortWeekDayNameArray"; -NSString *NSMonthNameArray = @"NSMonthNameArray"; +GS_DECLARE NSString *NSMonthNameArray = @"NSMonthNameArray"; -NSString *NSShortMonthNameArray = @"NSShortMonthNameArray"; +GS_DECLARE NSString *NSShortMonthNameArray = @"NSShortMonthNameArray"; -NSString *NSTimeFormatString = @"NSTimeFormatString"; +GS_DECLARE NSString *NSTimeFormatString = @"NSTimeFormatString"; -NSString *NSDateFormatString = @"NSDateFormatString"; +GS_DECLARE NSString *NSDateFormatString = @"NSDateFormatString"; -NSString *NSShortDateFormatString = @"NSShortDateFormatString"; +GS_DECLARE NSString *NSShortDateFormatString = @"NSShortDateFormatString"; -NSString *NSTimeDateFormatString = @"NSTimeDateFormatString"; +GS_DECLARE NSString *NSTimeDateFormatString = @"NSTimeDateFormatString"; -NSString *NSShortTimeDateFormatString = @"NSShortTimeDateFormatString"; +GS_DECLARE NSString *NSShortTimeDateFormatString = @"NSShortTimeDateFormatString"; -NSString *NSCurrencySymbol = @"NSCurrencySymbol"; +GS_DECLARE NSString *NSCurrencySymbol = @"NSCurrencySymbol"; -NSString *NSDecimalSeparator = @"NSDecimalSeparator"; +GS_DECLARE NSString *NSDecimalSeparator = @"NSDecimalSeparator"; -NSString *NSThousandsSeparator = @"NSThousandsSeparator"; +GS_DECLARE NSString *NSThousandsSeparator = @"NSThousandsSeparator"; -NSString *NSInternationalCurrencyString = @"NSInternationalCurrencyString"; +GS_DECLARE NSString *NSInternationalCurrencyString = @"NSInternationalCurrencyString"; -NSString *NSCurrencyString = @"NSCurrencyString"; +GS_DECLARE NSString *NSCurrencyString = @"NSCurrencyString"; -NSString *NSNegativeCurrencyFormatString = @"NSNegativeCurrencyFormatString"; +GS_DECLARE NSString *NSNegativeCurrencyFormatString = @"NSNegativeCurrencyFormatString"; -NSString *NSPositiveCurrencyFormatString = @"NSPositiveCurrencyFormatString"; +GS_DECLARE NSString *NSPositiveCurrencyFormatString = @"NSPositiveCurrencyFormatString"; -NSString *NSDecimalDigits = @"NSDecimalDigits"; +GS_DECLARE NSString *NSDecimalDigits = @"NSDecimalDigits"; -NSString *NSAMPMDesignation = @"NSAMPMDesignation"; +GS_DECLARE NSString *NSAMPMDesignation = @"NSAMPMDesignation"; -NSString *NSHourNameDesignations = @"NSHourNameDesignations"; +GS_DECLARE NSString *NSHourNameDesignations = @"NSHourNameDesignations"; -NSString *NSYearMonthWeekDesignations = @"NSYearMonthWeekDesignations"; +GS_DECLARE NSString *NSYearMonthWeekDesignations = @"NSYearMonthWeekDesignations"; -NSString *NSEarlierTimeDesignations = @"NSEarlierTimeDesignations"; +GS_DECLARE NSString *NSEarlierTimeDesignations = @"NSEarlierTimeDesignations"; -NSString *NSLaterTimeDesignations = @"NSLaterTimeDesignations"; +GS_DECLARE NSString *NSLaterTimeDesignations = @"NSLaterTimeDesignations"; -NSString *NSThisDayDesignations = @"NSThisDayDesignations"; +GS_DECLARE NSString *NSThisDayDesignations = @"NSThisDayDesignations"; -NSString *NSNextDayDesignations = @"NSNextDayDesignations"; +GS_DECLARE NSString *NSNextDayDesignations = @"NSNextDayDesignations"; -NSString *NSNextNextDayDesignations = @"NSNextNextDayDesignations"; +GS_DECLARE NSString *NSNextNextDayDesignations = @"NSNextNextDayDesignations"; -NSString *NSPriorDayDesignations = @"NSPriorDayDesignations"; +GS_DECLARE NSString *NSPriorDayDesignations = @"NSPriorDayDesignations"; -NSString *NSDateTimeOrdering = @"NSDateTimeOrdering"; +GS_DECLARE NSString *NSDateTimeOrdering = @"NSDateTimeOrdering"; /* These are in OPENSTEP 4.2 */ -NSString *NSLanguageCode = @"NSLanguageCode"; +GS_DECLARE NSString *NSLanguageCode = @"NSLanguageCode"; -NSString *NSLanguageName = @"NSLanguageName"; +GS_DECLARE NSString *NSLanguageName = @"NSLanguageName"; -NSString *NSFormalName = @"NSFormalName"; +GS_DECLARE NSString *NSFormalName = @"NSFormalName"; /* For GNUstep */ -NSString *GSLocale = @"GSLocale"; +GS_DECLARE NSString *GSLocale = @"GSLocale"; /* * Keys for the NSDictionary returned by [NSConnection -statistics] */ /* These in OPENSTEP 4.2 */ -NSString *NSConnectionRepliesReceived = @"NSConnectionRepliesReceived"; +GS_DECLARE NSString *NSConnectionRepliesReceived = @"NSConnectionRepliesReceived"; -NSString *NSConnectionRepliesSent = @"NSConnectionRepliesSent"; +GS_DECLARE NSString *NSConnectionRepliesSent = @"NSConnectionRepliesSent"; -NSString *NSConnectionRequestsReceived = @"NSConnectionRequestsReceived"; +GS_DECLARE NSString *NSConnectionRequestsReceived = @"NSConnectionRequestsReceived"; -NSString *NSConnectionRequestsSent = @"NSConnectionRequestsSent"; +GS_DECLARE NSString *NSConnectionRequestsSent = @"NSConnectionRequestsSent"; /* These Are GNUstep extras */ -NSString *NSConnectionLocalCount = @"NSConnectionLocalCount"; +GS_DECLARE NSString *NSConnectionLocalCount = @"NSConnectionLocalCount"; -NSString *NSConnectionProxyCount = @"NSConnectionProxyCount"; +GS_DECLARE NSString *NSConnectionProxyCount = @"NSConnectionProxyCount"; /* Class description notification */ -NSString *NSClassDescriptionNeededForClassNotification = @"NSClassDescriptionNeededForClassNotification"; +GS_DECLARE NSString *NSClassDescriptionNeededForClassNotification = @"NSClassDescriptionNeededForClassNotification"; /* diff --git a/Source/inet_ntop.m b/Source/inet_ntop.m index 30c06fb57..71de42f0b 100644 --- a/Source/inet_ntop.m +++ b/Source/inet_ntop.m @@ -20,7 +20,9 @@ #include #include +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #import "GSPrivate.h" diff --git a/Source/inet_pton.m b/Source/inet_pton.m index c8efdddbd..28995e6e5 100644 --- a/Source/inet_pton.m +++ b/Source/inet_pton.m @@ -28,7 +28,9 @@ #endif #include +#ifdef HAVE_SYS_PARAM_H #include +#endif #import "GSPrivate.h" #import "GSNetwork.h" diff --git a/Source/libgnustep-base-entry.m b/Source/libgnustep-base-entry.m index 2e6ea3ba6..057c1da73 100644 --- a/Source/libgnustep-base-entry.m +++ b/Source/libgnustep-base-entry.m @@ -24,6 +24,10 @@ #import "common.h" +#ifdef _MSC_VER +#define WINBOOL WinBOOL +#endif + /* Only if using Microsoft's tools and libraries */ #ifdef __MS_WIN32__ #include @@ -97,8 +101,10 @@ DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) return TRUE; } +#ifndef __clang__ /* This section terminates the list of imports under GCC. If you do not include this then you will have problems when linking with DLLs. */ asm (".section .idata$3\n" ".long 0,0,0,0,0,0,0,0"); +#endif diff --git a/Source/unix/Makefile.preamble b/Source/unix/Makefile.preamble index 3e6b90bc1..66eb677b0 100644 --- a/Source/unix/Makefile.preamble +++ b/Source/unix/Makefile.preamble @@ -51,6 +51,8 @@ else ifeq ($(GNUSTEP_TARGET_OS),mingw64) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 else ifeq ($(GNUSTEP_TARGET_OS),cygwin) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 +else ifeq ($(GNUSTEP_TARGET_OS),windows) + ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 endif # Additional flags to pass to the C compiler diff --git a/Source/win32/GSFileHandle.m b/Source/win32/GSFileHandle.m index 4795dd422..f01cd1800 100644 --- a/Source/win32/GSFileHandle.m +++ b/Source/win32/GSFileHandle.m @@ -44,13 +44,26 @@ #import "../GSPrivate.h" #import "../GSNetwork.h" -#include -#include +#if defined(HAVE_SYS_FCNTL_H) +# include +#elif defined(HAVE_FCNTL_H) +# include +#endif + +#if defined(HAVE_SYS_FILE_H) +# include +#endif + #include #include #include #include +// S_ISREG is not defined in Windows headers +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + #ifndef O_BINARY #ifdef _O_BINARY #define O_BINARY _O_BINARY diff --git a/Source/win32/Makefile.preamble b/Source/win32/Makefile.preamble index 3e6b90bc1..66eb677b0 100644 --- a/Source/win32/Makefile.preamble +++ b/Source/win32/Makefile.preamble @@ -51,6 +51,8 @@ else ifeq ($(GNUSTEP_TARGET_OS),mingw64) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 else ifeq ($(GNUSTEP_TARGET_OS),cygwin) ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 +else ifeq ($(GNUSTEP_TARGET_OS),windows) + ADDITIONAL_OBJCFLAGS += -DBUILD_libgnustep_base_DLL=1 endif # Additional flags to pass to the C compiler diff --git a/Tools/GNUmakefile b/Tools/GNUmakefile index 6682719f5..9b3eaa9aa 100644 --- a/Tools/GNUmakefile +++ b/Tools/GNUmakefile @@ -74,7 +74,9 @@ TOOL_NAME = autogsdoc cvtenc plmerge sfparse xmlparse else TOOL_NAME = autogsdoc cvtenc gdnc gspath defaults pl plmerge plutil \ plparse sfparse pldes plget plser pl2link xmlparse HTMLLinker +ifneq ($(GNUSTEP_TARGET_OS), windows) CTOOL_NAME = gdomap +endif SUBPROJECTS = make_strings endif diff --git a/Tools/Makefile.preamble b/Tools/Makefile.preamble index 941cd1ab0..d98fc5211 100644 --- a/Tools/Makefile.preamble +++ b/Tools/Makefile.preamble @@ -56,7 +56,9 @@ ifeq ($(FOUNDATION_LIB),gnu) endif # Additional LDFLAGS to pass to the linker -#ADDITIONAL_LDFLAGS += +ifeq ($(GNUSTEP_TARGET_OS),windows) + ADDITIONAL_LDFLAGS += -Wl,/subsystem:console +endif # Additional library directories the linker should search ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR) diff --git a/Tools/gdnc.m b/Tools/gdnc.m index b5e94211b..4e26d0559 100644 --- a/Tools/gdnc.m +++ b/Tools/gdnc.m @@ -20,6 +20,9 @@ #import "common.h" #include +#ifdef _WIN32 +#include +#endif #import "Foundation/NSArray.h" #import "Foundation/NSAutoreleasePool.h" @@ -1199,7 +1202,7 @@ main(int argc, char** argv, char** env) #endif signal(sym, ihandler); } -#ifndef __MINGW__ +#ifndef _WIN32 signal(SIGPIPE, SIG_IGN); signal(SIGTTOU, SIG_IGN); signal(SIGTTIN, SIG_IGN); diff --git a/Tools/make_strings/make_strings.m b/Tools/make_strings/make_strings.m index e31fdced6..54760b77b 100644 --- a/Tools/make_strings/make_strings.m +++ b/Tools/make_strings/make_strings.m @@ -33,6 +33,10 @@ #include "SourceEntry.h" #include "StringsEntry.h" +#ifdef _MSC_VER +#define strdup _strdup +#endif + int verbose, aggressive_import, aggressive_match, aggressive_remove; diff --git a/Tools/pl2link.m b/Tools/pl2link.m index 061c63ab6..f4bf698b3 100644 --- a/Tools/pl2link.m +++ b/Tools/pl2link.m @@ -32,6 +32,10 @@ #import "Foundation/NSProcessInfo.h" #import "Foundation/NSPathUtilities.h" +#ifdef _MSC_VER +#define popen _popen +#endif + int main(int argc, char** argv, char **env) { diff --git a/Tools/plutil.m b/Tools/plutil.m index 86259e866..23f9b8990 100644 --- a/Tools/plutil.m +++ b/Tools/plutil.m @@ -35,7 +35,7 @@ #import "NSPropertyList+PLUtil.h" // From NSPropertyList.m -extern void +GS_EXPORT void GSPropertyListMake(id, NSDictionary *, BOOL, BOOL, unsigned, id *); // We don't have @[] on gcc diff --git a/config/config.initialize.m b/config/config.initialize.m index b87a829fc..c41fb47eb 100644 --- a/config/config.initialize.m +++ b/config/config.initialize.m @@ -11,6 +11,21 @@ # define mySleep(X) sleep(X) #endif +#if _MSC_VER +// Windows MSVC does not have usleep() (only MinGW does), so we use our own +#include +#ifdef interface +#undef interface // this is defined in windows.h but will break @interface +#endif +void usleep(__int64 usec) { + LARGE_INTEGER ft = {.QuadPart = -(10*usec)}; // convert to 100ns interval + HANDLE timer = CreateWaitableTimer(NULL, TRUE, NULL); + SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0); + WaitForSingleObject(timer, INFINITE); + CloseHandle(timer); +} +#endif + /* Use volatile variables so compiler optimisation won't prevent one thread * from seeing changes made by another. */ diff --git a/configure b/configure index f9ea658f4..ec693bc87 100755 --- a/configure +++ b/configure @@ -3008,7 +3008,7 @@ then fi if test x"$GNUSTEP_TARGET_CONFIG_FILE" = x""; then case "$target_os" in - mingw*) + mingw*|windows*) GNUSTEP_TARGET_CONFIG_FILE=./GNUstep.conf ;; *) GNUSTEP_TARGET_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;; @@ -3026,7 +3026,7 @@ $as_echo "$GNUSTEP_TARGET_CONFIG_FILE" >&6; } # location (used by gnustep-make when building). #----------------------------------------------------------------- case "$target_os" in - mingw*) enable_env_config=no;; + mingw*|windows*) enable_env_config=no;; *) enable_env_config=yes;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the GNUstep.conf file path can be set in the environment" >&5 @@ -3306,7 +3306,7 @@ GNUSTEP_BASE_DOMAIN=$result # paths (relative to libgnustep-base.dll). # case "$target_os" in - mingw*) + mingw*|windows*) # TODO: Improve this hack. # According to Wikipedia, this is the default for Windows 2000, # Windows XP and Windows Server 2003. For Windows Vista this will @@ -6119,7 +6119,7 @@ if test "$gs_cv_objc_libdir" != "NONE"; then # add to path on Windows for config checks to find DLL at runtime case $host_os in - mingw*) PATH=$PATH:$gs_cv_objc_libdir;; + mingw*|windows*) PATH=$PATH:$gs_cv_objc_libdir;; esac fi @@ -8033,7 +8033,15 @@ fi #-------------------------------------------------------------------- # Check for thread synchronisation support in runtime #-------------------------------------------------------------------- -for ac_func in objc_sync_enter +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming objc_sync_enter() on Windows MSVC" >&5 +$as_echo "$as_me: assuming objc_sync_enter() on Windows MSVC" >&6;} + OBJCSYNC=1 +else + for ac_func in objc_sync_enter do : ac_fn_c_check_func "$LINENO" "objc_sync_enter" "ac_cv_func_objc_sync_enter" if test "x$ac_cv_func_objc_sync_enter" = xyes; then : @@ -8044,12 +8052,13 @@ _ACEOF fi done -if test $ac_cv_func_objc_sync_enter = yes ; then - OBJCSYNC=1 -else - OBJCSYNC=0 - if test "$OBJC_RUNTIME_LIB" = "ng"; then - as_fn_error $? "The objc runtime library does not appear to have synchronisation support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option." "$LINENO" 5 + if test $ac_cv_func_objc_sync_enter = yes ; then + OBJCSYNC=1 + else + OBJCSYNC=0 + if test "$OBJC_RUNTIME_LIB" = "ng"; then + as_fn_error $? "The objc runtime library does not appear to have synchronisation support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option." "$LINENO" 5 + fi fi fi @@ -8063,6 +8072,13 @@ if test "$cross_compiling" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: \"Cross compiling! Using predefined OBJC2RUNTIME variable\"" >&5 $as_echo "$as_me: \"Cross compiling! Using predefined OBJC2RUNTIME variable\"" >&6;} OBJC2RUNTIME="$cross_objc2_runtime" +elif test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming objc_setProperty() on Windows MSVC" >&5 +$as_echo "$as_me: assuming objc_setProperty() on Windows MSVC" >&6;} + OBJC2RUNTIME=1 else for ac_func in objc_setProperty do : @@ -8089,7 +8105,15 @@ fi #-------------------------------------------------------------------- # Check for blocks support in runtime #-------------------------------------------------------------------- -for ac_func in _Block_copy +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming _Block_copy() on Windows MSVC" >&5 +$as_echo "$as_me: assuming _Block_copy() on Windows MSVC" >&6;} + HAVE_BLOCKS=1 +else + for ac_func in _Block_copy do : ac_fn_c_check_func "$LINENO" "_Block_copy" "ac_cv_func__Block_copy" if test "x$ac_cv_func__Block_copy" = xyes; then : @@ -8100,12 +8124,13 @@ _ACEOF fi done -if test $ac_cv_func__Block_copy = yes ; then - HAVE_BLOCKS=1 -else - HAVE_BLOCKS=0 - if test "$OBJC_RUNTIME_LIB" = "ng"; then - as_fn_error $? "The objc runtime library does not appear to have blocks support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option." "$LINENO" 5 + if test $ac_cv_func__Block_copy = yes ; then + HAVE_BLOCKS=1 + else + HAVE_BLOCKS=0 + if test "$OBJC_RUNTIME_LIB" = "ng"; then + as_fn_error $? "The objc runtime library does not appear to have blocks support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option." "$LINENO" 5 + fi fi fi @@ -8114,11 +8139,19 @@ fi GS_NONFRAGILE=0 if test "$nonfragile" = "yes"; then - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $OBJCFLAGS -x objective-c" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-fragile-abi support" >&5 + if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming non-fragile-abi support on Windows MSVC" >&5 +$as_echo "$as_me: assuming non-fragile-abi support on Windows MSVC" >&6;} + GS_NONFRAGILE=1 + else + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $OBJCFLAGS -x objective-c" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-fragile-abi support" >&5 $as_echo_n "checking for non-fragile-abi support... " >&6; } - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : non_fragile="$cross_non_fragile" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8134,12 +8167,13 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - CPPFLAGS="$saved_CPPFLAGS" - if test $non_fragile = yes; then - GS_NONFRAGILE=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $non_fragile" >&5 + CPPFLAGS="$saved_CPPFLAGS" + if test $non_fragile = yes; then + GS_NONFRAGILE=1 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $non_fragile" >&5 $as_echo "$non_fragile" >&6; } + fi fi @@ -8251,7 +8285,15 @@ $as_echo "$have_set_unexpected" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _objc_unexpected_exception in runtime" >&5 $as_echo_n "checking for _objc_unexpected_exception in runtime... " >&6; } -if test "$cross_compiling" = yes; then : +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming _objc_unexpected_exception() on Windows MSVC" >&5 +$as_echo "$as_me: assuming _objc_unexpected_exception() on Windows MSVC" >&6;} + have_unexpected=yes +else + if test "$cross_compiling" = yes; then : have_unexpected="$cross_have_unexpected" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8267,6 +8309,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi if test $have_unexpected = yes; then $as_echo "#define HAVE_UNEXPECTED 1" >>confdefs.h @@ -8312,7 +8355,16 @@ fi #-------------------------------------------------------------------- # Function needed by @synchronize directive #-------------------------------------------------------------------- -for ac_func in objc_sync_enter +HAVE_OBJC_SYNC_ENTER=no +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming objc_sync_enter() on Windows MSVC" >&5 +$as_echo "$as_me: assuming objc_sync_enter() on Windows MSVC" >&6;} + HAVE_OBJC_SYNC_ENTER=yes +else + for ac_func in objc_sync_enter do : ac_fn_c_check_func "$LINENO" "objc_sync_enter" "ac_cv_func_objc_sync_enter" if test "x$ac_cv_func_objc_sync_enter" = xyes; then : @@ -8323,10 +8375,9 @@ _ACEOF fi done - -HAVE_OBJC_SYNC_ENTER=no -if test $ac_cv_func_objc_sync_enter = yes ; then - HAVE_OBJC_SYNC_ENTER=yes + if test $ac_cv_func_objc_sync_enter = yes ; then + HAVE_OBJC_SYNC_ENTER=yes + fi fi @@ -10663,7 +10714,7 @@ $as_echo "$as_me: WARNING: Using libkvm which is known to be buggy on some syste fi fi case "$target_os" in - mingw*) enable_fake_main=no; GS_FAKE_MAIN=0;; + mingw*|windows*) enable_fake_main=no; GS_FAKE_MAIN=0;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_fake_main" >&5 diff --git a/configure.ac b/configure.ac index 9da871629..834441ca7 100644 --- a/configure.ac +++ b/configure.ac @@ -235,7 +235,7 @@ then fi if test x"$GNUSTEP_TARGET_CONFIG_FILE" = x""; then case "$target_os" in - mingw*) + mingw*|windows*) GNUSTEP_TARGET_CONFIG_FILE=./GNUstep.conf ;; *) GNUSTEP_TARGET_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;; @@ -252,7 +252,7 @@ AC_MSG_RESULT($GNUSTEP_TARGET_CONFIG_FILE) # location (used by gnustep-make when building). #----------------------------------------------------------------- case "$target_os" in - mingw*) enable_env_config=no;; + mingw*|windows*) enable_env_config=no;; *) enable_env_config=yes;; esac AC_MSG_CHECKING([whether the GNUstep.conf file path can be set in the environment]) @@ -534,7 +534,7 @@ AC_SUBST(GNUSTEP_BASE_DOMAIN) # paths (relative to libgnustep-base.dll). # case "$target_os" in - mingw*) + mingw*|windows*) # TODO: Improve this hack. # According to Wikipedia, this is the default for Windows 2000, # Windows XP and Windows Server 2003. For Windows Vista this will @@ -1349,7 +1349,7 @@ if test "$gs_cv_objc_libdir" != "NONE"; then # add to path on Windows for config checks to find DLL at runtime case $host_os in - mingw*) PATH=$PATH:$gs_cv_objc_libdir;; + mingw*|windows*) PATH=$PATH:$gs_cv_objc_libdir;; esac fi @@ -1973,13 +1973,21 @@ fi #-------------------------------------------------------------------- # Check for thread synchronisation support in runtime #-------------------------------------------------------------------- -AC_CHECK_FUNCS(objc_sync_enter) -if test $ac_cv_func_objc_sync_enter = yes ; then +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + AC_MSG_NOTICE([assuming objc_sync_enter() on Windows MSVC]) OBJCSYNC=1 else - OBJCSYNC=0 - if test "$OBJC_RUNTIME_LIB" = "ng"; then - AC_MSG_ERROR([The objc runtime library does not appear to have synchronisation support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option.]) + AC_CHECK_FUNCS(objc_sync_enter) + if test $ac_cv_func_objc_sync_enter = yes ; then + OBJCSYNC=1 + else + OBJCSYNC=0 + if test "$OBJC_RUNTIME_LIB" = "ng"; then + AC_MSG_ERROR([The objc runtime library does not appear to have synchronisation support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option.]) + fi fi fi AC_SUBST(OBJCSYNC) @@ -1992,6 +2000,12 @@ AC_SUBST(OBJCSYNC) if test "$cross_compiling" = "yes"; then AC_MSG_NOTICE(["Cross compiling! Using predefined OBJC2RUNTIME variable"]) OBJC2RUNTIME="$cross_objc2_runtime" +elif test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + AC_MSG_NOTICE([assuming objc_setProperty() on Windows MSVC]) + OBJC2RUNTIME=1 else AC_CHECK_FUNCS(objc_setProperty) if test $ac_cv_func_objc_setProperty = yes ; then @@ -2008,13 +2022,21 @@ AC_SUBST(OBJC2RUNTIME) #-------------------------------------------------------------------- # Check for blocks support in runtime #-------------------------------------------------------------------- -AC_CHECK_FUNCS(_Block_copy) -if test $ac_cv_func__Block_copy = yes ; then +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + AC_MSG_NOTICE([assuming _Block_copy() on Windows MSVC]) HAVE_BLOCKS=1 else - HAVE_BLOCKS=0 - if test "$OBJC_RUNTIME_LIB" = "ng"; then - AC_MSG_ERROR([The objc runtime library does not appear to have blocks support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option.]) + AC_CHECK_FUNCS(_Block_copy) + if test $ac_cv_func__Block_copy = yes ; then + HAVE_BLOCKS=1 + else + HAVE_BLOCKS=0 + if test "$OBJC_RUNTIME_LIB" = "ng"; then + AC_MSG_ERROR([The objc runtime library does not appear to have blocks support. Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option.]) + fi fi fi AC_SUBST(HAVE_BLOCKS) @@ -2023,18 +2045,26 @@ AC_SUBST(HAVE_BLOCKS) GS_NONFRAGILE=0 if test "$nonfragile" = "yes"; then - saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $OBJCFLAGS -x objective-c" - AC_MSG_CHECKING(for non-fragile-abi support) - AC_RUN_IFELSE([AC_LANG_SOURCE( - [[#include "$srcdir/config/config.non-fragile-ivars.m"]])], - non_fragile=yes, non_fragile=no, - non_fragile="$cross_non_fragile") - CPPFLAGS="$saved_CPPFLAGS" - if test $non_fragile = yes; then + if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + AC_MSG_NOTICE([assuming non-fragile-abi support on Windows MSVC]) GS_NONFRAGILE=1 + else + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $OBJCFLAGS -x objective-c" + AC_MSG_CHECKING(for non-fragile-abi support) + AC_RUN_IFELSE([AC_LANG_SOURCE( + [[#include "$srcdir/config/config.non-fragile-ivars.m"]])], + non_fragile=yes, non_fragile=no, + non_fragile="$cross_non_fragile") + CPPFLAGS="$saved_CPPFLAGS" + if test $non_fragile = yes; then + GS_NONFRAGILE=1 + fi + AC_MSG_RESULT($non_fragile) fi - AC_MSG_RESULT($non_fragile) fi AC_SUBST(GS_NONFRAGILE) @@ -2113,11 +2143,19 @@ AC_MSG_RESULT($have_set_unexpected) # Don't revert any Objective-C flags as they are used in the next test AC_MSG_CHECKING(for _objc_unexpected_exception in runtime) -AC_RUN_IFELSE( - [AC_LANG_SOURCE([[#include "$srcdir/config/config.unexpected.m"]])], - have_unexpected=yes, - have_unexpected=no, - have_unexpected="$cross_have_unexpected") +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + AC_MSG_NOTICE([assuming _objc_unexpected_exception() on Windows MSVC]) + have_unexpected=yes +else + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[#include "$srcdir/config/config.unexpected.m"]])], + have_unexpected=yes, + have_unexpected=no, + have_unexpected="$cross_have_unexpected") +fi if test $have_unexpected = yes; then AC_DEFINE(HAVE_UNEXPECTED,1, [Define if libobjc has the _objc_unexpected_exception callback]) @@ -2155,11 +2193,18 @@ AC_SUBST(BASE_NATIVE_OBJC_EXCEPTIONS) #-------------------------------------------------------------------- # Function needed by @synchronize directive #-------------------------------------------------------------------- -AC_CHECK_FUNCS(objc_sync_enter) - HAVE_OBJC_SYNC_ENTER=no -if test $ac_cv_func_objc_sync_enter = yes ; then +if test "$host_os" = windows -a "$OBJC_RUNTIME_LIB" = "ng"; then + # On Windows MSVC, AC_CHECK_FUNCS() will throw linker errors ("relocation + # against symbol in discarded section") as the file won't contain any actual + # ObjC code, so we just assume the function is there. + AC_MSG_NOTICE([assuming objc_sync_enter() on Windows MSVC]) HAVE_OBJC_SYNC_ENTER=yes +else + AC_CHECK_FUNCS(objc_sync_enter) + if test $ac_cv_func_objc_sync_enter = yes ; then + HAVE_OBJC_SYNC_ENTER=yes + fi fi AC_SUBST(HAVE_OBJC_SYNC_ENTER) @@ -2758,7 +2803,7 @@ elif test "$enable_pass_arguments" = "no"; then fi fi case "$target_os" in - mingw*) enable_fake_main=no; GS_FAKE_MAIN=0;; + mingw*|windows*) enable_fake_main=no; GS_FAKE_MAIN=0;; esac AC_SUBST(GS_FAKE_MAIN) AC_MSG_RESULT($enable_fake_main)