summaryrefslogtreecommitdiff
path: root/src/syssignal.h
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2015-06-22 17:38:35 -0400
committerKen Brown <kbrown@cornell.edu>2015-06-22 17:38:35 -0400
commit531125e4c024ca12701608c4516cb9cf993cfad2 (patch)
treec477e5b6b4a9e1e429f9f2bdf0a2d0f8f8a3144b /src/syssignal.h
parentdc30fb9247d5d9d98ae1c3501d3ffa90e2001a46 (diff)
downloademacs-531125e4c024ca12701608c4516cb9cf993cfad2.tar.gz
Enable CPU profiling on Cygwin
* src/syssignal.h [CYGWIN] (PROFILER_CPU_SUPPORT): Revert previous change that undefined this. (SIGEV_SIGNAL): Ensure that this is defined as a macro. * src/profiler.c [CYGWIN] (timer_getoverrun): Define as a macro on Cygwin.
Diffstat (limited to 'src/syssignal.h')
-rw-r--r--src/syssignal.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/syssignal.h b/src/syssignal.h
index 28824003c5d..5c14479ccad 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -32,13 +32,17 @@ extern void unblock_tty_out_signal (sigset_t const *);
#define FORWARD_SIGNAL_TO_MAIN_THREAD
#endif
+/* On Cygwin as of 2015-06-22 SIGEV_SIGNAL is defined as an enum
+ constant but not as a macro. */
+#if defined CYGWIN && !defined SIGEV_SIGNAL
+#define SIGEV_SIGNAL SIGEV_SIGNAL
+#endif
+
#if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL
# define HAVE_ITIMERSPEC
#endif
-/* On Cygwin, setitimer does not support ITIMER_PROF, so we can't
- support CPU profiling. */
-#if (defined SIGPROF && !defined PROFILING && !defined CYGWIN \
+#if (defined SIGPROF && !defined PROFILING \
&& (defined HAVE_SETITIMER || defined HAVE_ITIMERSPEC))
# define PROFILER_CPU_SUPPORT
#endif