fixes for BSDI. see ChangeLog.
[citadel.git] / citadel / database.c
index 1945f36631cc7e1dafe2d19e6a4922645ce55cf6..ad91ccec1000f6e0689f0769f1ec241dfa0d586d 100644 (file)
@@ -99,8 +99,13 @@ void open_databases(void) {
         */
        system("exec mkdir data 2>/dev/null");
 
+       /* a critical section is unnecessary, as this function is called before
+          any other threads are created. and it causes problems on BSDI.
+
        begin_critical_section(S_DATABASE);
 
+        */
+
        gdbms[CDB_MSGMAIN] = gdbm_open("data/msgmain.gdbm", 8192,
                GDBM_WRCREAT, 0600, NULL);
        if (gdbms[CDB_MSGMAIN] == NULL) {
@@ -148,7 +153,9 @@ void open_databases(void) {
                dtkey[a].dptr = NULL;
                }
 
+       /*
        end_critical_section(S_DATABASE);
+        */
 
        }