Apple compatibility fixups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24207 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-12-15 11:33:18 +00:00
parent 1e7cdf229b
commit 50c5c6b2d9
7 changed files with 43 additions and 26 deletions

View file

@ -4,6 +4,19 @@
* Source/cifframe.m:
* Source/callframe.m:
Fix error testing whether object is an instance.
* Headers/Foundation/NSString.h:
* Headers/Foundation/NSPropertyList.h:
* Headers/Foundation/NSDistributedNotificationCenter.h:
* Headers/Foundation/NSNotificationQueue.h:
* Headers/Foundation/NSGeometry.h:
* Headers/Foundation/NSDecimal.h:
Audit all headers and make more MacOS-X enumeration constant fixups
so that we shouldn't need to break binary compatibility for additions
to the enumeration constants in future (we hope) there is stll the
possibility of apple adding constants which conflict with gnustep
extensions, though I've left a big gap between apple and gnu
values so that conflict should be unlikely unless they specifically
try to do it.
2006-12-14 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -51,9 +51,9 @@ extern "C" {
* [(NSDecimalNumberBehaviors)] protocol.
*/
typedef enum {
NSRoundPlain, /* Round .5 up */
NSRoundDown,
NSRoundUp,
NSRoundPlain, /* Round .5 up */
NSRoundBankers /* Make last digit even */
} NSRoundingMode;
@ -75,9 +75,9 @@ typedef enum {
*/
typedef enum {
NSCalculationNoError = 0,
NSCalculationLossOfPrecision,
NSCalculationUnderflow, /* result became zero */
NSCalculationOverflow,
NSCalculationLossOfPrecision,
NSCalculationDivideByZero
} NSCalculationError;

View file

@ -51,10 +51,10 @@ extern "C" {
</example>
*/
typedef enum {
NSNotificationSuspensionBehaviorDrop,
NSNotificationSuspensionBehaviorCoalesce,
NSNotificationSuspensionBehaviorHold,
NSNotificationSuspensionBehaviorDeliverImmediately
NSNotificationSuspensionBehaviorDrop = 1,
NSNotificationSuspensionBehaviorCoalesce = 2,
NSNotificationSuspensionBehaviorHold = 3,
NSNotificationSuspensionBehaviorDeliverImmediately = 4
} NSNotificationSuspensionBehavior;
/**

View file

@ -123,10 +123,10 @@ typedef NSRect *NSRectPointer;
*/
typedef enum _NSRectEdge
{
NSMinXEdge,
NSMinYEdge,
NSMaxXEdge,
NSMaxYEdge
NSMinXEdge = 0,
NSMinYEdge = 1,
NSMaxXEdge = 2,
NSMaxYEdge = 3
} NSRectEdge;
/** Point at 0,0 */

View file

@ -74,9 +74,9 @@ extern "C" {
</example>
*/
typedef enum {
NSPostWhenIdle,
NSPostASAP,
NSPostNow
NSPostWhenIdle = 1,
NSPostASAP = 2,
NSPostNow = 3
} NSPostingStyle;
/**
@ -91,9 +91,9 @@ typedef enum {
</example>
*/
typedef enum {
NSNotificationNoCoalescing = 0,
NSNotificationCoalescingOnName = 1,
NSNotificationCoalescingOnSender = 2,
NSNotificationNoCoalescing = 0,
NSNotificationCoalescingOnName = 1,
NSNotificationCoalescingOnSender = 2,
} NSNotificationCoalescing;
/*

View file

@ -44,7 +44,7 @@ extern "C" {
* deserialisation of a property list.
*/
typedef enum {
NSPropertyListImmutable,
NSPropertyListImmutable = 0,
/** <strong>NSPropertyListImmutable</strong>
* all objects in created list are immutable
*/
@ -62,19 +62,22 @@ typedef enum {
* Specifies the serialisation format for a serialised property list.
*/
typedef enum {
NSPropertyListGNUstepFormat,
NSPropertyListOpenStepFormat = 1,
/** <strong>NSPropertyListOpenStepFormat</strong>
* the most human-readable format */
NSPropertyListXMLFormat_v1_0 = 100,
/** <strong>NSPropertyListXMLFormat_v1_0</strong>
* portable and readable */
NSPropertyListBinaryFormat_v1_0 = 200,
/** <strong>NSPropertyListBinaryFormat_v1_0</strong>
* the standard format on macos-x */
NSPropertyListGNUstepFormat = 1000,
/** <strong>NSPropertyListGNUstepFormat</strong>
* extension of OpenStep format */
NSPropertyListGNUstepBinaryFormat,
/** <strong>NSPropertyListGNUstepBinaryFormat</strong>
* efficient, hardware independent */
NSPropertyListOpenStepFormat,
/** <strong>NSPropertyListOpenStepFormat</strong>
* the most human-readable format */
NSPropertyListXMLFormat_v1_0,
/** <strong>NSPropertyListXMLFormat_v1_0</strong>
* portable and readable */
NSPropertyListBinaryFormat_v1_0,
} NSPropertyListFormat;
/**

View file

@ -53,7 +53,8 @@ enum
NSCaseInsensitiveSearch = 1,
NSLiteralSearch = 2,
NSBackwardsSearch = 4,
NSAnchoredSearch = 8
NSAnchoredSearch = 8,
NSNumericSearch = 64 /* MacOS-X 10.2 */
};
/**