aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-22 08:41:19 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-22 08:41:19 +0000
commit86541e02c18e6ccdd0c0c632da06120a04a9ef11 (patch)
treec89dd3db63a078933074362e419de68fcc923628
parent4d7e8b7305c392646f68a785df8f4019ec1e69c9 (diff)
downloadruby-86541e02c18e6ccdd0c0c632da06120a04a9ef11.tar.gz
* tool/gen_dummy_probes.rb: don't change #include, #if and #endif
lines. [Bug #7370] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rwxr-xr-xtool/gen_dummy_probes.rb5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 91114667b5..a7d68c2860 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Nov 22 17:39:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * tool/gen_dummy_probes.rb: don't change #include, #if and #endif
+ lines. [Bug #7370]
+
Thu Nov 22 16:58:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* Makefile.in: run preprocessor when making probe.h
diff --git a/tool/gen_dummy_probes.rb b/tool/gen_dummy_probes.rb
index e7efbd6822..46af8cbb5c 100755
--- a/tool/gen_dummy_probes.rb
+++ b/tool/gen_dummy_probes.rb
@@ -2,10 +2,10 @@
# -*- coding: us-ascii -*-
text = ARGF.read
-text.upcase!
+text.gsub!(/^(?!#)(.*)/){$1.upcase}
# remove the pragma declarations
-text.gsub!(/^#PRAGMA.*$/, '')
+text.gsub!(/^#pragma.*$/, '')
# replace the provider section with the start of the header file
text.gsub!(/PROVIDER RUBY \{/, "#ifndef\t_PROBES_H\n#define\t_PROBES_H\n#define DTRACE_PROBES_DISABLED 1\n")
@@ -23,3 +23,4 @@ text.gsub!(/\([^,)]+,[^,)]+,[^,)]+,[^,)]+,[^,)]+\)/, '(arg0, arg1, arg2, arg3, a
text.gsub!(/ *PROBE ([^\(]*)(\([^\)]*\));/, "#define RUBY_DTRACE_\\1_ENABLED() 0\n#define RUBY_DTRACE_\\1\\2\ do \{ \} while\(0\)")
print text
+