2013-04-24 05:17:02 +00:00
|
|
|
diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
|
|
|
|
index 2375bc9..b908417 100644
|
2013-04-02 12:45:42 +00:00
|
|
|
--- a/plugins/rack/uwsgiplugin.py
|
|
|
|
+++ b/plugins/rack/uwsgiplugin.py
|
2013-04-24 05:17:02 +00:00
|
|
|
@@ -10,13 +10,14 @@ except:
|
2013-04-02 12:45:42 +00:00
|
|
|
rbconfig = 'Config'
|
|
|
|
|
|
|
|
version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
|
|
|
|
-v = version.split('.')
|
|
|
|
|
|
|
|
GCC_LIST = ['rack_plugin', 'rack_api']
|
|
|
|
|
2013-04-24 05:17:02 +00:00
|
|
|
-if (v[0] == '1' and v[1] == '9') or v[0] >= '2':
|
2013-04-02 12:45:42 +00:00
|
|
|
+if version >= '1.9':
|
|
|
|
CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
|
|
|
|
CFLAGS.append('-DRUBY19')
|
|
|
|
+ if version >= '2.0':
|
|
|
|
+ CFLAGS.append('-DRUBY20')
|
|
|
|
CFLAGS.append('-Wno-unused-parameter')
|
|
|
|
rbconfig = 'RbConfig'
|
|
|
|
else:
|
2013-04-24 05:17:02 +00:00
|
|
|
diff --git a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
|
|
|
|
index 4f35984..156018f 100644
|
2013-04-02 12:45:42 +00:00
|
|
|
--- a/plugins/ruby19/uwsgiplugin.py
|
|
|
|
+++ b/plugins/ruby19/uwsgiplugin.py
|
2013-04-24 05:17:02 +00:00
|
|
|
@@ -10,13 +10,14 @@ except:
|
2013-04-02 12:45:42 +00:00
|
|
|
rbconfig = 'Config'
|
|
|
|
|
|
|
|
version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
|
|
|
|
-v = version.split('.')
|
|
|
|
|
|
|
|
GCC_LIST = ['../rack/rack_plugin', '../rack/rack_api']
|
|
|
|
|
|
|
|
-if v[0] == '1' and v[1] == '9':
|
|
|
|
+if version >= '1.9':
|
|
|
|
CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
|
|
|
|
CFLAGS.append('-DRUBY19')
|
|
|
|
+ if version >= '2.0':
|
|
|
|
+ CFLAGS.append('-DRUBY20')
|
|
|
|
CFLAGS.append('-Wno-unused-parameter')
|
|
|
|
rbconfig = 'RbConfig'
|
|
|
|
else:
|