From a04215bac4470a5c5932951d05e97750370b2606 Mon Sep 17 00:00:00 2001 From: rfm Date: Sat, 20 Feb 2010 18:05:00 +0000 Subject: [PATCH] tweaks to avoid compiler warnings git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29691 72102866-910b-0410-8b05-ffd578937521 --- Headers/Additions/GNUstepBase/GSConfig.h.in | 2 +- Source/ObjectiveC2/Availability.h | 14 ++++++++------ Source/ObjectiveC2/runtime.h | 18 ++++++++++++------ Source/common.h | 5 ++++- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Headers/Additions/GNUstepBase/GSConfig.h.in b/Headers/Additions/GNUstepBase/GSConfig.h.in index ddbf40ab0..8af0d3855 100644 --- a/Headers/Additions/GNUstepBase/GSConfig.h.in +++ b/Headers/Additions/GNUstepBase/GSConfig.h.in @@ -218,7 +218,7 @@ typedef struct { #define OBJC2RUNTIME @OBJC2RUNTIME@ -#import +#include #endif /* included_GSConfig_h */ diff --git a/Source/ObjectiveC2/Availability.h b/Source/ObjectiveC2/Availability.h index c8fe3677e..e0d400d07 100644 --- a/Source/ObjectiveC2/Availability.h +++ b/Source/ObjectiveC2/Availability.h @@ -5,13 +5,15 @@ # define OBJC_NONPORTABLE #endif -#if !defined(__DEPRECATE_DIRECT_ACCESS) || defined(__OBJC_LEGACY_GNU_MODE__) || defined(__OBJC_RUNTIME_INTERNAL__) -# define OBJC_DEPRECATED -#else -# if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR >= 1)) -# define OBJC_DEPRECATED __attribute__((deprecated)) -# else +#if !defined(OBJC_DEPRECATED) +# if !defined(__DEPRECATE_DIRECT_ACCESS) || defined(__OBJC_LEGACY_GNU_MODE__) || defined(__OBJC_RUNTIME_INTERNAL__) # define OBJC_DEPRECATED +# else +# if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR >= 1)) +# define OBJC_DEPRECATED __attribute__((deprecated)) +# else +# define OBJC_DEPRECATED +# endif # endif #endif diff --git a/Source/ObjectiveC2/runtime.h b/Source/ObjectiveC2/runtime.h index 63b783dac..f3aaa3a9f 100644 --- a/Source/ObjectiveC2/runtime.h +++ b/Source/ObjectiveC2/runtime.h @@ -2,17 +2,23 @@ #include #include -#ifdef ERROR_UNSUPPORTED_RUNTIME_FUNCTIONS +#if defined(ERROR_UNSUPPORTED_RUNTIME_FUNCTIONS) # define OBJC_GNU_RUNTIME_UNSUPPORTED(x) \ - __attribute__((error(x " not supported by the GNU runtime"))) +__attribute__((error(x " not supported by the GNU runtime"))) #else # define OBJC_GNU_RUNTIME_UNSUPPORTED(x) #endif -#if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR >= 1)) -# define OBJC_DEPRECATED __attribute__((deprecated)) -#else -# define OBJC_DEPRECATED +#if !defined(OBJC_DEPRECATED) +# if !defined(__DEPRECATE_DIRECT_ACCESS) || defined(__OBJC_LEGACY_GNU_MODE__) || defined(__OBJC_RUNTIME_INTERNAL__) +# define OBJC_DEPRECATED +# else +# if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR >= 1)) +# define OBJC_DEPRECATED __attribute__((deprecated)) +# else +# define OBJC_DEPRECATED +# endif +# endif #endif // Undo GNUstep substitutions diff --git a/Source/common.h b/Source/common.h index e675688eb..8b4337125 100644 --- a/Source/common.h +++ b/Source/common.h @@ -6,8 +6,11 @@ #import "config.h" -#import "GNUstepBase/GSConfig.h" +/* GNUstepBase/GSConfig.h includes so + * we import local versions first. + */ #import "GNUstepBase/preface.h" +#import "GNUstepBase/GSConfig.h" /* Foundation/NSObject.h imports and * so we import local versions first.