gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Version Macros


From: Stefan Bidi
Subject: Version Macros
Date: Tue, 22 Nov 2011 18:44:18 -0600

I think there's something wrong with the version macros in GSVersionMacros.h.  I'm not sure how it all works, so I've tried writing different cases on paper and never come out with something that seems reasonable.

For example, if I have OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST) and MAC_OS_X_VERSION_MIN_ALLOWED = MAC_OS_X_VERSION_10_1, the macro returns false (100100 >= 100000 && 100100 < 999999 -> false), even though it should return true.  The same will happen if MAC_OS_X_VERSION_MAX_ALLOWED is defined, instead.  It's even worst if both are defined because the max allowed won't even be picked up.

There's also an issue in NSStream.h:28 with #if OS_API_VERSION(100400,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST).  Well, the problem here is that OS_API_VERSION and GS_API_VERSION are defined exactly the same in GSVersionMacros.h, so if either MAC_OS_X_VERSION_MIN_ALLOWED or MAC_OS_X_VERSION_MAX_ALLOWED are defined NSStream will not be available due to GS_API_VERSION( 10200,GS_API_LATEST).

Stef

reply via email to

[Prev in Thread] Current Thread [Next in Thread]