]> git.lyx.org Git - lyx.git/blobdiff - src/support/os.cpp
add debug function which prints the callstack to stderr, disabled by default
[lyx.git] / src / support / os.cpp
index 99bb35810fbb6e04d28c1dd744b700433a6eb37c..820f4e9a66be3b8c32b4362843657b530230c629 100644 (file)
 #include <config.h>
 
 #if defined(__CYGWIN__) || defined(__CYGWIN32__)
-#include "os_cygwin.cpp"
+#include "support/os_cygwin.cpp"
 #elif defined(_WIN32)
-#include "os_win32.cpp"
+#include "support/os_win32.cpp"
 #else
-#include "os_unix.cpp"
+#include "support/os_unix.cpp"
 #endif
 
+// Static assert to break compilation on platforms where
+// int/unsigned int is not 4 bytes. Added to make sure that
+// e.g., the author hash is always 32-bit.
+template<bool Condition> struct static_assert_helper;
+template <> struct static_assert_helper<true> {};
+enum { 
+       dummy = sizeof(static_assert_helper<sizeof(int) == 4>)
+};
+
 namespace lyx {
 namespace support {
 namespace os {
 
-std::string const python()
+string const python()
 {
        // Use the -tt switch so that mixed tab/whitespace indentation is
        // an error
-       static std::string const command("python -tt");
+       static string const command("python -tt");
        return command;
 }