ruby-changes:30969
From: naruse <ko1@a...>
Date: Thu, 26 Sep 2013 15:06:25 +0900 (JST)
Subject: [ruby-changes:30969] naruse:r43048 (trunk): Fix compilation on gcc 4.6
naruse 2013-09-26 15:06:19 +0900 (Thu, 26 Sep 2013) New Revision: 43048 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43048 Log: Fix compilation on gcc 4.6 if __has_feature is not defined, it can't compile Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 43047) +++ gc.c (revision 43048) @@ -31,8 +31,12 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L31 #include <sys/types.h> #include <assert.h> -#if /* is ASAN enabled? */ defined(__has_feature) ? \ - __has_feature(address_sanitizer) /* Clang */ : \ +#ifndef __has_feature +# define __has_feature(x) 0 +#endif + +#if /* is ASAN enabled? */ \ + __has_feature(address_sanitizer) /* Clang */ || \ defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */ #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \ __attribute__((no_address_safety_analysis)) \ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/