summaryrefslogtreecommitdiff
path: root/ext/date/extconf.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-18 11:57:07 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-18 11:57:07 +0000
commit18d73ae8151ff259fe8e4aac8f228173dbe57924 (patch)
tree85f624eed12a8a54ac5601b6310769c6c68448a7 /ext/date/extconf.rb
parent5d428a7e52ecad84e9be438871ca039fb6ccea11 (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_1@52645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/extconf.rb')
-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')