* posix-threads.cc: Include <unistd.h> if HAVE_UNISTD_H is defined.
(_Jv_ThreadSetPriority): Test for _POSIX_THREAD_PRIORITY_SCHEDULING.
From-SVN: r63647
+2003-03-01 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * posix-threads.cc: Include <unistd.h> if HAVE_UNISTD_H is defined.
+ (_Jv_ThreadSetPriority): Test for _POSIX_THREAD_PRIORITY_SCHEDULING.
+
2003-03-01 Ranjit Mathew <rmathew@hotmail.com>
* java/io/File.java (normalizePath): Remove trailing separator
#include <signal.h>
#include <errno.h>
#include <limits.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
+#endif
#include <gcj/cni.h>
#include <jvm.h>
void
_Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio)
{
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
if (data->flags & FLAG_START)
{
struct sched_param param;
param.sched_priority = prio;
pthread_setschedparam (data->thread, SCHED_RR, ¶m);
}
+#endif
}
void