mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
minor tweaks for Yosemite
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38667 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0cb388d3d6
commit
06e3db262b
4 changed files with 31 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2015-06-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Headers/GNUstepBase/Additions.h:
|
||||||
|
* Headers/GNUstepBase/GSConfig.h.in:
|
||||||
|
* Headers/GNUstepBase/GSVersionMacros.h:
|
||||||
|
Minor tweaks to build and avoid warnings in Yosemite
|
||||||
|
|
||||||
2015-06-14 Riccardo Mottola <rm@gnu.org>
|
2015-06-14 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
* Headers/Foundation/NSData.h
|
* Headers/Foundation/NSData.h
|
||||||
|
|
|
@ -30,7 +30,10 @@
|
||||||
#import <GNUstepBase/GSVersionMacros.h>
|
#import <GNUstepBase/GSVersionMacros.h>
|
||||||
#import <GNUstepBase/GNUstep.h>
|
#import <GNUstepBase/GNUstep.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if !(defined(NeXT_RUNTIME) || defined(Apple_RUNTIME))
|
||||||
#import <GNUstepBase/GSBlocks.h>
|
#import <GNUstepBase/GSBlocks.h>
|
||||||
|
#endif
|
||||||
#import <GNUstepBase/GSFunctions.h>
|
#import <GNUstepBase/GSFunctions.h>
|
||||||
#import <GNUstepBase/GSLocale.h>
|
#import <GNUstepBase/GSLocale.h>
|
||||||
#import <GNUstepBase/GSLock.h>
|
#import <GNUstepBase/GSLock.h>
|
||||||
|
|
|
@ -409,12 +409,19 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !__has_feature(objc_arc)
|
#if !__has_feature(objc_arc)
|
||||||
# if __OBJC_GC__
|
# if !defined(__weak)
|
||||||
# define __strong __attribute__((objc_gc(strong)))
|
# if __OBJC_GC__
|
||||||
# define __weak __attribute__((objc_gc(weak)))
|
# define __weak __attribute__((objc_gc(weak)))
|
||||||
# else
|
# else
|
||||||
# define __strong
|
# define __weak
|
||||||
# define __weak
|
# endif
|
||||||
|
# endif
|
||||||
|
# if !defined(__strong)
|
||||||
|
# if __OBJC_GC__
|
||||||
|
# define __strong __attribute__((objc_gc(strong)))
|
||||||
|
# else
|
||||||
|
# define __strong
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -406,27 +406,35 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; }
|
||||||
/* Attribute macros compatible with Apple.
|
/* Attribute macros compatible with Apple.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef NS_FORMAT_ARGUMENT
|
||||||
#if defined(__clang__) || GS_GCC_MINREQ(4,2)
|
#if defined(__clang__) || GS_GCC_MINREQ(4,2)
|
||||||
# define NS_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
|
# define NS_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
|
||||||
#else
|
#else
|
||||||
# define NS_FORMAT_ARGUMENT(F,A)
|
# define NS_FORMAT_ARGUMENT(F,A)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// FIXME ... what version of gcc?
|
// FIXME ... what version of gcc?
|
||||||
|
#ifndef NS_FORMAT_FUNCTION
|
||||||
#if __clang__
|
#if __clang__
|
||||||
# define NS_FORMAT_FUNCTION(F,A) __attribute__((format(__NSString__, F, A)))
|
# define NS_FORMAT_FUNCTION(F,A) __attribute__((format(__NSString__, F, A)))
|
||||||
#else
|
#else
|
||||||
# define NS_FORMAT_FUNCTION(F,A)
|
# define NS_FORMAT_FUNCTION(F,A)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NS_REQUIRES_NIL_TERMINATION
|
||||||
#define NS_REQUIRES_NIL_TERMINATION __attribute__((sentinel))
|
#define NS_REQUIRES_NIL_TERMINATION __attribute__((sentinel))
|
||||||
|
#endif
|
||||||
|
|
||||||
// FIXME ... what exact version of clang and gcc?
|
// FIXME ... what exact version of clang and gcc?
|
||||||
|
#ifndef UNAVAILABLE_ATTRIBUTE
|
||||||
#if defined(__clang__) || GS_GCC_MINREQ(4,0)
|
#if defined(__clang__) || GS_GCC_MINREQ(4,0)
|
||||||
# define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable))
|
# define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable))
|
||||||
#else
|
#else
|
||||||
# define UNAVAILABLE_ATTRIBUTE
|
# define UNAVAILABLE_ATTRIBUTE
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check if compiler supports @optional in protocols
|
/* Check if compiler supports @optional in protocols
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue