diff options
author | Florian Frank <flori@ping.de> | 2009-10-25 00:18:11 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2009-10-26 22:58:08 +0100 |
commit | 9a74e40caa5b3aa2f6726ee22052115c45e5bc04 (patch) | |
tree | c59db6bdcde7ca1d7f3b53683297412e8ae1ddad | |
parent | 52e16cb83f17beb568b6c897ca0e16c4cfe65ff2 (diff) | |
download | json-9a74e40caa5b3aa2f6726ee22052115c45e5bc04.tar.gz |
check for ruby 1.8/1.9 header files
-rw-r--r-- | ext/json/ext/generator/extconf.rb | 1 | ||||
-rw-r--r-- | ext/json/ext/generator/generator.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ext/json/ext/generator/extconf.rb b/ext/json/ext/generator/extconf.rb index a0760e2..3d2b6f7 100644 --- a/ext/json/ext/generator/extconf.rb +++ b/ext/json/ext/generator/extconf.rb @@ -10,5 +10,6 @@ if CONFIG['CC'] =~ /gcc/ end have_header("ruby/st.h") || have_header("st.h") +have_header("ruby/re.h") || have_header("re.h") have_header("ruby/encoding.h") create_makefile 'generator' diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c index 335775c..49997f5 100644 --- a/ext/json/ext/generator/generator.c +++ b/ext/json/ext/generator/generator.c @@ -8,7 +8,13 @@ #endif #include "unicode.h" #include <math.h> +#if HAVE_RUBY_RE_H +#include "ruby/re.h" +#endif +#if HAVE_RE_H #include "re.h" +#endif + #ifndef RHASH_TBL #define RHASH_TBL(hsh) (RHASH(hsh)->tbl) |