From 4921e36cbc8fb5220e3c72b88a51dceaa8a3ad25 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 27 Nov 2012 20:22:44 -0800 Subject: make some header file adjustments for ruby compile --- ext/psych/.gitignore | 11 +++++++++++ ext/psych/extconf.rb | 2 +- ext/psych/yaml/yaml_private.h | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ext/psych/.gitignore diff --git a/ext/psych/.gitignore b/ext/psych/.gitignore new file mode 100644 index 0000000..836058c --- /dev/null +++ b/ext/psych/.gitignore @@ -0,0 +1,11 @@ +/api.c +/config.h +/dumper.c +/emitter.c +/loader.c +/parser.c +/reader.c +/scanner.c +/writer.c +/yaml.h +/yaml_private.h diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb index dc4b3f6..b294aab 100644 --- a/ext/psych/extconf.rb +++ b/ext/psych/extconf.rb @@ -11,7 +11,7 @@ unless find_header('yaml.h') && find_library('yaml', 'yaml_get_version') srcdir = File.expand_path File.dirname __FILE__ files = Dir.chdir File.join(srcdir, 'yaml') do Dir.entries(Dir.pwd).find_all { |f| - File.file? f + File.file?(f) && File.extname(f) =~ /^\.[hc]/ }.map { |f| File.expand_path f } end diff --git a/ext/psych/yaml/yaml_private.h b/ext/psych/yaml/yaml_private.h index ed5ea66..2b3e074 100644 --- a/ext/psych/yaml/yaml_private.h +++ b/ext/psych/yaml/yaml_private.h @@ -1,3 +1,6 @@ +#ifdef RUBY_EXTCONF_H +#include RUBY_EXTCONF_H +#endif #if HAVE_CONFIG_H #include -- cgit v1.2.3