pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/guile support NetBSD's pthread_attr_get_np() whic...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f1a0c0312d1d
branches:  trunk
changeset: 556958:f1a0c0312d1d
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Tue Apr 07 10:53:07 2009 +0000

description:
support NetBSD's pthread_attr_get_np() which is similar to Linux's
pthread_getattr_np(), just different,
needed for get_thread_stack_base() to work which is needed for
the scm_init_guile() API
approved by gdt
bump PKGREVISION

diffstat:

 lang/guile/Makefile         |   4 ++--
 lang/guile/distinfo         |   5 ++++-
 lang/guile/patches/patch-am |  26 ++++++++++++++++++++++++++
 lang/guile/patches/patch-an |  14 ++++++++++++++
 lang/guile/patches/patch-ao |  31 +++++++++++++++++++++++++++++++
 5 files changed, 77 insertions(+), 3 deletions(-)

diffs (112 lines):

diff -r e4fac0d71e9f -r f1a0c0312d1d lang/guile/Makefile
--- a/lang/guile/Makefile       Tue Apr 07 10:42:14 2009 +0000
+++ b/lang/guile/Makefile       Tue Apr 07 10:53:07 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.89 2008/12/15 15:26:47 gdt Exp $
+# $NetBSD: Makefile,v 1.90 2009/04/07 10:53:07 drochner Exp $
 
 DISTNAME=              guile-1.8.6
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            lang
 MASTER_SITES=          ${MASTER_SITE_GNU:=guile/}
 
diff -r e4fac0d71e9f -r f1a0c0312d1d lang/guile/distinfo
--- a/lang/guile/distinfo       Tue Apr 07 10:42:14 2009 +0000
+++ b/lang/guile/distinfo       Tue Apr 07 10:53:07 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.40 2008/12/15 15:26:47 gdt Exp $
+$NetBSD: distinfo,v 1.41 2009/04/07 10:53:07 drochner Exp $
 
 SHA1 (guile-1.8.6.tar.gz) = a3896f86044a2b3740dac43e045c349d656fba31
 RMD160 (guile-1.8.6.tar.gz) = d6695d266a6091dc5fb1c688e3f0286f1c6d382e
@@ -8,3 +8,6 @@
 SHA1 (patch-ah) = 351136075aaaab96117fecc7cedc8ee989d8a1e0
 SHA1 (patch-ak) = 6639ea95471a76893b0b074dcbfbd139a1571309
 SHA1 (patch-al) = 6a5fb3136028bb5a5185ce7174a20d5f9d227e18
+SHA1 (patch-am) = 6806103e9887c4df39882fa8e68607fe97392e96
+SHA1 (patch-an) = 89ee76c4e74a7af3a5e2a8e65d889292de1768f1
+SHA1 (patch-ao) = b648826c5e951cd98ca6e2cdf48435cbdba096ff
diff -r e4fac0d71e9f -r f1a0c0312d1d lang/guile/patches/patch-am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/guile/patches/patch-am       Tue Apr 07 10:53:07 2009 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-am,v 1.5 2009/04/07 10:53:07 drochner Exp $
+
+--- configure.orig     2008-12-08 18:49:13.000000000 +0100
++++ configure
+@@ -34249,7 +34249,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 
+ 
+-for ac_func in pthread_attr_getstack pthread_getattr_np pthread_get_stackaddr_np pthread_sigmask
++for ac_func in pthread_attr_getstack pthread_getattr_np pthread_get_stackaddr_np pthread_sigmask pthread_attr_get_np
+ do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+@@ -34610,7 +34610,12 @@ int main ()
+   void *start, *end;
+   size_t size;
+ 
++#if HAVE_PTHREAD_ATTR_GET_NP
++  pthread_attr_init(&attr);
++  pthread_attr_get_np(pthread_self (), &attr);
++#else
+   pthread_getattr_np (pthread_self (), &attr);
++#endif
+   pthread_attr_getstack (&attr, &start, &size);
+   end = (char *)start + size;
+ 
diff -r e4fac0d71e9f -r f1a0c0312d1d lang/guile/patches/patch-an
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/guile/patches/patch-an       Tue Apr 07 10:53:07 2009 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-an,v 1.1 2009/04/07 10:53:08 drochner Exp $
+
+--- config.h.in.orig   2008-12-08 18:49:18.000000000 +0100
++++ config.h.in
+@@ -436,6 +436,9 @@ Boston, MA 02110-1301, USA.
+ /* Define to 1 if you have the `pthread_getattr_np' function. */
+ #undef HAVE_PTHREAD_GETATTR_NP
+ 
++/* XXX manually patched */
++#undef HAVE_PTHREAD_ATTR_GET_NP
++
+ /* Define to 1 if you have the `pthread_get_stackaddr_np' function. */
+ #undef HAVE_PTHREAD_GET_STACKADDR_NP
+ 
diff -r e4fac0d71e9f -r f1a0c0312d1d lang/guile/patches/patch-ao
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/guile/patches/patch-ao       Tue Apr 07 10:53:07 2009 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-ao,v 1.3 2009/04/07 10:53:08 drochner Exp $
+
+--- libguile/threads.c.orig    2008-12-08 18:42:56.000000000 +0100
++++ libguile/threads.c
+@@ -624,7 +624,7 @@ scm_i_init_thread_for_guile (SCM_STACKIT
+ 
+ #if SCM_USE_PTHREAD_THREADS
+ 
+-#if HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP
++#if HAVE_PTHREAD_ATTR_GETSTACK && (HAVE_PTHREAD_GETATTR_NP || HAVE_PTHREAD_ATTR_GET_NP)
+ /* This method for GNU/Linux and perhaps some other systems.
+    It's not for MacOS X or Solaris 10, since pthread_getattr_np is not
+    available on them.  */
+@@ -637,9 +637,17 @@ get_thread_stack_base ()
+   void *start, *end;
+   size_t size;
+ 
++#ifdef HAVE_PTHREAD_ATTR_GET_NP
++  pthread_attr_init(&attr);
++  pthread_attr_get_np(pthread_self (), &attr);
++#else
+   pthread_getattr_np (pthread_self (), &attr);
++#endif
+   pthread_attr_getstack (&attr, &start, &size);
+   end = (char *)start + size;
++#ifdef HAVE_PTHREAD_ATTR_GET_NP
++  pthread_attr_destroy(&attr);
++#endif
+ 
+   /* XXX - pthread_getattr_np from LinuxThreads does not seem to work
+      for the main thread, but we can use scm_get_stack_base in that



Home | Main Index | Thread Index | Old Index