summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2003-09-03 08:27:56 +0000
committerpixel <pixel>2003-09-03 08:27:56 +0000
commit4e75ad6ab97e4f93afcfda68cf4efed4521c3411 (patch)
tree297ba07ce5c925343db81d71b806ad3aca9405d2 /lib
parent7755e815baa0e702863ce811c803bc22130ab71c (diff)
Latest changes
Diffstat (limited to 'lib')
-rw-r--r--lib/SQL.cc8
-rw-r--r--lib/String.cc2
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/SQL.cc b/lib/SQL.cc
index e158904..26620e4 100644
--- a/lib/SQL.cc
+++ b/lib/SQL.cc
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_MYSQL
+
#include "SQL.h"
SQLConnection::SQLConnection(String host, String user, String passwd,
@@ -66,3 +72,5 @@ AssocArray SQLConnection::fetchrow() {
return r;
}
+
+#endif
diff --git a/lib/String.cc b/lib/String.cc
index f24dcca..bd265a0 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -54,7 +54,7 @@ String::String(const char * s) : str(Base::strdup(s)), siz(::strlen(str)) {
#endif
}
-String::String(int hs, char * s) : str(Base::strdup(s ? s : "")), siz(hs) {
+String::String(int hs, char * s) : str(s), siz(hs) {
#ifdef DEBUG
fprintf(stderr, _("Fast-Creating a string with `%s' at %p from %p, this = %p\n"), str, str, s, this);
#endif