summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xMakefile2
-rw-r--r--compiledsql.cpp10
-rw-r--r--debian/control2
3 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cce7045..baba6ef 100755
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@
include common.mk
-DISTROS=base debian11 ubuntu2204
+DISTROS=base debian11
VERSION=$(shell dpkg-parsechangelog --show-field Version)
INCLUDES=-I.
diff --git a/compiledsql.cpp b/compiledsql.cpp
index a3503af..818ab35 100644
--- a/compiledsql.cpp
+++ b/compiledsql.cpp
@@ -1,5 +1,7 @@
#include "compiledsql.h"
+#include <boost/algorithm/string/predicate.hpp>
+
CompiledSQL::CompiledSQL(SQLite::Database& db):
m_stmt{},
m_db{db},
@@ -12,7 +14,13 @@ void CompiledSQL::init(const std::string& stmt)
if (m_stmt) {
m_stmt->reset();
} else {
- if (stmt.starts_with("SELECT ")) {
+ if (
+#if __cplusplus >= 202002
+ stmt.starts_with("SELECT ")
+#else
+ boost::algorithm::starts_with(stmt, "SELECT ")
+#endif
+ ) {
m_isSelect = true;
} else {
m_isSelect = false;
diff --git a/debian/control b/debian/control
index a958cca..167e8ad 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: whiteboard
Section: web
Priority: optional
Maintainer: Roland Reichwein <mail@reichwein.it>
-Build-Depends: debhelper (>= 12), libboost-all-dev | libboost1.71-all-dev, clang | g++-9, llvm | g++-9, lld | g++-9, uglifyjs, python3-pkg-resources, htmlmin, cleancss, libfcgi-dev, libqrcodegencpp-dev, libmagick++-dev, pkg-config, libfmt-dev, libsqlitecpp-dev, googletest, gcovr
+Build-Depends: debhelper (>= 12), libboost-all-dev | libboost1.71-all-dev, clang | g++-9, llvm | g++-9, lld | g++-9, uglifyjs, python3-pkg-resources, htmlmin, cleancss, libfcgi-dev, libqrcodegencpp-dev, libmagick++-dev, pkg-config, libfmt-dev, libsqlitecpp-dev, googletest, gcovr, webserver
Standards-Version: 4.5.0
Homepage: http://www.reichwein.it/whiteboard/