From 547ad24cea7461f3bee425e86151745b710f76ef Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 19 Feb 2012 15:07:22 +0100 Subject: [PATCH] Add macro B_IF_GCC_2 It resolves to an "if" or "else" parameter depending on the gcc version. --- headers/private/binary_compatibility/Global.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/headers/private/binary_compatibility/Global.h b/headers/private/binary_compatibility/Global.h index 8067e3e6fd..6ba9693e68 100644 --- a/headers/private/binary_compatibility/Global.h +++ b/headers/private/binary_compatibility/Global.h @@ -1,12 +1,19 @@ /* * Copyright 2008, Oliver Tappe, zooey@hirschkaefer.de. - * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2008-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #ifndef _BINARY_COMPATIBILITY_GLOBAL_H_ #define _BINARY_COMPATIBILITY_GLOBAL_H_ +#if __GNUC__ == 2 +# define B_IF_GCC_2(ifBlock, elseBlock) ifBlock +#else +# define B_IF_GCC_2(ifBlock, elseBlock) elseBlock +#endif + + // method codes enum { // app kit