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 1725
 		LOG(L_CRIT, "could not declare the core configuration\n");
1724 1726
 		goto error;
1725 1727
 	}
1728
+
1729
+	if (endianness_sanity_check() != 0){
1730
+		LOG(L_CRIT, "BUG: endianness sanity tests failed\n");
1731
+		goto error;
1732
+	}
1733
+	if (init_basex() != 0){
1734
+		LOG(L_CRIT, "could not initialize base* framework\n");
1735
+		goto error;
1736
+	}
1726 1737
 	
1727 1738
 	if (init_modules() != 0) {
1728 1739
 		fprintf(stderr, "ERROR: error while initializing modules\n");