mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Make olde code-path for constant with enum available again for older GCC versions.
According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69960 a C extension to constant initializers is needed which is available only in recent versions. 8.1 is proven, I suppose 8.0 in this patch
This commit is contained in:
parent
c19d77bd0e
commit
6e39f11098
1 changed files with 5 additions and 0 deletions
|
@ -292,7 +292,12 @@ typedef NS_ENUM(NSInteger, NSComparisonResult)
|
|||
NSOrderedAscending = (NSInteger)-1, NSOrderedSame, NSOrderedDescending
|
||||
};
|
||||
|
||||
// check for older versions of GCC and try to ignore clang pretending to know GNUC dialects
|
||||
#if defined(__GNUC__) && !defined(__clang__) && GCC_VERSION < 80000
|
||||
enum {NSNotFound = NSIntegerMax};
|
||||
#else
|
||||
static const NSInteger NSNotFound = NSIntegerMax;
|
||||
#endif
|
||||
|
||||
DEFINE_BLOCK_TYPE(NSComparator, NSComparisonResult, id, id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue