fix python version printing on freeky systems

This commit is contained in:
roberto@opensuse12
2012-04-25 08:11:12 +02:00
parent 0d28d210d4
commit 8f10b8fece
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ int uwsgi_python_init() {
#ifndef UWSGI_PYPY
char *pyversion = strchr(Py_GetVersion(), '\n');
if (!pyversion) {
uwsgi_log_initial("Python version: %s %s\n", Py_GetVersion(), Py_GetCompiler()+1);
uwsgi_log_initial("Python version: %s\n", Py_GetVersion());
}
else {
uwsgi_log_initial("Python version: %.*s %s\n", pyversion-Py_GetVersion(), Py_GetVersion(), Py_GetCompiler()+1);
+6
View File
@@ -1654,6 +1654,12 @@ int main(int argc, char *argv[], char *envp[]) {
uwsgi_log_initial("*** big endian arch detected ***\n");
#endif
#if defined(_SC_NPROCESSORS_ONLN)
uwsgi_log_initial("detected number of CPU cores: %d\n", sysconf(_SC_NPROCESSORS_ONLN));
#elif defined(_SC_NPROCESSORS_CONF)
uwsgi_log_initial("detected number of CPU cores: %d\n", sysconf(_SC_NPROCESSORS_CONF));
#endif
uwsgi_log_initial("current working directory: %s\n", uwsgi.cwd);