aboutsummaryrefslogtreecommitdiff
path: root/devel/pwlib
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2007-05-24 04:55:25 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2007-05-24 04:55:25 +0000
commit5aeb7b367f3d8c168d463e1374d04ee6b55a6e6e (patch)
tree872cfce441ae7468e4aa7a8d0cd0756f10f4996f /devel/pwlib
parent9da7f595d7bf1228780336a5f2f435c9ce4c5244 (diff)
downloadports-5aeb7b367f3d8c168d463e1374d04ee6b55a6e6e.tar.gz
ports-5aeb7b367f3d8c168d463e1374d04ee6b55a6e6e.zip
Notes
Diffstat (limited to 'devel/pwlib')
-rw-r--r--devel/pwlib/Makefile5
-rw-r--r--devel/pwlib/files/patch-configureac53
-rw-r--r--devel/pwlib/files/patch-src_ptlib_common_osutils.cxx27
-rw-r--r--devel/pwlib/files/patch-src_ptlib_unix_tlibthrd.cxx47
4 files changed, 130 insertions, 2 deletions
diff --git a/devel/pwlib/Makefile b/devel/pwlib/Makefile
index c06e5ea18d30..7ddff9b905dc 100644
--- a/devel/pwlib/Makefile
+++ b/devel/pwlib/Makefile
@@ -40,6 +40,11 @@ MAKE_ENV= CPPFLAGS="${CPPFLAGS} -O1 -I${WRKSRC}/include -I${LOCALBASE}/include"
STDCCFLAGS+="-I${LOCALBASE}" \
CFLAGS="${CFLAGS} -O1"
+.if ${OSVERSION} >= 700042
+CONFIGURE_ENV+= ATOMICITY_H="<ext/atomicity.h>"
+.else
+CONFIGURE_ENV+= ATOMICITY_H="<bits/atomicity.h>"
+.endif
# if explicitely asked for, depend upon it
.if defined(WITH_SDL)
USE_SDL+= sdl
diff --git a/devel/pwlib/files/patch-configureac b/devel/pwlib/files/patch-configureac
index 1bb7dcfdc78a..511517dc16ae 100644
--- a/devel/pwlib/files/patch-configureac
+++ b/devel/pwlib/files/patch-configureac
@@ -1,5 +1,5 @@
--- configure.ac.orig Wed Feb 22 06:53:28 2006
-+++ configure.ac Thu Dec 7 02:09:59 2006
++++ configure.ac Wed May 23 22:03:00 2007
@@ -136,7 +136,7 @@ case "$target_cpu" in
x86 | i686 | i586 | i486 | i386 ) MACHTYPE=x86
;;
@@ -63,6 +63,39 @@
dnl GCSECTIONS=1
dnl else
dnl AC_MSG_RESULT(no)
+@@ -593,12 +593,12 @@ dnl see if using GNU glibc++, because th
+ P_HAS_ATOMIC_INT=0
+ P_NEEDS_GNU_CXX_NAMESPACE=0
+ AC_MSG_CHECKING(if atomic integer available)
+-AC_TRY_COMPILE([#include <bits/atomicity.h>],
++AC_TRY_COMPILE([#include ${ATOMICITY_H}],
+ [_Atomic_word val;], P_HAS_ATOMIC_INT=1)
+ if test ${P_HAS_ATOMIC_INT} = 1 ; then
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING(if __exchange_and_add is in __gnu_cxx namespace)
+- AC_TRY_COMPILE([#include <bits/atomicity.h>],
++ AC_TRY_COMPILE([#include ${ATOMICITY_H}],
+ [_Atomic_word val; __gnu_cxx::__exchange_and_add(&val, 1)], P_NEEDS_GNU_CXX_NAMESPACE=1)
+ if test ${P_NEEDS_GNU_CXX_NAMESPACE} = 1 ; then
+ AC_MSG_RESULT(yes)
+@@ -640,7 +640,7 @@ if test "${OSTYPE:-unknown}" = "solaris"
+ AC_MSG_CHECKING(for upad128_t)
+ AC_TRY_COMPILE([#include <sys/types.h>],
+ [upad128_t upad; upad._q = 0.0;], has_upad128_t=y)
+- if test ${has_upad128_t} == "y"; then
++ if test ${has_upad128_t} = "y"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(P_HAS_UPAD128_T)
+ else
+@@ -665,7 +665,7 @@ if test ${OSTYPE} != Darwin ; then
+ fi
+ fi
+
+-if test "${P_HAS_SEMAPHORES}x" == "x" ; then
++if test "${P_HAS_SEMAPHORES}x" = "x" ; then
+
+ AC_TRY_COMPILE([#include <semaphore.h>],
+ [sem_t *s = sem_open("test", O_CREAT)],
@@ -689,18 +689,18 @@ dnl check for pthreads library
dnl MSWIN_DISPLAY semaphore,Semaphore Support
dnl MSWIN_DEFINE semaphore,P_HAS_SEMAPHORES
@@ -88,6 +121,15 @@
fi
fi
+@@ -746,7 +746,7 @@ AC_TRY_COMPILE([#include <pthread.h>],
+ if test ${P_HAS_RECURSIVE_MUTEX} = 1 ; then
+ AC_MSG_RESULT(yes)
+ else
+- if test ${OSTYPE} == Darwin ; then
++ if test ${OSTYPE} = Darwin ; then
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);], P_HAS_RECURSIVE_MUTEX=1)
+ if test ${P_HAS_RECURSIVE_MUTEX} = 1 ; then
@@ -847,7 +847,7 @@ fi
AC_SUBST(HAS_PLUGINS)
@@ -125,7 +167,14 @@
else
dnl SDL checks
if test "${SDLLIB:-unset}" = "unset" ; then
-@@ -1501,11 +1502,11 @@ else
+@@ -1495,17 +1496,17 @@ else
+ dnl Linux check
+ AC_CHECK_HEADERS(SDL/SDL.h, HAS_SDL=1)
+ if test "${HAS_SDL:-unset}" != "unset" ; then
+- if test "${X11LIBDIR:-unset}" == "unset" ; then
++ if test "${X11LIBDIR:-unset}" = "unset" ; then
+ X11LIBDIR=/usr/X11R6/lib
+ fi
AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, HAS_SDL=1, HAS_SDL=, -L${X11LIBDIR} -lpthread -lX11 -lXext)
fi
diff --git a/devel/pwlib/files/patch-src_ptlib_common_osutils.cxx b/devel/pwlib/files/patch-src_ptlib_common_osutils.cxx
new file mode 100644
index 000000000000..653864693f65
--- /dev/null
+++ b/devel/pwlib/files/patch-src_ptlib_common_osutils.cxx
@@ -0,0 +1,27 @@
+--- src/ptlib/common/osutils.cxx.orig Wed May 23 20:36:01 2007
++++ src/ptlib/common/osutils.cxx Wed May 23 20:36:32 2007
+@@ -2356,21 +2356,21 @@ PReadWriteMutex::PReadWriteMutex()
+ PReadWriteMutex::Nest * PReadWriteMutex::GetNest() const
+ {
+ PWaitAndSignal mutex(nestingMutex);
+- return nestedThreads.GetAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId()));
++ return nestedThreads.GetAt(POrdinalKey((INT)PThread::GetCurrentThreadId()));
+ }
+
+
+ void PReadWriteMutex::EndNest()
+ {
+ nestingMutex.Wait();
+- nestedThreads.RemoveAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId()));
++ nestedThreads.RemoveAt(POrdinalKey((INT)PThread::GetCurrentThreadId()));
+ nestingMutex.Signal();
+ }
+
+
+ PReadWriteMutex::Nest & PReadWriteMutex::StartNest()
+ {
+- POrdinalKey threadId = (PINDEX)PThread::GetCurrentThreadId();
++ POrdinalKey threadId = (INT)PThread::GetCurrentThreadId();
+
+ nestingMutex.Wait();
+
diff --git a/devel/pwlib/files/patch-src_ptlib_unix_tlibthrd.cxx b/devel/pwlib/files/patch-src_ptlib_unix_tlibthrd.cxx
new file mode 100644
index 000000000000..16c8461e7440
--- /dev/null
+++ b/devel/pwlib/files/patch-src_ptlib_unix_tlibthrd.cxx
@@ -0,0 +1,47 @@
+--- src/ptlib/unix/tlibthrd.cxx.orig Wed May 23 20:31:51 2007
++++ src/ptlib/unix/tlibthrd.cxx Wed May 23 20:35:26 2007
+@@ -754,7 +754,7 @@ BOOL PProcess::PThreadKill(pthread_t id,
+ {
+ PWaitAndSignal m(threadMutex);
+
+- if (!activeThreads.Contains((unsigned)id))
++ if (!activeThreads.Contains((unsigned long)id))
+ return FALSE;
+
+ return pthread_kill(id, sig) == 0;
+@@ -792,7 +792,7 @@ void PThread::InitialiseProcessThread()
+ #endif
+
+ ((PProcess *)this)->activeThreads.DisallowDeleteObjects();
+- ((PProcess *)this)->activeThreads.SetAt((unsigned)PX_threadId, this);
++ ((PProcess *)this)->activeThreads.SetAt((unsigned long)PX_threadId, this);
+
+ PX_firstTimeStart = FALSE;
+
+@@ -906,7 +906,7 @@ void PThread::Restart()
+ PAssertPTHREAD(pthread_create, (&PX_threadId, &threadAttr, PX_ThreadStart, this));
+
+ // put the thread into the thread list
+- process.activeThreads.SetAt((unsigned)PX_threadId, this);
++ process.activeThreads.SetAt((unsigned long)PX_threadId, this);
+ if (process.activeThreads.GetSize() > highWaterMark)
+ newHighWaterMark = highWaterMark = process.activeThreads.GetSize();
+
+@@ -1229,7 +1229,7 @@ PThread * PThread::Current()
+ {
+ PProcess & process = PProcess::Current();
+ process.threadMutex.Wait();
+- PThread * thread = process.activeThreads.GetAt((unsigned)pthread_self());
++ PThread * thread = process.activeThreads.GetAt((unsigned long)pthread_self());
+ process.threadMutex.Signal();
+ return thread;
+ }
+@@ -1362,7 +1362,7 @@ void PThread::PX_ThreadEnd(void * arg)
+ }
+
+ // remove this thread from the active thread list
+- process.activeThreads.SetAt((unsigned)id, NULL);
++ process.activeThreads.SetAt((unsigned long)id, NULL);
+
+ // delete the thread if required, note this is done this way to avoid
+ // a race condition, the thread ID cannot be zeroed before the if!