aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-09-26 18:06:23 -0700
committerPaul Eggert2012-09-26 18:06:23 -0700
commita615a3aeef0fb1469dcf89e2217a027a6dce82c1 (patch)
tree6a9d26ac4b2a5ac287af1485234637c992474e12 /src
parent3670daf7f9a480d8e87b292ff7051d5be331c6b4 (diff)
downloademacs-a615a3aeef0fb1469dcf89e2217a027a6dce82c1.tar.gz
emacs-a615a3aeef0fb1469dcf89e2217a027a6dce82c1.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/atimer.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 445090fb2a1..c920f091063 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-09-27 Paul Eggert <eggert@cs.ucla.edu>
2
3 Check more robustly for timer_settime.
4 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
5 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
6 call timer_settime.
7
12012-09-26 Tomohiro Matsuyama <tomo@cx4a.org> 82012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
2 9
3 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO. 10 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
diff --git a/src/atimer.c b/src/atimer.c
index 8bb80445bde..048c62798ef 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -42,7 +42,7 @@ static struct atimer *atimers;
42 42
43/* The alarm timer and whether it was properly initialized, if 43/* The alarm timer and whether it was properly initialized, if
44 POSIX timers are available. */ 44 POSIX timers are available. */
45#ifdef SIGEV_SIGNAL 45#ifdef HAVE_TIMER_SETTIME
46static timer_t alarm_timer; 46static timer_t alarm_timer;
47static bool alarm_timer_ok; 47static bool alarm_timer_ok;
48#endif 48#endif
@@ -296,7 +296,7 @@ set_alarm (void)
296#endif 296#endif
297 EMACS_TIME now, interval; 297 EMACS_TIME now, interval;
298 298
299#ifdef SIGEV_SIGNAL 299#ifdef HAVE_TIMER_SETTIME
300 if (alarm_timer_ok) 300 if (alarm_timer_ok)
301 { 301 {
302 struct itimerspec ispec; 302 struct itimerspec ispec;
@@ -416,7 +416,7 @@ void
416init_atimer (void) 416init_atimer (void)
417{ 417{
418 struct sigaction action; 418 struct sigaction action;
419#ifdef SIGEV_SIGNAL 419#ifdef HAVE_TIMER_SETTIME
420 struct sigevent sigev; 420 struct sigevent sigev;
421 sigev.sigev_notify = SIGEV_SIGNAL; 421 sigev.sigev_notify = SIGEV_SIGNAL;
422 sigev.sigev_signo = SIGALRM; 422 sigev.sigev_signo = SIGALRM;