]> git.lyx.org Git - lyx.git/blob - src/support/os.cpp
Add a static assert to prevent compilation on platforms where int/usigned int are...
[lyx.git] / src / support / os.cpp
1 /**
2  * \file os.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Ruurd A. Reitsma
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #if defined(__CYGWIN__) || defined(__CYGWIN32__)
14 #include "support/os_cygwin.cpp"
15 #elif defined(_WIN32)
16 #include "support/os_win32.cpp"
17 #else
18 #include "support/os_unix.cpp"
19 #endif
20
21 // Static assert to break compilation on platforms where
22 // int/unsigned int is not 4 bytes. Added to make sure that
23 // e.g., the author hash is always 32-bit.
24 template<bool Condition> struct static_assert_helper;
25 template <> struct static_assert_helper<true> {};
26 enum { 
27         dummy = sizeof(static_assert_helper<sizeof(int) == 4>)
28 };
29
30 namespace lyx {
31 namespace support {
32 namespace os {
33
34 string const python()
35 {
36         // Use the -tt switch so that mixed tab/whitespace indentation is
37         // an error
38         static string const command("python -tt");
39         return command;
40 }
41
42 }
43 }
44 }