From a4bed3ab1437f55f3fa37c27b27668842a8a1da4 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Wed, 12 Feb 2014 17:21:42 +0000 Subject: [PATCH] fixed: compiling on Debian with GCC 4.8 git-svn-id: svn://ttmath.org/publicrep/winix/trunk@950 e52654a7-88a9-db11-a3e9-0013d4bc506e --- Makefile | 6 +++--- core/app.cpp | 7 ++++--- core/plugin.cpp | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e186638..7d6dc81 100755 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ include Makefile.dep #ifndef CXX # temporarily workaround: forcing using clang (CXX is defined by the OS and is equal to g++) -CXX = clang++ +CXX = g++-4.8 #endif ifndef CXXFLAGS -CXXFLAGS = -Wall -O0 -g -fPIC -pthread -std=c++11 -I/usr/local/include -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM +CXXFLAGS = -Wall -O0 -g -fPIC -pthread -std=c++11 -I/usr/local/include -I/usr/include/postgresql -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM endif @@ -51,7 +51,7 @@ winix.so: $(winix.src.files) @cd ../ezc/src ; $(MAKE) -e @cd ../tito/src ; $(MAKE) -e @cd ../pikotools ; $(MAKE) -e - $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) core/*.o db/*.o functions/*.o templates/*.o notify/*.o ../ezc/src/ezc.a ../tito/src/tito.a ../pikotools/utf8/utf8.a ../pikotools/space/space.a ../pikotools/mainparser/mainparser.a ../pikotools/date/date.a $(LDFLAGS) -lfcgi -lpq -lz -lfetch -lpthread -lcurl -Wl,-no-whole-archive + $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) core/*.o db/*.o functions/*.o templates/*.o notify/*.o ../ezc/src/ezc.a ../tito/src/tito.a ../pikotools/utf8/utf8.a ../pikotools/space/space.a ../pikotools/mainparser/mainparser.a ../pikotools/date/date.a $(LDFLAGS) -lfcgi -lpq -lz -lpthread -lcurl -Wl,-no-whole-archive winix: winix.so $(winix.src.files) diff --git a/core/app.cpp b/core/app.cpp index 00bf6b2..1d726e6 100755 --- a/core/app.cpp +++ b/core/app.cpp @@ -746,7 +746,7 @@ void App::ReadGetPostVars() void App::CheckIE() { - char * msie = strstr(cur.request->env_http_user_agent, "MSIE"); + const char * msie = strstr(cur.request->env_http_user_agent, "MSIE"); if( msie ) cur.request->browser_msie = true; @@ -758,7 +758,7 @@ void App::CheckIE() void App::CheckKonqueror() { - char * kon = strstr(cur.request->env_http_user_agent, "Konqueror"); + const char * kon = strstr(cur.request->env_http_user_agent, "Konqueror"); if( kon ) cur.request->browser_konqueror = true; @@ -1672,6 +1672,7 @@ void App::FetchPageOnExit() void * App::SpecialThreadForSignals(void * app_object) { sigset_t set; +int sig; App * app = reinterpret_cast(app_object); @@ -1680,7 +1681,7 @@ sigset_t set; sigaddset(&set, SIGINT); // waiting for SIGTERM or SIGINT - sigwait(&set, 0); + sigwait(&set, &sig); app->Lock(); app->synchro.was_stop_signal = true; diff --git a/core/plugin.cpp b/core/plugin.cpp index d82458f..44cd648 100755 --- a/core/plugin.cpp +++ b/core/plugin.cpp @@ -180,7 +180,7 @@ void * Plugin::LoadInitFun(const char * filename, Fun1 & fun_init) return 0; } - fun_init = (Fun1)dlfunc(p, "Init"); + fun_init = (Fun1)dlsym(p, "Init"); if( !fun_init ) {