From be4d324f6b51494eff81e73d32c120d6d8d14c5a Mon Sep 17 00:00:00 2001 From: Unbit Date: Sun, 11 Aug 2013 08:41:02 +0200 Subject: [PATCH] better symbol detection for pypy --- plugins/pypy/pypy_plugin.c | 6 ++++++ uwsgiconfig.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/pypy/pypy_plugin.c b/plugins/pypy/pypy_plugin.c index 8184aa80..8ec8b2c3 100644 --- a/plugins/pypy/pypy_plugin.c +++ b/plugins/pypy/pypy_plugin.c @@ -144,7 +144,13 @@ ready: } else { char *start = dlsym(RTLD_DEFAULT, "uwsgi_pypy_setup_start"); + if (!start) { + start = dlsym(RTLD_DEFAULT, "_uwsgi_pypy_setup_start"); + } char *end = dlsym(RTLD_DEFAULT, "uwsgi_pypy_setup_end"); + if (!end) { + end = dlsym(RTLD_DEFAULT, "_uwsgi_pypy_setup_end"); + } if (start && end) { buffer = uwsgi_concat2n(start, end-start, "", 0); } diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 93862870..254de284 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -1122,7 +1122,7 @@ class uConf(object): report['xml'] = 'expat' if self.get('plugin_dir'): - self.cflags.append('-DUWSGI_PLUGIN_DIR=\\"%s\\"' % self.get('plugin_dir')) + self.cflags.append('-DUWSGI_PLUGIN_DIR="\\"%s\\""' % self.get('plugin_dir')) report['plugin_dir'] = self.get('plugin_dir') if self.get('debug'):