summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-12 14:58:06 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-12 14:58:06 +0000
commit6cf3dc3145a48ce1ddc0e5265c4d16ce61ce9cb4 (patch)
tree36f01da1958c753b5ba8bba5da826fb042e6e990 /ext/date
parent388215e32396b1a67bab2849951f48ffc68dfb19 (diff)
merge revision(s) 50104,50105: [Backport #10906]
* ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906] ruby itself (including numeric.c) is built with strict compile options including -std=iso9899:1999, but ext/date is not. By the way -std=iso9899:1999 is not only a warning option but also changes behavior like MACRO definitions for example INFINITY. gcc on Solaris affect this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/extconf.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/date/extconf.rb b/ext/date/extconf.rb
index 9f7d3e8f0b..6f479eaa26 100644
--- a/ext/date/extconf.rb
+++ b/ext/date/extconf.rb
@@ -1,2 +1,5 @@
require 'mkmf'
+if try_cflags("-std=iso9899:1999")
+ $CFLAGS += " " << "-std=iso9899:1999"
+end
create_makefile('date_core')