Permalink
Browse files

sclang: use portable __linux__ preprocessor symbol instead of SC_LINUX

Signed-off-by: Tim Blechmann <tim@klingt.org>
  • Loading branch information...
timblechmann committed Sep 4, 2012
1 parent 7db3771 commit 47cb2399348243e540e51a9c8f70c849b6baeeef
View
@@ -107,7 +107,6 @@ if(APPLE)
APPEND
PROPERTY COMPILE_DEFINITIONS SC_DARWIN)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
- add_definitions("-DSC_LINUX")
add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_definitions("-DSC_FREEBSD")
@@ -332,7 +332,7 @@ int prFilePos(struct VMGlobals *g, int numArgsPushed)
if (file == NULL) return errFailed;
if (fgetpos(file, &pos)) return errFailed;
-#ifdef SC_LINUX
+#ifdef __linux__
// sk: hack alert!
length = pos.__pos;
#else
@@ -587,7 +587,7 @@ kern_return_t RescheduleStdThread( mach_port_t machThread,
}
#endif // SC_DARWIN
-#ifdef SC_LINUX
+#ifdef __linux__
#include <string.h>
static void SC_LinuxSetRealtimePriority(pthread_t thread, int priority)
@@ -608,7 +608,7 @@ static void SC_LinuxSetRealtimePriority(pthread_t thread, int priority)
param.sched_priority, strerror(err));
}
}
-#endif // SC_LINUX
+#endif // __linux__
SC_DLLEXPORT_C void schedRun()
@@ -645,9 +645,9 @@ SC_DLLEXPORT_C void schedRun()
//post("param.sched_priority %d\n", param.sched_priority);
#endif // SC_DARWIN
-#ifdef SC_LINUX
+#ifdef __linux__
SC_LinuxSetRealtimePriority(gSchedThread, 1);
-#endif // SC_LINUX
+#endif // __linux__
}
@@ -790,9 +790,9 @@ TempoClock::TempoClock(VMGlobals *inVMGlobals, PyrObject* inTempoClockObj,
//pthread_setschedparam (mThread, policy, &param);
#endif // SC_DARWIN
-#ifdef SC_LINUX
+#ifdef __linux__
SC_LinuxSetRealtimePriority(mThread, 1);
-#endif // SC_LINUX
+#endif // __linux__
}
void TempoClock::StopReq()
@@ -33,7 +33,7 @@
#include "SC_Win32Utils.h"
#endif
-#ifdef SC_LINUX
+#ifdef __linux__
# include <errno.h>
#endif
Oops, something went wrong.

0 comments on commit 47cb239

Please sign in to comment.