From f0fa402e84d9cbbf682051cf69ad5fb25011eb13 Mon Sep 17 00:00:00 2001 From: pfg Date: Mon, 7 Apr 2014 01:55:54 +0000 Subject: MFC r264121; gcc: define __block when block support is enabled This mimics the behaviour in clang and lets us build cleanly the libdispatch port on platforms where the base gcc is still the default compiler. Bump __FreeBSD_version for ports. Tested by: theraven --- contrib/gcc/c-cppbuiltin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib/gcc/c-cppbuiltin.c') diff --git a/contrib/gcc/c-cppbuiltin.c b/contrib/gcc/c-cppbuiltin.c index 6dd6e18..6b65cdf 100644 --- a/contrib/gcc/c-cppbuiltin.c +++ b/contrib/gcc/c-cppbuiltin.c @@ -504,7 +504,10 @@ c_cpp_builtins (cpp_reader *pfile) /* APPLE LOCAL begin blocks */ /* APPLE LOCAL radar 5868913 */ if (flag_blocks) - cpp_define (pfile, "__BLOCKS__=1"); + { + cpp_define (pfile, "__block=__attribute__((__blocks__(byref)))"); + cpp_define (pfile, "__BLOCKS__=1"); + } /* APPLE LOCAL end blocks */ if (optimize_size) cpp_define (pfile, "__OPTIMIZE_SIZE__"); -- cgit v1.1