ARB
arb_early_check.h
Go to the documentation of this file.
1 // ================================================================ //
2 // //
3 // File : arb_early_check.h //
4 // Purpose : early check for 32/64bit mismatch //
5 // //
6 // Coded by Ralf Westram (coder@reallysoft.de) in December 2012 //
7 // Institute of Microbiology (Technical University Munich) //
8 // http://www.arb-home.de/ //
9 // //
10 // ================================================================ //
11 
12 #ifndef ARB_EARLY_CHECK_H
13 #define ARB_EARLY_CHECK_H
14 
15 #ifndef STATIC_ASSERT_H
16 #include "static_assert.h"
17 #endif
18 
19 // --------------------------------------------------------------------------------
20 // if any of the assertions below fails, then ...
21 //
22 // - edit ../config.makefile and correct ARB_64 to match your machine
23 // - make clean
24 // - make all
25 
26 #if defined(ARB_64)
27 STATIC_ASSERT_ANNOTATED(sizeof(void*) == 8, "You cannot compile a 64bit-ARB on a 32bit-machine");
28 #else // !defined(ARB_64)
29 STATIC_ASSERT_ANNOTATED(sizeof(void*) == 4, "You cannot compile a 32bit-ARB on a 64bit-machine");
30 #endif
31 
32 
33 #else
34 #error arb_early_check.h included twice
35 #endif // ARB_EARLY_CHECK_H
STATIC_ASSERT_ANNOTATED(sizeof(void *)==4,"You cannot compile a 32bit-ARB on a 64bit-machine")