Detect whether st.h is present and don't use RUBY_VM as the condition

This commit is contained in:
Dirkjan Bussink 2012-03-17 12:43:26 +01:00
parent 4a0d7f18fd
commit bf18e04134
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
require 'mkmf' require 'mkmf'
require './version.rb' require './version.rb'
$CFLAGS << %[ -I.. -Wall -O3 -DMESSAGEPACK_VERSION=\\"#{MessagePack::VERSION}\\" -g] $CFLAGS << %[ -I.. -Wall -O3 -DMESSAGEPACK_VERSION=\\"#{MessagePack::VERSION}\\" -g]
have_header("ruby/st.h")
create_makefile('msgpack') create_makefile('msgpack')

View File

@ -40,8 +40,8 @@ static ID s_append;
#include "msgpack/pack_template.h" #include "msgpack/pack_template.h"
#ifndef RUBY_VM #ifdef HAVE_RUBY_ST_H
#include "st.h" // ruby hash #include "ruby/st.h" // ruby hash
#endif #endif
#define ARG_BUFFER(name, argc, argv) \ #define ARG_BUFFER(name, argc, argv) \