+2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ Check more robustly for timer_settime.
+ This should fix an OS X build problem reported by Ivan Andrus in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00671.html>.
+ * configure.ac (gl_THREADLIB): Define to empty, since Emacs
+ does threads its own way.
+
2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile,
+2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ Check more robustly for timer_settime.
+ * merge-gnulib (GNULIB_MODULES): Add timer-time.
+
2012-09-26 Juanma Barranquero <lekktu@gmail.com>
* unidata/BidiMirroring.txt:
manywarnings mktime pselect pthread_sigmask readlink
socklen stat-time stdalign stdarg stdbool stdio
strftime strtoimax strtoumax symlink sys_stat
- sys_time time timespec-add timespec-sub utimens
+ sys_time time timer-time timespec-add timespec-sub utimens
warnings
'
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
+# Avoid gnulib's threadlib module, as we do threads our own way.
+AC_DEFUN([gl_THREADLIB])
+
# Initialize gnulib right after choosing the compiler.
gl_EARLY
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub utimens warnings
MOSTLYCLEANFILES += core *.stackdump
# Code from module sys_time:
# Code from module time:
# Code from module time_r:
+ # Code from module timer-time:
# Code from module timespec:
# Code from module timespec-add:
# Code from module timespec-sub:
gl_PREREQ_TIME_R
fi
gl_TIME_MODULE_INDICATOR([time_r])
+ gl_TIMER_TIME
gl_TIMESPEC
gl_UNISTD_H
gl_UTIMENS
m4/sys_time_h.m4
m4/time_h.m4
m4/time_r.m4
+ m4/timer_time.m4
m4/timespec.m4
m4/tm_gmtoff.m4
m4/unistd_h.m4
--- /dev/null
+# timer_time.m4 serial 2
+dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Check for timer_settime, and set LIB_TIMER_TIME.
+
+AC_DEFUN([gl_TIMER_TIME],
+[
+ dnl Based on clock_time.m4. See details there.
+
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_THREADLIB])
+
+ LIB_TIMER_TIME=
+ AC_SUBST([LIB_TIMER_TIME])
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS([timer_settime], [rt posix4],
+ [test "$ac_cv_search_timer_settime" = "none required" ||
+ LIB_TIMER_TIME=$ac_cv_search_timer_settime])
+ dnl GLIBC uses threads to emulate posix timers when kernel support
+ dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
+ dnl Now the pthread lib is linked automatically in the normal case,
+ dnl but when linking statically, it needs to be explicitly specified.
+ AC_EGREP_CPP([Thread],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
+ && !defined __UCLIBC__
+ Thread emulation available
+ #endif
+#endif
+ ],
+ [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])
+ AC_CHECK_FUNCS([timer_settime])
+ LIBS=$gl_saved_libs
+])
+2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ Check more robustly for timer_settime.
+ * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
+ Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
+ call timer_settime.
+
2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
* profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
/* The alarm timer and whether it was properly initialized, if
POSIX timers are available. */
-#ifdef SIGEV_SIGNAL
+#ifdef HAVE_TIMER_SETTIME
static timer_t alarm_timer;
static bool alarm_timer_ok;
#endif
#endif
EMACS_TIME now, interval;
-#ifdef SIGEV_SIGNAL
+#ifdef HAVE_TIMER_SETTIME
if (alarm_timer_ok)
{
struct itimerspec ispec;
init_atimer (void)
{
struct sigaction action;
-#ifdef SIGEV_SIGNAL
+#ifdef HAVE_TIMER_SETTIME
struct sigevent sigev;
sigev.sigev_notify = SIGEV_SIGNAL;
sigev.sigev_signo = SIGALRM;