xref: /netbsd-src/external/bsd/ntp/dist/include/ntp_workimpl.h (revision cdfa2a7ef92791ba9db70a584a1d904730e6fb46)
1 /*	$NetBSD: ntp_workimpl.h,v 1.5 2020/05/25 20:47:20 christos Exp $	*/
2 
3 /*
4  * ntp_workimpl.h - selects worker child implementation
5  */
6 #ifndef NTP_WORKIMPL_H
7 #define NTP_WORKIMPL_H
8 
9 /*
10  * Some systems do not support fork() and don't have an alternate
11  * threads implementation of ntp_intres.  Such systems are limited
12  * to using numeric IP addresses.
13  */
14 #if defined(SYS_WINNT)
15 # define WORK_THREAD
16 #elif defined(ISC_PLATFORM_USETHREADS) && \
17       defined(HAVE_SEM_TIMEDWAIT) && \
18       (defined(HAVE_GETCLOCK) || defined(HAVE_CLOCK_GETTIME))
19 # define WORK_THREAD
20 # define WORK_PIPE
21 #elif defined(VMS) || defined(SYS_VXWORKS)
22   /* empty */
23 #elif defined(HAVE_WORKING_FORK)
24 # define WORK_FORK
25 # define WORK_PIPE
26 #endif
27 
28 #if defined(WORK_FORK) || defined(WORK_THREAD)
29 # define WORKER
30 #endif
31 
32 #endif	/* !NTP_WORKIMPL_H */
33