diff --git a/Headers/Additions/GNUstepBase/GSMime.h b/Headers/Additions/GNUstepBase/GSMime.h index 908a0795c..e12f5b94f 100644 --- a/Headers/Additions/GNUstepBase/GSMime.h +++ b/Headers/Additions/GNUstepBase/GSMime.h @@ -75,9 +75,7 @@ extern "C" { NSMutableDictionary *objects; NSMutableDictionary *params; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (NSString*) makeQuoted: (NSString*)v always: (BOOL)flag; + (NSString*) makeToken: (NSString*)t preservingCase: (BOOL)preserve; diff --git a/Headers/Additions/GNUstepBase/GSVersionMacros.h b/Headers/Additions/GNUstepBase/GSVersionMacros.h index 8a10ff4ca..8fce6674b 100644 --- a/Headers/Additions/GNUstepBase/GSVersionMacros.h +++ b/Headers/Additions/GNUstepBase/GSVersionMacros.h @@ -228,6 +228,16 @@ #define GS_EXPOSE(X) (!GS_NONFRAGILE || defined(EXPOSE_##X##_IVARS)) +#ifdef GS_NONFRAGILE +# define GS_PADDING_IVAR +#else +# ifdef __clang__ +# define GS_PADDING_IVAR __attribute__((unused)) void *gs_unused; +# else +# define GS_PADDING_IVAR void *gs_unused; +# endif +#endif + /* Include the appropriate header for ObjC2 blocks support if it is in use. * * FIXME: "OBJC2RUNTIME" is set to "1" if the runtime has diff --git a/Headers/Foundation/NSArchiver.h b/Headers/Foundation/NSArchiver.h index 7b66eea5e..c896bf097 100644 --- a/Headers/Foundation/NSArchiver.h +++ b/Headers/Foundation/NSArchiver.h @@ -70,9 +70,7 @@ extern "C" { BOOL _encodingRoot; BOOL _initialPass; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /* Initializing an archiver */ @@ -178,9 +176,7 @@ extern "C" { NSMutableDictionary *objDict; /* Class information store. */ NSMutableArray *objSave; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /* Initializing an unarchiver */ diff --git a/Headers/Foundation/NSAutoreleasePool.h b/Headers/Foundation/NSAutoreleasePool.h index ec73a7d55..79f048d66 100644 --- a/Headers/Foundation/NSAutoreleasePool.h +++ b/Headers/Foundation/NSAutoreleasePool.h @@ -194,9 +194,7 @@ typedef struct autorelease_array_list /* The method to add an object to this pool */ void (*_addImp)(id, SEL, id); #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSBundle.h b/Headers/Foundation/NSBundle.h index d93d4facc..3242b8754 100644 --- a/Headers/Foundation/NSBundle.h +++ b/Headers/Foundation/NSBundle.h @@ -119,9 +119,7 @@ GS_EXPORT NSString* const NSLoadedClasses; unsigned _version; NSString *_frameworkVersion; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** Return an array enumerating all the bundles in the application. This diff --git a/Headers/Foundation/NSCache.h b/Headers/Foundation/NSCache.h index 82e8f59b4..80edc80c9 100644 --- a/Headers/Foundation/NSCache.h +++ b/Headers/Foundation/NSCache.h @@ -61,9 +61,7 @@ extern "C" { /** Total number of accesses to objects */ int64_t _totalAccesses; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** * Returns the maximum number of objects that are supported by this cache. diff --git a/Headers/Foundation/NSComparisonPredicate.h b/Headers/Foundation/NSComparisonPredicate.h index 4163db48d..2d4f96ef9 100644 --- a/Headers/Foundation/NSComparisonPredicate.h +++ b/Headers/Foundation/NSComparisonPredicate.h @@ -77,9 +77,7 @@ typedef enum _NSPredicateOperatorType NSUInteger _options; NSPredicateOperatorType _type; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; @public NSExpression *_left; NSExpression *_right; diff --git a/Headers/Foundation/NSDateFormatter.h b/Headers/Foundation/NSDateFormatter.h index 2dd892a9e..3ea487fe9 100644 --- a/Headers/Foundation/NSDateFormatter.h +++ b/Headers/Foundation/NSDateFormatter.h @@ -134,9 +134,7 @@ typedef NSUInteger NSDateFormatterBehavior; NSDateFormatterStyle _dateStyle; void *_formatter; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /* Initializing an NSDateFormatter */ diff --git a/Headers/Foundation/NSDecimalNumber.h b/Headers/Foundation/NSDecimalNumber.h index b8ad88116..89d02a404 100644 --- a/Headers/Foundation/NSDecimalNumber.h +++ b/Headers/Foundation/NSDecimalNumber.h @@ -129,9 +129,7 @@ extern "C" { BOOL _raiseOnUnderflow; BOOL _raiseOnDivideByZero; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSDistributedLock.h b/Headers/Foundation/NSDistributedLock.h index a455e2078..326def35f 100644 --- a/Headers/Foundation/NSDistributedLock.h +++ b/Headers/Foundation/NSDistributedLock.h @@ -40,9 +40,7 @@ extern "C" { NSString *_lockPath; NSDate *_lockTime; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (NSDistributedLock*) lockWithPath: (NSString*)aPath; diff --git a/Headers/Foundation/NSDistributedNotificationCenter.h b/Headers/Foundation/NSDistributedNotificationCenter.h index 87280ffe3..ab8ec2ba0 100644 --- a/Headers/Foundation/NSDistributedNotificationCenter.h +++ b/Headers/Foundation/NSDistributedNotificationCenter.h @@ -86,9 +86,7 @@ GS_EXPORT NSString* const GSNetworkNotificationCenterType; id _remote; /* Proxy for center. */ BOOL _suspended; /* Is delivery suspended? */ #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (NSNotificationCenter*) defaultCenter; + (NSNotificationCenter*) notificationCenterForType: (NSString*)type; diff --git a/Headers/Foundation/NSError.h b/Headers/Foundation/NSError.h index a2a557eac..59c9e29ca 100644 --- a/Headers/Foundation/NSError.h +++ b/Headers/Foundation/NSError.h @@ -121,9 +121,7 @@ GS_EXPORT NSString* const NSCocoaErrorDomain; NSString *_domain; NSDictionary *_userInfo; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSFileHandle.h b/Headers/Foundation/NSFileHandle.h index ed94ca424..2595571d1 100644 --- a/Headers/Foundation/NSFileHandle.h +++ b/Headers/Foundation/NSFileHandle.h @@ -162,9 +162,7 @@ GS_EXPORT NSString * const NSFileHandleOperationException; NSFileHandle *_readHandle; NSFileHandle *_writeHandle; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (id) pipe; - (NSFileHandle*) fileHandleForReading; diff --git a/Headers/Foundation/NSFileManager.h b/Headers/Foundation/NSFileManager.h index 42811fc1d..33c50f006 100644 --- a/Headers/Foundation/NSFileManager.h +++ b/Headers/Foundation/NSFileManager.h @@ -203,9 +203,7 @@ typedef uint32_t OSType; @private NSString *_lastError; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (NSFileManager*) defaultManager; @@ -389,9 +387,7 @@ typedef uint32_t OSType; BOOL justContents: 1; } _flags; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } - (NSDictionary*) directoryAttributes; - (NSDictionary*) fileAttributes; diff --git a/Headers/Foundation/NSHost.h b/Headers/Foundation/NSHost.h index bafcba093..7ed9da185 100644 --- a/Headers/Foundation/NSHost.h +++ b/Headers/Foundation/NSHost.h @@ -44,9 +44,7 @@ extern "C" { NSSet *_names; NSSet *_addresses; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSIndexPath.h b/Headers/Foundation/NSIndexPath.h index 64237d689..94d41e185 100644 --- a/Headers/Foundation/NSIndexPath.h +++ b/Headers/Foundation/NSIndexPath.h @@ -50,9 +50,7 @@ extern "C" { NSUInteger _length; NSUInteger *_indexes; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSInvocation.h b/Headers/Foundation/NSInvocation.h index a7e4420e0..b96b57e3d 100644 --- a/Headers/Foundation/NSInvocation.h +++ b/Headers/Foundation/NSInvocation.h @@ -50,9 +50,7 @@ extern "C" { BOOL _sendToSuper; void *_retptr; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /* diff --git a/Headers/Foundation/NSKeyedArchiver.h b/Headers/Foundation/NSKeyedArchiver.h index 9c076dbcf..0a05872dd 100644 --- a/Headers/Foundation/NSKeyedArchiver.h +++ b/Headers/Foundation/NSKeyedArchiver.h @@ -71,9 +71,7 @@ extern "C" { NSMutableArray *_obj; /* Array of objects. */ NSPropertyListFormat _format; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** @@ -240,9 +238,7 @@ extern "C" { #endif NSZone *_zone; /* Zone for allocating objs. */ #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSLocale.h b/Headers/Foundation/NSLocale.h index c27fb7641..ac8e55a5b 100644 --- a/Headers/Foundation/NSLocale.h +++ b/Headers/Foundation/NSLocale.h @@ -104,9 +104,7 @@ GS_EXPORT NSString * const NSISO8601Calendar; NSString *_localeId; NSMutableDictionary *_components; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } #if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) diff --git a/Headers/Foundation/NSNumberFormatter.h b/Headers/Foundation/NSNumberFormatter.h index 9c6161ece..102a1c2a1 100644 --- a/Headers/Foundation/NSNumberFormatter.h +++ b/Headers/Foundation/NSNumberFormatter.h @@ -145,9 +145,7 @@ typedef NSUInteger NSNumberFormatterRoundingMode; NSLocale *_locale; void *_formatter; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } // Format diff --git a/Headers/Foundation/NSPort.h b/Headers/Foundation/NSPort.h index d11c404a6..e0a4ce2b0 100644 --- a/Headers/Foundation/NSPort.h +++ b/Headers/Foundation/NSPort.h @@ -211,9 +211,7 @@ typedef SOCKET NSSocketNativeHandle; NSMapTable *events; #endif #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSPortCoder.h b/Headers/Foundation/NSPortCoder.h index 32b40c2f4..9e705a40c 100644 --- a/Headers/Foundation/NSPortCoder.h +++ b/Headers/Foundation/NSPortCoder.h @@ -94,9 +94,7 @@ extern "C" { unsigned _version; /* Version of archiver used. */ NSZone *_zone; /* Zone for allocating objs. */ #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSPortMessage.h b/Headers/Foundation/NSPortMessage.h index 9d434cedd..72e5fdf69 100644 --- a/Headers/Foundation/NSPortMessage.h +++ b/Headers/Foundation/NSPortMessage.h @@ -51,9 +51,7 @@ extern "C" { NSPort *_send; NSMutableArray *_components; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** * OpenStep compatibility. diff --git a/Headers/Foundation/NSPortNameServer.h b/Headers/Foundation/NSPortNameServer.h index 1ad8ec8d5..9033f258f 100644 --- a/Headers/Foundation/NSPortNameServer.h +++ b/Headers/Foundation/NSPortNameServer.h @@ -60,9 +60,7 @@ extern "C" { NSMapTable *_portMap; /* Registered ports information. */ NSMapTable *_nameMap; /* Registered names information. */ #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (id) sharedInstance; - (NSPort*) portForName: (NSString*)name diff --git a/Headers/Foundation/NSProtocolChecker.h b/Headers/Foundation/NSProtocolChecker.h index 2fa5d23cd..068d4eab2 100644 --- a/Headers/Foundation/NSProtocolChecker.h +++ b/Headers/Foundation/NSProtocolChecker.h @@ -42,9 +42,7 @@ extern "C" { Protocol *_myProtocol; NSObject *_myTarget; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } // Creating a checker diff --git a/Headers/Foundation/NSRegularExpression.h b/Headers/Foundation/NSRegularExpression.h index 025149e92..75b45780a 100644 --- a/Headers/Foundation/NSRegularExpression.h +++ b/Headers/Foundation/NSRegularExpression.h @@ -37,6 +37,7 @@ DEFINE_BLOCK_TYPE(GSRegexBlock, void, NSTextCheckingResult*, NSMatchingFlags, BO @private GSREGEXTYPE *regex; NSRegularExpressionOptions options; + GS_PADDING_IVAR; } + (NSRegularExpression*)regularExpressionWithPattern: (NSString*)aPattern options: (NSRegularExpressionOptions)opts diff --git a/Headers/Foundation/NSScanner.h b/Headers/Foundation/NSScanner.h index b6d0454e2..569726d2e 100644 --- a/Headers/Foundation/NSScanner.h +++ b/Headers/Foundation/NSScanner.h @@ -50,9 +50,7 @@ extern "C" { BOOL _caseSensitive; BOOL _isUnicode; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /* diff --git a/Headers/Foundation/NSSortDescriptor.h b/Headers/Foundation/NSSortDescriptor.h index 14f07dc03..a3bd91293 100644 --- a/Headers/Foundation/NSSortDescriptor.h +++ b/Headers/Foundation/NSSortDescriptor.h @@ -50,9 +50,7 @@ extern "C" { BOOL _ascending; SEL _selector; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** Returns a flag indicating whether the sort descriptor sorts objects diff --git a/Headers/Foundation/NSTask.h b/Headers/Foundation/NSTask.h index 56c76eec0..834d43e19 100644 --- a/Headers/Foundation/NSTask.h +++ b/Headers/Foundation/NSTask.h @@ -54,9 +54,7 @@ extern "C" { BOOL _hasCollected; BOOL _hasNotified; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } + (NSTask*) launchedTaskWithLaunchPath: (NSString*)path diff --git a/Headers/Foundation/NSThread.h b/Headers/Foundation/NSThread.h index e40c3d29f..ba6dbe974 100644 --- a/Headers/Foundation/NSThread.h +++ b/Headers/Foundation/NSThread.h @@ -72,9 +72,7 @@ extern "C" { id _gcontext; void *_runLoopInfo; // Per-thread runloop related info. #endif -#if !GS_NONFRAGILE - void *_unused; // For future expansion -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSTimer.h b/Headers/Foundation/NSTimer.h index 80ecae838..22273d950 100644 --- a/Headers/Foundation/NSTimer.h +++ b/Headers/Foundation/NSTimer.h @@ -51,9 +51,7 @@ extern "C" { SEL _selector; id _info; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /* Creating timer objects. */ diff --git a/Headers/Foundation/NSUndoManager.h b/Headers/Foundation/NSUndoManager.h index 81ec14eb7..488fb9f6f 100644 --- a/Headers/Foundation/NSUndoManager.h +++ b/Headers/Foundation/NSUndoManager.h @@ -98,9 +98,7 @@ GS_EXPORT NSString* const NSUndoManagerWillUndoChangeNotification; unsigned _disableCount; unsigned _levelsOfUndo; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } - (void) beginUndoGrouping; diff --git a/Headers/Foundation/NSUserDefaults.h b/Headers/Foundation/NSUserDefaults.h index 09fa2ee72..c7f4aa736 100644 --- a/Headers/Foundation/NSUserDefaults.h +++ b/Headers/Foundation/NSUserDefaults.h @@ -228,9 +228,7 @@ GS_EXPORT NSString* const GSLocale; NSRecursiveLock *_lock; NSDistributedLock *_fileLock; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSXMLNode.h b/Headers/Foundation/NSXMLNode.h index 279363212..fbd7bf7e6 100644 --- a/Headers/Foundation/NSXMLNode.h +++ b/Headers/Foundation/NSXMLNode.h @@ -88,9 +88,7 @@ typedef NSUInteger NSXMLNodeKind; NSUInteger _index; id _objectValue; #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /** diff --git a/Headers/Foundation/NSXMLParser.h b/Headers/Foundation/NSXMLParser.h index 284f84899..fd679a1f6 100644 --- a/Headers/Foundation/NSXMLParser.h +++ b/Headers/Foundation/NSXMLParser.h @@ -74,9 +74,7 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain; void *_parser; // GSXMLParser void *_handler; // SAXHandler #endif -#if !GS_NONFRAGILE - void *_unused; -#endif + GS_PADDING_IVAR; } /**