summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-19 13:11:33 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-19 13:11:33 (GMT)
commita9025c884180e446e0607981cf61fe4b1d86d046 (patch)
tree20d7c4b799b5f1cc3ccee5ca8f9517eef11c373b /tool
parent6458ae1bbac673ec8fda958c5d219aba9afb15af (diff)
transform_mjit_header.rb: fix up r65169
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/transform_mjit_header.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb
index 704ef2a..4784a47 100644
--- a/tool/transform_mjit_header.rb
+++ b/tool/transform_mjit_header.rb
@@ -228,11 +228,12 @@ if MJITHeader.windows? # transformation is broken with Windows headers for now
end
macro, code = MJITHeader.separate_macro_and_code(code) # note: this does not work on MinGW
-code_to_check = "#{<<header}#{code}#{macro}" # macro should not affect code again
+code = <<header + code
#ifdef __GNUC__
# pragma GCC system_header
#endif
header
+code_to_check = "#{code}#{macro}" # macro should not affect code again
if MJITHeader.conflicting_types?(code_to_check, cc, cflags)
cflags = "#{cflags} -std=c99" # For AIX gcc