Sfoglia il codice sorgente

- base64 init and endianness checks on startup

Andrei Pelinescu-Onciul 17 anni fa
parent
commit
f769a6204c
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 11 0
      main.c

+ 11 - 0
main.c

@@ -162,6 +162,8 @@
 #include "cfg/cfg.h"
 #include "cfg/cfg_struct.h"
 #include "cfg_core.h"
+#include "endianness.h" /* init */
+#include "basex.h" /* init */
 
 #ifdef DEBUG_DMALLOC
 #include <dmalloc.h>
@@ -1723,6 +1725,15 @@ try_again:
 		LOG(L_CRIT, "could not declare the core configuration\n");
 		goto error;
 	}
+
+	if (endianness_sanity_check() != 0){
+		LOG(L_CRIT, "BUG: endianness sanity tests failed\n");
+		goto error;
+	}
+	if (init_basex() != 0){
+		LOG(L_CRIT, "could not initialize base* framework\n");
+		goto error;
+	}
 	
 	if (init_modules() != 0) {
 		fprintf(stderr, "ERROR: error while initializing modules\n");