}
else if(event.KeyInput.Char != 0 && !event.KeyInput.Control)
{
- #if (defined(linux) || defined(__linux))
+ #if (defined(__linux__))
wchar_t wc = L'_';
mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );
prompt.input(wc);
break;
case EET_KEY_INPUT_EVENT:
{
-#if (defined(linux) || defined(__linux) || defined(__FreeBSD__))
+#if (defined(__linux__) || defined(__FreeBSD__))
// ################################################################
// ValkaTR:
// This part is the difference from the original intlGUIEditBox
//// Linux
-#elif defined(linux) || defined(__linux) || defined(__linux__)
+#elif defined(__linux__)
bool getCurrentExecPath(char *buf, size_t len)
{
//// Linux
-#elif defined(linux) || defined(__linux)
+#elif defined(__linux__)
bool setSystemPaths()
{
#include <unistd.h>
#include <stdint.h> //for uintptr_t
- #if (defined(linux) || defined(__linux) || defined(__GNU__)) && !defined(_GNU_SOURCE)
+ // Use standard Posix macro for Linux
+ #if (defined(linux) || defined(__linux)) && !defined(__linux__)
+ #define __linux__
+ #endif
+ #if (defined(__linux__) || defined(__GNU__)) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
return
#if defined(ANDROID)
"Android"
-#elif defined(linux) || defined(__linux) || defined(__linux__)
+#elif defined(__linux__)
"Linux"
#elif defined(_WIN32) || defined(_WIN64)
"Windows"
// for setName
-#if defined(linux) || defined(__linux)
+#if defined(__linux__)
#include <sys/prctl.h>
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
#include <pthread_np.h>
// for bindToProcessor
#if __FreeBSD_version >= 702106
typedef cpuset_t cpu_set_t;
-#elif defined(__linux) || defined(linux)
+#elif defined(__linux__)
#include <sched.h>
#elif defined(__sun) || defined(sun)
#include <sys/types.h>
void Thread::setName(const std::string &name)
{
-#if defined(linux) || defined(__linux)
+#if defined(__linux__)
// It would be cleaner to do this with pthread_setname_np,
// which was added to glibc in version 2.12, but some major
return SetThreadAffinityMask(getThreadHandle(), 1 << proc_number);
-#elif __FreeBSD_version >= 702106 || defined(__linux) || defined(linux)
+#elif __FreeBSD_version >= 702106 || defined(__linux__)
cpu_set_t cpuset;