all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: 10201@debbugs.gnu.org
Cc: "Nelson H. F. Beebe" <beebe@math.utah.edu>
Subject: bug#10201: emacs-24.0.92 problem on MirBSD 10
Date: Fri, 02 Dec 2011 21:44:56 -0800	[thread overview]
Message-ID: <4ED9B758.7080903@cs.ucla.edu> (raw)
In-Reply-To: <CMM.0.95.0.1322877694.beebe@psi.math.utah.edu>

[Following up on bug-gnu-emacs, so that this gets a Bug#.]

In <http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>
on 12/02/11 18:01, Nelson H. F. Beebe wrote:

> 599c599
> < #define HAVE_PTHREAD_SIGMASK 1
> ---
> /* #define HAVE_PTHREAD_SIGMASK 1 */

Thanks for the bug report.  Why was this HAVE_PTHREAD_SIGMASK
patch needed?  Your email doesn't say.  MirBSD has
pthread_sigmask, according to
<https://www.mirbsd.org/htman/i386/man3/pthread_sigmask.htm>,
so pthread_sigmask should work.


> This resulted in link failure becaue gmalloc.c assumes that
> pthread_atfork() is available when HAVE_PTHREAD is defined, 
> but it is not in the MirBSD /usr/lib/libpthread.a library:

Thanks.  Does the following patch fix things for you?  If you
don't have the autotools installed you can simulate it by
substituting "pthread_atfork" for every instance of "pthread_self"
in the file "configure".

=== modified file 'ChangeLog'
--- ChangeLog	2011-12-03 04:06:45 +0000
+++ ChangeLog	2011-12-03 05:37:32 +0000
@@ -1,5 +1,10 @@
 2011-12-03  Paul Eggert  <eggert@cs.ucla.edu>
 
+	* configure.in (HAVE_PTHREAD): Check for pthread_atfork
+	if linking to gmalloc.c.  This should prevents a build failure on
+	MirBSD 10 reported by Nelson H. F. Beebe in
+	<http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>.
+
 	* .bzrignore: Add config.cache.
 
 2011-11-27  Jan Djärv  <jan.h.d@swipnet.se>

=== modified file 'configure.in'
--- configure.in	2011-11-30 16:23:05 +0000
+++ configure.in	2011-12-03 05:18:33 +0000
@@ -1717,7 +1717,15 @@
 LIB_PTHREAD=
 AC_CHECK_HEADERS(pthread.h)
 if test "$ac_cv_header_pthread_h"; then
-  AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes)
+  dnl gmalloc.c uses pthread_atfork, which is not available on older-style
+  dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
+  dnl testing for pthread_self if Emacs uses gmalloc.c.
+  if test "$GMALLOC_OBJ" = gmalloc.o; then
+    emacs_pthread_function=pthread_atfork
+  else
+    emacs_pthread_function=pthread_self
+  fi
+  AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes)
 fi
 if test "$HAVE_PTHREAD" = yes; then
   case "${canonical}" in






  reply	other threads:[~2011-12-03  5:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-03  2:01 emacs-24.0.92 problem on MirBSD 10 Nelson H. F. Beebe
2011-12-03  5:44 ` Paul Eggert [this message]
2011-12-16 23:49   ` bug#10201: " Glenn Morris
2011-12-17  0:53     ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED9B758.7080903@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=10201@debbugs.gnu.org \
    --cc=beebe@math.utah.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.