From a3ec4790b4ba6c60419d32200a52ef9817a54db0 Mon Sep 17 00:00:00 2001 From: dcoppa Date: Mon, 8 Nov 2010 10:58:05 +0000 Subject: [PATCH] We now have sched_get_priority_* OK landry@, jasper@ --- x11/wxWidgets/Makefile | 4 +-- x11/wxWidgets/patches/patch-configure_in | 24 +------------ .../patches/patch-src_unix_threadpsx_cpp | 34 ------------------- 3 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 x11/wxWidgets/patches/patch-src_unix_threadpsx_cpp diff --git a/x11/wxWidgets/Makefile b/x11/wxWidgets/Makefile index 93f58fa4cce..57ad6e41cbb 100644 --- a/x11/wxWidgets/Makefile +++ b/x11/wxWidgets/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.29 2010/11/04 12:05:25 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.30 2010/11/08 10:58:05 dcoppa Exp $ SHARED_ONLY = Yes @@ -7,7 +7,7 @@ COMMENT = c++ cross-platform GUI toolkit V = 2.8.11 DISTNAME = wxWidgets-${V} PKGNAME = wxWidgets-gtk2-${V} -REVISION = 0 +REVISION = 1 SHARED_LIBS = wx_base 2.0 \ wx_base_net 2.0 \ diff --git a/x11/wxWidgets/patches/patch-configure_in b/x11/wxWidgets/patches/patch-configure_in index cf0cba46be3..aa9e51105cf 100644 --- a/x11/wxWidgets/patches/patch-configure_in +++ b/x11/wxWidgets/patches/patch-configure_in @@ -1,4 +1,4 @@ -$OpenBSD: patch-configure_in,v 1.5 2010/11/02 13:10:51 dcoppa Exp $ +$OpenBSD: patch-configure_in,v 1.6 2010/11/08 10:58:05 dcoppa Exp $ --- configure.in.orig Thu Apr 15 11:02:51 2010 +++ configure.in Tue Nov 2 10:21:20 2010 @@ -3090,7 +3090,7 @@ if test "$wxUSE_LIBJPEG" != "no" ; then @@ -78,25 +78,3 @@ $OpenBSD: patch-configure_in,v 1.5 2010/11/02 13:10:51 dcoppa Exp $ else AC_MSG_WARN([Wide character support is unavailable]) fi -@@ -5609,8 +5595,13 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then - dnl (this one can be in either libpthread or libposix4 (under Solaris)) - dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam - HAVE_PRIOR_FUNCS=0 -+ if test "$USE_OPENBSD" = 1; then - AC_CHECK_FUNC(pthread_attr_getschedpolicy, - [AC_CHECK_FUNC(pthread_attr_setschedparam, -+ HAVE_PRIOR_FUNCS=1)]) -+ else -+ AC_CHECK_FUNC(pthread_attr_getschedpolicy, -+ [AC_CHECK_FUNC(pthread_attr_setschedparam, - [AC_CHECK_FUNC(sched_get_priority_max, - HAVE_PRIOR_FUNCS=1, - [AC_CHECK_LIB([posix4], sched_get_priority_max, -@@ -5622,6 +5613,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then - )] - )] - ) -+ fi - - if test "$HAVE_PRIOR_FUNCS" = 1; then - AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS) diff --git a/x11/wxWidgets/patches/patch-src_unix_threadpsx_cpp b/x11/wxWidgets/patches/patch-src_unix_threadpsx_cpp deleted file mode 100644 index 552c88dbb12..00000000000 --- a/x11/wxWidgets/patches/patch-src_unix_threadpsx_cpp +++ /dev/null @@ -1,34 +0,0 @@ -$OpenBSD: patch-src_unix_threadpsx_cpp,v 1.1 2010/11/02 13:10:52 dcoppa Exp $ ---- src/unix/threadpsx.cpp.orig Thu Apr 15 11:04:33 2010 -+++ src/unix/threadpsx.cpp Thu Oct 28 07:27:58 2010 -@@ -1109,19 +1109,29 @@ wxThreadError wxThread::Create(unsigned int WXUNUSED_S - wxLogError(_("Cannot retrieve thread scheduling policy.")); - } - --#ifdef __VMS__ -+#if defined(__VMS__) || defined (__OPENBSD__) - /* the pthread.h contains too many spaces. This is a work-around */ -+ /* on OpenBSD, priority min/max are declared in libpthread private hdr */ - # undef sched_get_priority_max - #undef sched_get_priority_min -+#endif -+#ifdef __VMS__ - #define sched_get_priority_max(_pol_) \ - (_pol_ == SCHED_OTHER ? PRI_FG_MAX_NP : PRI_FIFO_MAX) - #define sched_get_priority_min(_pol_) \ - (_pol_ == SCHED_OTHER ? PRI_FG_MIN_NP : PRI_FIFO_MIN) - #endif - -+#ifdef __OPENBSD__ -+// on OpenBSD, priority min/max are declared in libpthread private hdr -+ int max_prio = 31, -+ min_prio = 0, -+ prio = m_internal->GetPriority(); -+#else - int max_prio = sched_get_priority_max(policy), - min_prio = sched_get_priority_min(policy), - prio = m_internal->GetPriority(); -+#endif - - if ( min_prio == -1 || max_prio == -1 ) - {