From 329e2d80018a3d3e2ed15ce4df357ef59d2fea19 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Sat, 30 Jun 2012 18:37:52 +0000 Subject: [PATCH] fixed: when there is no option "locale_files" in the config the "en" should be loaded by default added: LDFLAGS option to Makefiles added: compilation with CLANG (some const objects should have been created with default cctor) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@856 e52654a7-88a9-db11-a3e9-0013d4bc506e --- Makefile | 14 ++++++++++---- core/config.cpp | 3 +++ core/plugindata.h | 2 +- plugins/export/Makefile | 2 +- plugins/gallery/Makefile | 4 ++-- plugins/group/Makefile | 2 +- plugins/menu/Makefile | 2 +- plugins/stats/Makefile | 2 +- plugins/thread/Makefile | 2 +- plugins/ticket/Makefile | 2 +- templates/htmltextstream.cpp | 7 +++++++ templates/htmltextstream.h | 2 ++ 12 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 54a849f..9e8d957 100755 --- a/Makefile +++ b/Makefile @@ -6,11 +6,17 @@ CXX = g++ endif ifndef CXXFLAGS -CXXFLAGS = -fPIC -Wall -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -I/home/tomek/roboczy/tito/src -I/home/tomek/roboczy/pikotools -L/usr/local/lib -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM +CXXFLAGS = -fPIC -Wall -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -I/home/tomek/roboczy/tito/src -I/home/tomek/roboczy/pikotools -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM endif +ifndef LDFLAGS +LDFLAGS = -L/usr/local/lib +endif + + export CXX export CXXFLAGS +export LDFLAGS all: winix.so plugins winix @@ -26,13 +32,13 @@ winix.so: FORCE @cd ../ezc/src ; $(MAKE) -e @cd ../tito/src ; $(MAKE) -e @cd ../pikotools ; $(MAKE) -e - $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) 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 -lfcgi -lpq -lz -lfetch -lpthread -Wl,-no-whole-archive + $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) 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 -Wl,-no-whole-archive -winix: FORCE +winix: winix.so FORCE @cd main ; $(MAKE) -e # use the full path with winix.so - $(CXX) -o winix $(CXXFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so + $(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so diff --git a/core/config.cpp b/core/config.cpp index 10e3b77..e77d026 100755 --- a/core/config.cpp +++ b/core/config.cpp @@ -268,6 +268,9 @@ void Config::SetAdditionalVariables() if( locale_default_id > locale_max_id ) locale_default_id = locale_max_id; + + if( locale_files.empty() ) + locale_files.push_back(L"en"); } diff --git a/core/plugindata.h b/core/plugindata.h index 488c341..ff46c07 100755 --- a/core/plugindata.h +++ b/core/plugindata.h @@ -13,7 +13,7 @@ #include -class Session; +struct Session; struct PluginDataBase diff --git a/plugins/export/Makefile b/plugins/export/Makefile index eb3c3fc..c081469 100755 --- a/plugins/export/Makefile +++ b/plugins/export/Makefile @@ -6,7 +6,7 @@ name = export.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o -I/usr/local/include -L/usr/local/lib -lcurl + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o -lcurl diff --git a/plugins/gallery/Makefile b/plugins/gallery/Makefile index c35015a..473300a 100755 --- a/plugins/gallery/Makefile +++ b/plugins/gallery/Makefile @@ -6,10 +6,10 @@ name = gallery.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o - + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o + %.o: %.cpp $(CXX) -c $(CXXFLAGS) $< diff --git a/plugins/group/Makefile b/plugins/group/Makefile index 19f454d..113e701 100755 --- a/plugins/group/Makefile +++ b/plugins/group/Makefile @@ -6,7 +6,7 @@ name = group.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o diff --git a/plugins/menu/Makefile b/plugins/menu/Makefile index f163ca1..564620d 100755 --- a/plugins/menu/Makefile +++ b/plugins/menu/Makefile @@ -6,7 +6,7 @@ name = menu.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o diff --git a/plugins/stats/Makefile b/plugins/stats/Makefile index 0e0a0dd..b4bc596 100755 --- a/plugins/stats/Makefile +++ b/plugins/stats/Makefile @@ -6,7 +6,7 @@ name = stats.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o diff --git a/plugins/thread/Makefile b/plugins/thread/Makefile index 46c9f57..ec35662 100755 --- a/plugins/thread/Makefile +++ b/plugins/thread/Makefile @@ -6,7 +6,7 @@ name = thread.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o diff --git a/plugins/ticket/Makefile b/plugins/ticket/Makefile index 3064919..fb9d6d2 100755 --- a/plugins/ticket/Makefile +++ b/plugins/ticket/Makefile @@ -6,7 +6,7 @@ name = ticket.so all: $(name) $(name): $(o) - $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o + $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) $(LDFLAGS) *.o diff --git a/templates/htmltextstream.cpp b/templates/htmltextstream.cpp index 7458ce4..e7cb0ca 100755 --- a/templates/htmltextstream.cpp +++ b/templates/htmltextstream.cpp @@ -12,6 +12,13 @@ +HtmlTextStream::HtmlTextStream() +{ +} + + + + /* without escaping */ diff --git a/templates/htmltextstream.h b/templates/htmltextstream.h index 50ebf78..6068dfb 100755 --- a/templates/htmltextstream.h +++ b/templates/htmltextstream.h @@ -47,6 +47,8 @@ class HtmlTextStream : public TextStream public: + HtmlTextStream(); + /* a helper struct to select a proper operator<<