added support for ruby 2

This commit is contained in:
Unbit
2013-02-25 07:34:34 +01:00
parent 5d6086c84a
commit 0e244fc59c
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -254,8 +254,10 @@ VALUE rb_uwsgi_io_rewind(VALUE obj, VALUE args) {
}
#ifdef RUBY19
#ifdef RUBY_GLOBAL_SETUP
RUBY_GLOBAL_SETUP
#endif
#endif
VALUE uwsgi_require_file(VALUE arg) {
return rb_funcall(rb_cObject, rb_intern("require"), 1, arg);
+1 -1
View File
@@ -14,7 +14,7 @@ v = version.split('.')
GCC_LIST = ['rack_plugin', 'rack_api']
if v[0] == '1' and v[1] == '9':
if (v[0] == '1' and v[1] == '9') or v[0] >= '2':
CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
CFLAGS.append('-DRUBY19')
CFLAGS.append('-Wno-unused-parameter')