diff options
author | pfg <pfg@FreeBSD.org> | 2014-04-07 01:55:54 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-04-07 01:55:54 +0000 |
commit | f0fa402e84d9cbbf682051cf69ad5fb25011eb13 (patch) | |
tree | 20efae5f531049f4e26f5c8c9cdeea3194636bd9 | |
parent | 0a0ec7aed42f294456f40beebb14c8d18cc41dd9 (diff) | |
download | FreeBSD-src-f0fa402e84d9cbbf682051cf69ad5fb25011eb13.zip FreeBSD-src-f0fa402e84d9cbbf682051cf69ad5fb25011eb13.tar.gz |
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
-rw-r--r-- | contrib/gcc/c-cppbuiltin.c | 5 | ||||
-rw-r--r-- | sys/sys/param.h | 2 |
2 files changed, 5 insertions, 2 deletions
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__"); diff --git a/sys/sys/param.h b/sys/sys/param.h index 05b5968..ae1704a 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000705 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000706 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, |