head 1.4; access; symbols OPENPKG_E1_MP_HEAD:1.4 OPENPKG_E1_MP:1.4; locks; strict; comment @# @; 1.4 date 2003.07.22.14.21.05; author rse; state dead; branches; next 1.3; 1.3 date 2003.06.02.15.10.34; author mlelstv; state Exp; branches; next 1.2; 1.2 date 2003.02.11.09.35.17; author mlelstv; state Exp; branches; next 1.1; 1.1 date 2002.12.27.10.31.51; author mlelstv; state Exp; branches; next ; desc @@ 1.4 log @use canonical filename for patch @ text @--- src/xercesc/runConfigure.dist 2003-05-27 17:04:47.000000000 +0200 +++ src/xercesc/runConfigure 2003-06-02 16:17:22.000000000 +0200 @@@@ -189,6 +189,7 @@@@ linkeroptions="$linkeroptions $2"; shift 2;; -P) + prefix=$2 configureoptions="$configureoptions --prefix=$2"; shift 2;; -C) @@@@ -303,8 +304,16 @@@@ ;; esac elif test $platform = "freebsd"; then - threadingLibs="-pthread -lc_r" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + case $thread in + pth) + threadingLibs="-L$prefix/lib -lpth -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS -DUSE_PTH -I$prefix/include" + ;; + *) + threadingLibs="-pthread -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + ;; + esac elif test $platform = "netbsd"; then threadingLibs="-pthread -lpthread" threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" --- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp.dist 2003-05-27 17:04:52.000000000 +0200 +++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp 2003-06-02 16:15:22.000000000 +0200 @@@@ -113,8 +113,12 @@@@ // --------------------------------------------------------------------------- #if !defined(APP_NO_THREADS) +#ifdef USE_PTH +#include +#else #include #endif +#endif #ifndef _GNU_SOURCE #error _GNU_SOURCE is not defined in your compile settings @@@@ -506,6 +510,14 @@@@ void* XMLPlatformUtils::makeMutex() { +#ifdef USE_PTH + pth_mutex_t* mutex = new pth_mutex_t; + if (pth_mutex_init(mutex)) + { + ThrowXML(XMLPlatformUtilsException, + XMLExcepts::Mutex_CouldNotCreate); + } +#else pthread_mutex_t* mutex = new pthread_mutex_t; pthread_mutexattr_t* attr = new pthread_mutexattr_t; pthread_mutexattr_init(attr); @@@@ -517,20 +529,24 @@@@ } pthread_mutexattr_destroy(attr); delete attr; +#endif return (void*)(mutex); - } void XMLPlatformUtils::closeMutex(void* const mtxHandle) { if (mtxHandle != NULL) { +#ifdef USE_PTH + delete (pth_mutex_t*)mtxHandle; +#else if (pthread_mutex_destroy((pthread_mutex_t*) mtxHandle)) { ThrowXML(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotDestroy); } delete (pthread_mutex_t*)mtxHandle; +#endif } } @@@@ -539,7 +555,11 @@@@ { if (mtxHandle != NULL) { +#ifdef USE_PTH + if (pth_mutex_acquire((pth_mutex_t*) mtxHandle, FALSE, NULL)) +#else if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle)) +#endif { ThrowXML(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotLock); @@@@ -552,7 +572,11 @@@@ { if (mtxHandle != NULL) { +#ifdef USE_PTH + if (pth_mutex_release((pth_mutex_t*) mtxHandle)) +#else if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle)) +#endif { ThrowXML(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotUnlock); @ 1.3 log @fix build process, EVAL again @ text @@ 1.2 log @upgrade 2.1.0 -> 2.2.0 @ text @d1 2 a2 2 --- src/xercesc/runConfigure.dist Mon Feb 10 15:30:59 2003 +++ src/xercesc/runConfigure Mon Feb 10 15:36:55 2003 d11 1 a11 1 @@@@ -301,8 +302,16 @@@@ d17 16 a32 16 + case $thread in + pth) + threadingLibs="-L$prefix/lib -lpth -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS -DUSE_PTH -I$prefix/include" + ;; + *) + threadingLibs="-pthread -lc_r" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" + ;; + esac elif test $platform = "aix"; then aix_version=`./config.guess`; echo Found host system to be $aix_version --- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp.dist Mon Feb 10 15:31:14 2003 +++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Mon Feb 10 15:36:55 2003 @@@@ -95,8 +95,12 @@@@ d45 1 a45 1 @@@@ -598,6 +602,14 @@@@ d60 1 a60 1 @@@@ -609,20 +621,24 @@@@ d86 1 a86 1 @@@@ -631,7 +647,11 @@@@ d98 1 a98 1 @@@@ -644,7 +664,11 @@@@ @ 1.1 log @make thread-support optional preliminary with_pth (patch supplied for FreeBSD only) @ text @d1 2 a2 2 --- src/xercesc/runConfigure.dist Fri Dec 27 10:26:26 2002 +++ src/xercesc/runConfigure Fri Dec 27 10:56:18 2002 d30 3 a32 3 --- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp.dist Tue Aug 27 09:24:36 2002 +++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Fri Dec 27 10:35:29 2002 @@@@ -86,8 +86,12 @@@@ d45 1 a45 1 @@@@ -584,6 +588,14 @@@@ d60 1 a60 1 @@@@ -595,20 +607,24 @@@@ d86 1 a86 1 @@@@ -617,7 +633,11 @@@@ d98 1 a98 1 @@@@ -630,7 +650,11 @@@@ @