-lresolv -lcitadel -lpthread -lz -lical -lldap -lcrypt -lexpat -lcurl -ldb \
-o citserver
-$(SOURCES): server/*.h server/modules/*/*.h
+$(SOURCES): server/*.h server/modules/*/*.h server/backends/*/*.h
@touch $@
%.o: %.c
#include "../../control.h"
#include "../../citserver.h"
#include "../../config.h"
+#include "berkeley_db.h"
void (*cdb_open_databases)(void) = NULL;
void (*cdb_close_databases)(void) = NULL;
}
-// This will get split out into a separate file. It will act as a marshal for multiple database backends.
-void cdb_init_backends(void) {
- bdb_init_backend(); // For now, Berkeley DB is the only backend, so we always initialize it.
-}
--- /dev/null
+// Copyright (c) 1987-2023 by the citadel.org team
+//
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+
+void bdb_init_backend(void);
--- /dev/null
+// Copyright (c) 1987-2023 by the citadel.org team
+// This program is open source software. Use, duplication, or disclosure
+// are subject to the terms of the GNU General Public License, version 3.
+
+// The functions in this file handle the selection and activation of a storage backend for Citadel Server.
+// Right now, it simply activates Berkeley DB because that's the only one we have.
+
+
+#include "sysdep.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <libcitadel.h>
+#include "ctdl_module.h"
+#include "control.h"
+#include "citserver.h"
+#include "config.h"
+
+#include "backends/berkeley_db/berkeley_db.h"
+
+void cdb_init_backends(void) {
+ bdb_init_backend();
+}