Browse code

- base64 init and endianness checks on startup

Andrei Pelinescu-Onciul authored on 02/07/2008 12:07:37
Showing 1 changed files
... ...
@@ -162,6 +162,8 @@
162 162
 #include "cfg/cfg.h"
163 163
 #include "cfg/cfg_struct.h"
164 164
 #include "cfg_core.h"
165
+#include "endianness.h" /* init */
166
+#include "basex.h" /* init */
165 167
 
166 168
 #ifdef DEBUG_DMALLOC
167 169
 #include <dmalloc.h>
... ...
@@ -1723,6 +1725,15 @@ try_again:
1723 1723
 		LOG(L_CRIT, "could not declare the core configuration\n");
1724 1724
 		goto error;
1725 1725
 	}
1726
+
1727
+	if (endianness_sanity_check() != 0){
1728
+		LOG(L_CRIT, "BUG: endianness sanity tests failed\n");
1729
+		goto error;
1730
+	}
1731
+	if (init_basex() != 0){
1732
+		LOG(L_CRIT, "could not initialize base* framework\n");
1733
+		goto error;
1734
+	}
1726 1735
 	
1727 1736
 	if (init_modules() != 0) {
1728 1737
 		fprintf(stderr, "ERROR: error while initializing modules\n");