summaryrefslogtreecommitdiff
path: root/tagstats
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-08-18 15:01:09 +0200
committerJochen Topf <jochen@topf.org>2012-08-18 15:01:09 +0200
commitcef0cf6c71eb9c5a103c53e1185ff6182ab4e0e9 (patch)
treec9be8cb39b80355db5118751361ec4ec2a398e5f /tagstats
parent1358b4d4d9056921eabe4618b86b4170b3644274 (diff)
downloadtaginfo-cef0cf6c71eb9c5a103c53e1185ff6182ab4e0e9.tar
taginfo-cef0cf6c71eb9c5a103c53e1185ff6182ab4e0e9.tar.gz
Make it work without c++0x support
Diffstat (limited to 'tagstats')
-rw-r--r--tagstats/Makefile12
-rw-r--r--tagstats/tagstats_handler.hpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/tagstats/Makefile b/tagstats/Makefile
index c66e2b6..04a453d 100644
--- a/tagstats/Makefile
+++ b/tagstats/Makefile
@@ -9,8 +9,7 @@ CXX = g++
#CXXFLAGS = -g
CXXFLAGS = -O3
-CXXFLAGS += -std=c++0x -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic
-#CXXFLAGS += -Wpadded -Winline
+CXXFLAGS += -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic
CXXFLAGS += -DTAGSTATS_COUNT_USERS
CXXFLAGS += -DTAGSTATS_COUNT_KEY_COMBINATIONS
@@ -33,18 +32,19 @@ CXXFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS += `../bin/taginfo-config.rb tagstats.cxxflags`
-LDFLAGS = -L/usr/local/lib -lexpat
-
-LIB_SQLITE = -lsqlite3
+LIB_EXPAT = -lexpat
LIB_GD = -lgd -lz -lm
LIB_PBF = -lz -lpthread -lprotobuf-lite -losmpbf
+LIB_SQLITE = -lsqlite3
+
+LDFLAGS = $(LIB_EXPAT) $(LIB_PBF) $(LIB_GD) $(LIB_SQLITE)
.PHONY: all clean install
all: tagstats
tagstats: tagstats.cpp tagstats_handler.hpp statistics_handler.hpp string_store.hpp geodistribution.hpp
- $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIB_PBF) $(LIB_GD) $(LIB_SQLITE)
+ $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
check:
cppcheck --enable=all tagstats.cpp
diff --git a/tagstats/tagstats_handler.hpp b/tagstats/tagstats_handler.hpp
index a4af09a..3072c04 100644
--- a/tagstats/tagstats_handler.hpp
+++ b/tagstats/tagstats_handler.hpp
@@ -412,7 +412,7 @@ public:
#endif
{
#ifdef TAGSTATS_COUNT_TAG_COMBINATIONS
- std::ifstream tags_list_file(tags_list, std::ifstream::in);
+ std::ifstream tags_list_file(tags_list.c_str(), std::ifstream::in);
std::string key_value;
while (tags_list_file >> key_value) {
m_key_value_stats[m_string_store.add(key_value.c_str())] = new KeyValueStats();