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