diff options
author | joerg <joerg@pkgsrc.org> | 2006-05-29 16:31:43 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-05-29 16:31:43 +0000 |
commit | ef635bb61e0e2446a26683d89299d8df8d039790 (patch) | |
tree | e2229f04b7cdace42b63aa031ec3d27d35bff17a /lang/spl/patches | |
parent | cc4a2ab6731ba09bbaf7ce6e42fb36cfcdc39ecf (diff) | |
download | pkgsrc-ef635bb61e0e2446a26683d89299d8df8d039790.tar.gz |
Expects bash. Use portable way to initialise a recursive mutex.
DragonFly is a BSD as well. Bump revision.
Diffstat (limited to 'lang/spl/patches')
-rw-r--r-- | lang/spl/patches/patch-aa | 46 | ||||
-rw-r--r-- | lang/spl/patches/patch-ab | 22 |
2 files changed, 68 insertions, 0 deletions
diff --git a/lang/spl/patches/patch-aa b/lang/spl/patches/patch-aa new file mode 100644 index 00000000000..adf7baa6cda --- /dev/null +++ b/lang/spl/patches/patch-aa @@ -0,0 +1,46 @@ +$NetBSD: patch-aa,v 1.1 2006/05/29 16:31:43 joerg Exp $ + +--- clib.c.orig 2006-05-15 09:49:19.000000000 +0000 ++++ clib.c +@@ -366,13 +366,40 @@ static inline void DO_UNLOCK() { + + # else + +-static pthread_mutex_t load_unload_lck = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; ++static int load_unload_initialised; ++static pthread_mutex_t load_unload_init_lck = PTHREAD_MUTEX_INITIALIZER; ++static pthread_mutex_t load_unload_lck; ++ ++static void DO_LOCK_INIT(void) ++{ ++ pthread_mutexattr_t mattr; ++ ++ pthread_mutex_lock(&load_unload_init_lck); ++ ++ if (load_unload_initialised) { ++ pthread_mutex_unlock(&load_unload_init_lck); ++ return; ++ } ++ ++ pthread_mutexattr_init(&mattr); ++ pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE); ++ pthread_mutex_init(&load_unload_lck, &mattr); ++ pthread_mutexattr_destroy(&mattr); ++ ++ load_unload_initialised = 1; ++ ++ pthread_mutex_unlock(&load_unload_init_lck); ++} + + static inline void DO_LOCK() { ++ if (!load_unload_initialised) ++ DO_LOCK_INIT(); + pthread_mutex_lock(&load_unload_lck); + } + + static inline void DO_UNLOCK() { ++ if (!load_unload_initialised) ++ DO_LOCK_INIT(); + pthread_mutex_unlock(&load_unload_lck); + } + diff --git a/lang/spl/patches/patch-ab b/lang/spl/patches/patch-ab new file mode 100644 index 00000000000..16fd1ef7ace --- /dev/null +++ b/lang/spl/patches/patch-ab @@ -0,0 +1,22 @@ +$NetBSD: patch-ab,v 1.1 2006/05/29 16:31:43 joerg Exp $ + +--- GNUmakefile.orig 2006-05-29 15:40:44.000000000 +0000 ++++ GNUmakefile +@@ -22,7 +22,7 @@ + BUILDING_FOR_MACOSX := $(shell uname | grep -qvi darwin; echo $$?) + BUILDING_FOR_CYGWIN := $(shell uname | grep -qvi cygwin; echo $$?) + BUILDING_FOR_MINGW := $(shell uname | grep -qvi mingw; echo $$?) +-BUILDING_FOR_BSD := $(shell uname | grep -qvi bsd; echo $$?) ++BUILDING_FOR_BSD := $(shell uname | egrep -qvi \(bsd\|dragonfly\); echo $$?) + BUILDING_FOR_IRIX := $(shell uname | grep -qvi irix; echo $$?) + + +@@ -159,7 +159,7 @@ else + endif + + ifeq ($(ENABLE_REGEX_SUPPORT),1) +- LDLIBS += $(shell pcre-config --libs) ++ LDLIBS += $(shell pcre-config --libs) -R${PREFIX}/lib + DLL_LIBS += $(shell pcre-config --libs) + CFLAGS += $(shell pcre-config --cflags) -DENABLE_REGEX_SUPPORT + endif |