aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Brown2019-02-17 12:10:26 -0500
committerKen Brown2019-02-18 12:16:06 -0500
commiteccfdaff5b52e1fadbaf2fbbb6c1366a7addf377 (patch)
treed557ecc6a8e1825b2185c8cbd4d20d1b19428bd9
parent2ede38ce4bf336c573450c61a2e9a41fb7ebe1be (diff)
downloademacs-eccfdaff5b52e1fadbaf2fbbb6c1366a7addf377.tar.gz
emacs-eccfdaff5b52e1fadbaf2fbbb6c1366a7addf377.zip
Use 'timer_getoverrun' on Cygwin when possible
* configure.ac: Add a check for the 'timer_getoverrun' function. * src/profiler.c [CYGWIN] : Define 'timer_getoverrun' as a macro only on versions of Cygwin where it is not already defined as a function.
-rw-r--r--configure.ac2
-rw-r--r--src/profiler.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 58579008f3a..c26eb6d1e89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4126,7 +4126,7 @@ getrusage get_current_dir_name \
4126lrand48 random rint trunc \ 4126lrand48 random rint trunc \
4127select getpagesize setlocale newlocale \ 4127select getpagesize setlocale newlocale \
4128getrlimit setrlimit shutdown \ 4128getrlimit setrlimit shutdown \
4129pthread_sigmask strsignal setitimer \ 4129pthread_sigmask strsignal setitimer timer_getoverrun \
4130sendto recvfrom getsockname getifaddrs freeifaddrs \ 4130sendto recvfrom getsockname getifaddrs freeifaddrs \
4131gai_strerror sync \ 4131gai_strerror sync \
4132getpwent endpwent getgrent endgrent \ 4132getpwent endpwent getgrent endgrent \
diff --git a/src/profiler.c b/src/profiler.c
index 15a0eef0d3e..293e52633a8 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -232,9 +232,10 @@ static EMACS_INT current_sampling_interval;
232 232
233/* Signal handler for sampling profiler. */ 233/* Signal handler for sampling profiler. */
234 234
235/* timer_getoverrun is not implemented on Cygwin, but the following 235/* timer_getoverrun is not implemented on Cygwin prior to
236 seems to be good enough for profiling. */ 236 cygwin-3.0.0, but the following seems to be good enough for
237#ifdef CYGWIN 237 profiling. */
238#if defined CYGWIN && !defined HAVE_TIMER_GETOVERRUN
238#define timer_getoverrun(x) 0 239#define timer_getoverrun(x) 0
239#endif 240#endif
240 241