emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r109107: Fix regression with pthread_


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109107: Fix regression with pthread_sigmask on FreeBSD.
Date: Mon, 16 Jul 2012 19:09:58 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109107
fixes bug: http://debbugs.gnu.org/11884
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2012-07-16 19:09:58 -0700
message:
  Fix regression with pthread_sigmask on FreeBSD.
  
  * configure.ac: Configure gnulib at the end, not before running
  pkg-config.  This restores the behavior before 2012-06-22, when
  higher-resolution time stamps were added, and fixes a bug whereby
  LIB_PTHREAD was not used and gnulib's part of 'configure'
  therefore incorrectly assumed that pthread_sigmask wasn't working.
  Fix the problem with -lrt and clock_gettime a different way.
  This should complete the fix for Bug#11884.
  (pre_PKG_CONFIG_CFLAGS, pre_PKG_CONFIG_LIBS): New shell vars.
modified:
  ChangeLog
  configure.ac
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-07-15 18:18:37 +0000
+++ b/ChangeLog 2012-07-17 02:09:58 +0000
@@ -1,3 +1,15 @@
+2012-07-17  Paul Eggert  <address@hidden>
+
+       Fix regression with pthread_sigmask on FreeBSD (Bug#11884).
+       * configure.ac: Configure gnulib at the end, not before running
+       pkg-config.  This restores the behavior before 2012-06-22, when
+       higher-resolution time stamps were added, and fixes a bug whereby
+       LIB_PTHREAD was not used and gnulib's part of 'configure'
+       therefore incorrectly assumed that pthread_sigmask wasn't working.
+       Fix the problem with -lrt and clock_gettime a different way.
+       This should complete the fix for Bug#11884.
+       (pre_PKG_CONFIG_CFLAGS, pre_PKG_CONFIG_LIBS): New shell vars.
+
 2012-07-15  Paul Eggert  <address@hidden>
 
        Merge from gnulib, incorporating:

=== modified file 'configure.ac'
--- a/configure.ac      2012-07-14 00:04:10 +0000
+++ b/configure.ac      2012-07-17 02:09:58 +0000
@@ -1104,12 +1104,8 @@
 esac
 
 
-# Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might
-# for example add -lrt to RSVG_LIBS, which would then cause gnulib to
-# incorrectly conclude that -lrt is not needed to link clock_gettime.
-gl_ASSERT_NO_GNULIB_POSIXCHECK
-gl_ASSERT_NO_GNULIB_TESTS
-gl_INIT
+pre_PKG_CONFIG_CFLAGS=$CFLAGS
+pre_PKG_CONFIG_LIBS=$LIBS
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
@@ -3156,7 +3152,7 @@
   aix4-2)
     dnl Unfortunately without libXmu we cannot support EditRes.
     if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
-      AC_DEFINE(NO_EDITRES, 1)    
+      AC_DEFINE(NO_EDITRES, 1)
     fi
     ;;
 
@@ -3405,7 +3401,7 @@
     dnl Not used, because PTY_ITERATION is defined.
     AC_DEFINE(FIRST_PTY_LETTER, ['q'])
     AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; 
char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; 
cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, 
O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); 
if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) 
return -1; strcpy (pty_name, name); }] )
-    dnl No need to get the pty name at all. 
+    dnl No need to get the pty name at all.
     AC_DEFINE(PTY_NAME_SPRINTF, [] )
     dnl No need to use sprintf to get the tty name--we get that from _getpty.
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] )
@@ -3450,7 +3446,7 @@
     AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1)
     ;;
 
-  dnl 21 Jun 06: Eric Hanchrow <address@hidden> says this works. 
+  dnl 21 Jun 06: Eric Hanchrow <address@hidden> says this works.
   dnl FIXME Does gnu-kfreebsd have linux/version.h?  It seems unlikely...
   gnu-linux | gnu-kfreebsd )
 
@@ -4006,6 +4002,24 @@
 AC_SUBST(PRE_ALLOC_OBJ)
 AC_SUBST(POST_ALLOC_OBJ)
 
+# Configure gnulib.  Although this does not affect CFLAGS or LIBS permanently.
+# it temporarily reverts them to their pre-pkg-config values,
+# because gnulib needs to work with both src (which uses the
+# pkg-config stuff) and lib-src (which does not).  For example, gnulib
+# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
+# and it therefore needs to run in an environment where LIBS does not
+# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
+# for some package unrelated to lib-src.
+SAVE_CFLAGS=$CFLAGS
+SAVE_LIBS=$LIBS
+CFLAGS=$pre_PKG_CONFIG_CFLAGS
+LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
+gl_ASSERT_NO_GNULIB_POSIXCHECK
+gl_ASSERT_NO_GNULIB_TESTS
+gl_INIT
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS
+
 case "$opsys" in
   aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]