mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-03 19:03:24 +00:00
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>. * admin/merge-gnulib (GNULIB_MODULES): Add timer-time. * configure.ac (gl_THREADLIB): Define to empty, since Emacs does threads its own way. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * m4/timer_time.m4: New file, from gnulib. * src/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.
This commit is contained in:
parent
3670daf7f9
commit
a615a3aeef
9 changed files with 70 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
* Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile,
|
* Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile,
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2012-09-26 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
* unidata/BidiMirroring.txt:
|
* unidata/BidiMirroring.txt:
|
||||||
|
|
|
@ -34,7 +34,7 @@ GNULIB_MODULES='
|
||||||
manywarnings mktime pselect pthread_sigmask readlink
|
manywarnings mktime pselect pthread_sigmask readlink
|
||||||
socklen stat-time stdalign stdarg stdbool stdio
|
socklen stat-time stdalign stdarg stdbool stdio
|
||||||
strftime strtoimax strtoumax symlink sys_stat
|
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
|
warnings
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
|
@ -571,6 +571,9 @@ else
|
||||||
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
|
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Avoid gnulib's threadlib module, as we do threads our own way.
|
||||||
|
AC_DEFUN([gl_THREADLIB])
|
||||||
|
|
||||||
# Initialize gnulib right after choosing the compiler.
|
# Initialize gnulib right after choosing the compiler.
|
||||||
gl_EARLY
|
gl_EARLY
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# the same distribution terms as the rest of that program.
|
# the same distribution terms as the rest of that program.
|
||||||
#
|
#
|
||||||
# Generated by gnulib-tool.
|
# 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
|
MOSTLYCLEANFILES += core *.stackdump
|
||||||
|
|
|
@ -111,6 +111,7 @@ AC_DEFUN([gl_EARLY],
|
||||||
# Code from module sys_time:
|
# Code from module sys_time:
|
||||||
# Code from module time:
|
# Code from module time:
|
||||||
# Code from module time_r:
|
# Code from module time_r:
|
||||||
|
# Code from module timer-time:
|
||||||
# Code from module timespec:
|
# Code from module timespec:
|
||||||
# Code from module timespec-add:
|
# Code from module timespec-add:
|
||||||
# Code from module timespec-sub:
|
# Code from module timespec-sub:
|
||||||
|
@ -263,6 +264,7 @@ AC_DEFUN([gl_INIT],
|
||||||
gl_PREREQ_TIME_R
|
gl_PREREQ_TIME_R
|
||||||
fi
|
fi
|
||||||
gl_TIME_MODULE_INDICATOR([time_r])
|
gl_TIME_MODULE_INDICATOR([time_r])
|
||||||
|
gl_TIMER_TIME
|
||||||
gl_TIMESPEC
|
gl_TIMESPEC
|
||||||
gl_UNISTD_H
|
gl_UNISTD_H
|
||||||
gl_UTIMENS
|
gl_UTIMENS
|
||||||
|
@ -661,6 +663,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||||
m4/sys_time_h.m4
|
m4/sys_time_h.m4
|
||||||
m4/time_h.m4
|
m4/time_h.m4
|
||||||
m4/time_r.m4
|
m4/time_r.m4
|
||||||
|
m4/timer_time.m4
|
||||||
m4/timespec.m4
|
m4/timespec.m4
|
||||||
m4/tm_gmtoff.m4
|
m4/tm_gmtoff.m4
|
||||||
m4/unistd_h.m4
|
m4/unistd_h.m4
|
||||||
|
|
39
m4/timer_time.m4
Normal file
39
m4/timer_time.m4
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# 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
|
||||||
|
])
|
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
|
||||||
|
|
||||||
* profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
|
* profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
|
||||||
|
|
|
@ -42,7 +42,7 @@ static struct atimer *atimers;
|
||||||
|
|
||||||
/* The alarm timer and whether it was properly initialized, if
|
/* The alarm timer and whether it was properly initialized, if
|
||||||
POSIX timers are available. */
|
POSIX timers are available. */
|
||||||
#ifdef SIGEV_SIGNAL
|
#ifdef HAVE_TIMER_SETTIME
|
||||||
static timer_t alarm_timer;
|
static timer_t alarm_timer;
|
||||||
static bool alarm_timer_ok;
|
static bool alarm_timer_ok;
|
||||||
#endif
|
#endif
|
||||||
|
@ -296,7 +296,7 @@ set_alarm (void)
|
||||||
#endif
|
#endif
|
||||||
EMACS_TIME now, interval;
|
EMACS_TIME now, interval;
|
||||||
|
|
||||||
#ifdef SIGEV_SIGNAL
|
#ifdef HAVE_TIMER_SETTIME
|
||||||
if (alarm_timer_ok)
|
if (alarm_timer_ok)
|
||||||
{
|
{
|
||||||
struct itimerspec ispec;
|
struct itimerspec ispec;
|
||||||
|
@ -416,7 +416,7 @@ void
|
||||||
init_atimer (void)
|
init_atimer (void)
|
||||||
{
|
{
|
||||||
struct sigaction action;
|
struct sigaction action;
|
||||||
#ifdef SIGEV_SIGNAL
|
#ifdef HAVE_TIMER_SETTIME
|
||||||
struct sigevent sigev;
|
struct sigevent sigev;
|
||||||
sigev.sigev_notify = SIGEV_SIGNAL;
|
sigev.sigev_notify = SIGEV_SIGNAL;
|
||||||
sigev.sigev_signo = SIGALRM;
|
sigev.sigev_signo = SIGALRM;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue