]> code.citadel.org Git - citadel.git/blobdiff - citadel/config.c
- port to Cygwin (DLL support, etc.)
[citadel.git] / citadel / config.c
index 978e20693b1b4c51c76395339422666791239445..534eb58d94f85fc786b8189926d649807a980747 100644 (file)
@@ -1,10 +1,15 @@
 /*
+ * $Id$
+ *
  * This function reads the citadel.config file.  It should be called at
  * the beginning of EVERY Citadel program.
  *
- * $Id$
  */
 
+#ifdef DLL_EXPORT
+#define IN_LIBCIT
+#endif
+
 #include "sysdep.h"
 #include <stdlib.h>
 #include <sys/stat.h>
@@ -14,6 +19,8 @@
 #include <string.h>
 #include <limits.h>
 #include "citadel.h"
+#include "server.h"
+#include "dynloader.h"
 #include "config.h"
 
 struct config config;
@@ -52,13 +59,15 @@ void get_config(void) {
                perror("citadel.config");
                exit(1);
        }
+#ifndef __CYGWIN__
        if (st.st_uid != BBSUID || st.st_mode != (S_IFREG | S_IRUSR | S_IWUSR)) {
                fprintf(stderr, "check the permissions on citadel.config\n");
                exit(1);
        }
+#endif
        fclose(cfp);
 
-       if (config.c_setup_level != REV_LEVEL) {
+       if (config.c_setup_level < REV_MIN) {
                fprintf(stderr, "config: Your data files are out of date.  ");
                fprintf(stderr, "Run setup to update them.\n");
                fprintf(stderr,