Commit eccfdaff authored by Ken Brown's avatar Ken Brown

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.
parent 2ede38ce
Pipeline #805 passed with stage
in 53 minutes and 47 seconds
......@@ -4126,7 +4126,7 @@ getrusage get_current_dir_name \
lrand48 random rint trunc \
select getpagesize setlocale newlocale \
getrlimit setrlimit shutdown \
pthread_sigmask strsignal setitimer \
pthread_sigmask strsignal setitimer timer_getoverrun \
sendto recvfrom getsockname getifaddrs freeifaddrs \
gai_strerror sync \
getpwent endpwent getgrent endgrent \
......
......@@ -232,9 +232,10 @@ static EMACS_INT current_sampling_interval;
/* Signal handler for sampling profiler. */
/* timer_getoverrun is not implemented on Cygwin, but the following
seems to be good enough for profiling. */
#ifdef CYGWIN
/* timer_getoverrun is not implemented on Cygwin prior to
cygwin-3.0.0, but the following seems to be good enough for
profiling. */
#if defined CYGWIN && !defined HAVE_TIMER_GETOVERRUN
#define timer_getoverrun(x) 0
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment