aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_mono_clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_mono_clock.c')
-rw-r--r--src/microhttpd/mhd_mono_clock.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_mono_clock.c b/src/microhttpd/mhd_mono_clock.c
index 5cb566d8..54a3e9ad 100644
--- a/src/microhttpd/mhd_mono_clock.c
+++ b/src/microhttpd/mhd_mono_clock.c
@@ -30,6 +30,21 @@
30#undef HAVE_CLOCK_GETTIME 30#undef HAVE_CLOCK_GETTIME
31#endif /* _WIN32 && HAVE_CLOCK_GETTIME */ 31#endif /* _WIN32 && HAVE_CLOCK_GETTIME */
32 32
33#ifdef HAVE_CLOCK_GETTIME
34#include <time.h>
35#endif /* HAVE_CLOCK_GETTIME */
36
37#ifdef HAVE_GETHRTIME
38#ifdef HAVE_SYS_TIME_H
39/* Solaris define gethrtime() in sys/time.h */
40#include <sys/time.h>
41#endif /* HAVE_SYS_TIME_H */
42#ifdef HAVE_TIME_H
43/* HP-UX define gethrtime() in time.h */
44#include <time.h>
45#endif /* HAVE_TIME_H */
46#endif /* HAVE_GETHRTIME */
47
33#ifdef HAVE_CLOCK_GET_TIME 48#ifdef HAVE_CLOCK_GET_TIME
34#include <mach/mach.h> 49#include <mach/mach.h>
35/* for host_get_clock_service(), mach_host_self(), mach_task_self() */ 50/* for host_get_clock_service(), mach_host_self(), mach_task_self() */
@@ -41,6 +56,15 @@
41static clock_serv_t mono_clock_service = _MHD_INVALID_CLOCK_SERV; 56static clock_serv_t mono_clock_service = _MHD_INVALID_CLOCK_SERV;
42#endif /* HAVE_CLOCK_GET_TIME */ 57#endif /* HAVE_CLOCK_GET_TIME */
43 58
59#ifdef _WIN32
60#ifndef WIN32_LEAN_AND_MEAN
61/* Do not include unneeded parts of W32 headers. */
62#define WIN32_LEAN_AND_MEAN 1
63#endif /* !WIN32_LEAN_AND_MEAN */
64#include <windows.h>
65#include <stdint.h>
66#endif /* _WIN32 */
67
44#ifdef HAVE_CLOCK_GETTIME 68#ifdef HAVE_CLOCK_GETTIME
45#ifdef CLOCK_REALTIME 69#ifdef CLOCK_REALTIME
46#define _MHD_UNWANTED_CLOCK CLOCK_REALTIME 70#define _MHD_UNWANTED_CLOCK CLOCK_REALTIME