summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/database.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-22 20:31:54 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-22 20:31:54 +0000
commit8548e1273bf068feeeed283e9ae90ca826fd0efa (patch)
tree1ca4b3c73d85ae973e70b9a47567483c57963c25 /crawl-ref/source/database.h
parentfac344b62ebbf48e7b1d2a7b5f0bcdd3608bd4a7 (diff)
downloadcrawl-ref-8548e1273bf068feeeed283e9ae90ca826fd0efa.tar.gz
crawl-ref-8548e1273bf068feeeed283e9ae90ca826fd0efa.zip
Fixed trunk build for DOS and Windows. DOS and Windows builds use a SQLite db,
with a dbm-like wrapper so database.cc builds unchanged. Added SQLite to the source tree. Only DOS and Windows builds use it at the moment, but it can be added to Unix builds easily (and will be added automatically if a suitable db.h or ndbm.h is not found). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1342 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/database.h')
-rw-r--r--crawl-ref/source/database.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/crawl-ref/source/database.h b/crawl-ref/source/database.h
index 364a87c7b6..5cd0923ebc 100644
--- a/crawl-ref/source/database.h
+++ b/crawl-ref/source/database.h
@@ -14,20 +14,22 @@
#include "externs.h"
#include <list>
-extern "C" {
#ifdef DB_NDBM
-
+extern "C" {
# include <ndbm.h>
-# define DPTR_COERCE void *
-
-#else
-
+}
+#elif defined(DB_DBH)
+extern "C" {
# define DB_DBM_HSEARCH 1
# include <db.h>
-# define DPTR_COERCE char *
-
-#endif
}
+#elif defined(USE_SQLITE_DBM)
+# include <sqldbm.h>
+#else
+# error DBM interfaces unavailable!
+#endif
+
+#define DPTR_COERCE char *
typedef std::list<DBM *> db_list;