lyx_mirror/src/support/os.cpp
Vincent van Ravesteijn a4fd294373 Add a static assert to prevent compilation on platforms where int/usigned int are not 32-bits/4-bytes.
This is added to be sure that the to-be-added author hash is always 32-bit.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36126 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:51:09 +00:00

45 lines
987 B
C++

/**
* \file os.cpp
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Ruurd A. Reitsma
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
#include "support/os_cygwin.cpp"
#elif defined(_WIN32)
#include "support/os_win32.cpp"
#else
#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 {
string const python()
{
// Use the -tt switch so that mixed tab/whitespace indentation is
// an error
static string const command("python -tt");
return command;
}
}
}
}