+2001-03-25 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntp_if.h:
+ * include/ntp_machine.h:
+ * include/ntp_unixtime.h:
+ * libntp/humandate.c:
+ * libntp/iosignal.c:
+ * libntp/mktime.c:
+ * libntp/prettydate.c:
+ * libntp/systime.c:
+ * libntp/tvtoa.c:
+ * libntp/uglydate.c:
+ * libntp/utvtoa.c:
+ * libparse/clk_computime.c:
+ * libparse/clk_dcf7000.c:
+ * libparse/clk_hopf6021.c:
+ * libparse/clk_meinberg.c:
+ * libparse/clk_rawdcf.c:
+ * libparse/clk_rcc8000.c:
+ * libparse/clk_schmid.c:
+ * libparse/clk_trimtaip.c:
+ * libparse/clk_trimtsip.c:
+ * libparse/clk_varitext.c:
+ * libparse/parse.c:
+ * libparse/parse_conf.c:
+ * ntpd/check_y2k.c:
+ * ntpd/ntp_config.c:
+ * ntpd/ntp_control.c:
+ * ntpd/ntp_intres.c:
+ * ntpd/ntp_io.c:
+ * ntpd/ntp_loopfilter.c:
+ * ntpd/ntp_monitor.c:
+ * ntpd/ntp_proto.c:
+ * ntpd/ntp_refclock.c:
+ * ntpd/ntp_request.c:
+ * ntpd/ntp_resolver.c:
+ * ntpd/ntp_timer.c:
+ * ntpd/ntp_util.c:
+ * ntpd/ntpd.c:
+ * ntpd/refclock_acts.c:
+ * ntpd/refclock_arbiter.c:
+ * ntpd/refclock_arc.c:
+ * ntpd/refclock_as2201.c:
+ * ntpd/refclock_atom.c:
+ * ntpd/refclock_bancomm.c:
+ * ntpd/refclock_chronolog.c:
+ * ntpd/refclock_chu.c:
+ * ntpd/refclock_datum.c:
+ * ntpd/refclock_dumbclock.c:
+ * ntpd/refclock_fg.c:
+ * ntpd/refclock_gpsvme.c:
+ * ntpd/refclock_heath.c:
+ * ntpd/refclock_hpgps.c:
+ * ntpd/refclock_irig.c:
+ * ntpd/refclock_jupiter.c:
+ * ntpd/refclock_leitch.c:
+ * ntpd/refclock_local.c:
+ * ntpd/refclock_msfees.c:
+ * ntpd/refclock_mx4200.c:
+ * ntpd/refclock_nmea.c:
+ * ntpd/refclock_oncore.c:
+ * ntpd/refclock_pcf.c:
+ * ntpd/refclock_pst.c:
+ * ntpd/refclock_shm.c:
+ * ntpd/refclock_tpro.c:
+ * ntpd/refclock_trak.c:
+ * ntpd/refclock_true.c:
+ * ntpd/refclock_ulink.c:
+ * ntpd/refclock_usno.c:
+ * ntpd/refclock_wwv.c:
+ * ntpd/refclock_wwvb.c:
+ * ntpdate/ntpdate.c:
+ * ntpdate/ntptime_config.c:
+ * ntpdate/ntptimeset.c:
+ * ntpdc/ntpdc.c:
+ * ntpdc/ntpdc_ops.c:
+ * ntpq/ntpq.c:
+ * ntpq/ntpq_ops.c:
+ * ntptrace/ntptrace.c:
+ * parseutil/testdcf.c:
+ * util/hist.c:
+ * util/ntp-genkeys.c:
+ * util/ntptime.c:
+ * util/precision.c:
+ * util/tickadj.c:
+ time.h and sys/time.h cleanup.
+
2001-03-24 Harlan Stenn <stenn@whimsy.udel.edu>
* configure.in: '99k19
# include "/sys/sync/sema.h"
#endif
-/* was: defined(SYS_AIX) */
-#if defined(TIME_WITH_SYS_TIME)
-# include <sys/time.h>
-# include <time.h>
-#endif
-
/* was: (defined(SYS_SOLARIS) && !defined(bsd)) || defined(SYS_SUNOS4) */
/* was: defined(SYS_UNIXWARE1) */
#ifdef HAVE_SYS_SOCKIO_H
#define __ntp_machine
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
#endif
#include "ntp_proto.h"
#include "ntp_types.h"
-#include <sys/time.h>
-
/* gettimeofday() takes two args in BSD and only one in SYSV */
# if defined(HAVE_SYS_TIMERS_H) && defined(HAVE_GETCLOCK)
# include <sys/timers.h>
* humandate - convert an NTP (or the current) time to something readable
*/
#include <stdio.h>
-#include "time.h"
#include "ntp_fp.h"
-#include "ntp_unixtime.h" /* includes <sys/time.h> */
+#include "ntp_unixtime.h" /* includes <sys/time.h> and <time.h> */
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-
static const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
* was shamelessly stolen from ntpd.
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "ntp_machine.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_if.h"
+#include "ntp_stdlib.h"
+#include "iosignal.h"
#include <stdio.h>
#include <signal.h>
-#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#if 0 /* Included by ntp_fp.h */
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
-#if 0 /* Included by ntp_if.h below */
-#ifdef HAVE_SYS_SOCKIO_H /* UXPV: SIOC* #defines (Frank Vance <fvance@waii.com>) */
-# include <sys/sockio.h>
-#endif
-#endif
+
#include <arpa/inet.h>
#if _BSDI_VERSION >= 199510
# include <ifaddrs.h>
#endif
-/* 98/06/01 */
-#include "ntp_machine.h" /* 98/06/01 */
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-#include "iosignal.h"
#if defined(HAVE_SIGNALED_IO)
static int sigio_block_count = 0;
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
* by hand. Sorry about that.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "ntp_machine.h"
#ifndef DSTMINUTES
#define DSTMINUTES 60
#define TM_YEAR_BASE 1900
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#include <time.h>
-
extern time_t time();
static int mon_lengths[2][MONSPERYEAR] = {
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
-#ifndef TM_IN_SYS_TIME
-#include <time.h>
-#endif
-
static const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
* systime -- routines to fiddle a UNIX clock.
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "ntp_proto.h" /* for MAX_FREQ */
+#include "ntp_machine.h"
+#include "ntp_fp.h"
+#include "ntp_syslog.h"
+#include "ntp_unixtime.h"
+#include "ntp_stdlib.h"
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/time.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
# include <utmpx.h>
#endif /* HAVE_UTMPX_H */
-#include "ntp_proto.h" /* for MAX_FREQ */
-#include "ntp_machine.h"
-#include "ntp_fp.h"
-#include "ntp_syslog.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
int systime_10ms_ticks = 0; /* adj sysclock in 10ms increments */
/*
/*
* tvtoa - return an asciized representation of a struct timeval
*/
-#include <stdio.h>
-#include <sys/time.h>
#include "lib_strbuf.h"
+
#if defined(VMS)
-#include "ntp_fp.h"
+# include "ntp_fp.h"
#endif /* VMS */
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
+#include <stdio.h>
+
char *
tvtoa(
const struct timeval *tv
#include "ntp_unixtime.h"
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
-#ifndef TM_IN_SYS_TIME
-#include <time.h>
-#endif
+
char *
uglydate(
* utvtoa - return an asciized representation of an unsigned struct timeval
*/
#include <stdio.h>
-#include <sys/time.h>
#include "lib_strbuf.h"
+
#if defined(VMS)
-#include "ntp_fp.h"
+# include "ntp_fp.h"
#endif
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
*
*/
-
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_DCF7000)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_HOPF6021)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_MEINBERG)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_RAWDCF)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_RCC8000)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_SCHMID)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#endif
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_TRIMTAIP)
-#include <sys/types.h>
-#include <sys/time.h>
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_TRIMTSIP)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_syslog.h"
#include "ntp_types.h"
#include "ntp_fp.h"
*
*/
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#include "parse.h"
#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
+# include "ntp_stdlib.h"
+# include <stdio.h>
#else
-#include "sys/parsestreams.h"
+# include "sys/parsestreams.h"
extern void printf P((const char *, ...));
#endif
static char rcsid[] = "parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A";
#endif
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#if defined(REFCLOCK) && defined(CLOCK_PARSE)
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
# include <config.h>
#endif
-#include <sys/types.h>
+#include "ntpd.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
# ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
# endif /* HAVE_SYS_IOCTL_H */
-# include <sys/time.h>
# if !defined(VMS) /*wjm*/
# include <sys/resource.h>
# endif /* VMS */
# include <apollo/base.h>
#endif /* SYS_DOMAINOS */
-#include "ntpd.h"
-
/* } end definitions lifted from ntpd.c */
#include "ntp_calendar.h"
# include <config.h>
#endif
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <signal.h>
-#ifndef SIGCHLD
-#define SIGCHLD SIGCLD
-#endif
-#if !defined(VMS)
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#endif /* VMS */
-#include <sys/time.h>
-
-#ifdef HAVE_NETINFO
-#include <netinfo/ni.h>
-#endif
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_cmdargs.h"
#ifdef PUBKEY
-#include "ntp_crypto.h"
+# include "ntp_crypto.h"
#endif /* PUBKEY */
+#include <stdio.h>
+#include <ctype.h>
+#include <sys/param.h>
+#include <signal.h>
+#ifndef SIGCHLD
+# define SIGCHLD SIGCLD
+#endif
+#if !defined(VMS)
+# ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+# endif
+#endif /* VMS */
+
+#ifdef HAVE_NETINFO
+# include <netinfo/ni.h>
+#endif
+
#ifdef SYS_WINNT
-#include <io.h>
+# include <io.h>
extern HANDLE ResolverThreadHandle;
#endif /* SYS_WINNT */
#include <config.h>
#endif
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_control.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+
#ifdef PUBKEY
#include "ntp_crypto.h"
#endif /* PUBKEY */
# include <config.h>
#endif
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_request.h"
+#include "ntp_stdlib.h"
+#include "ntp_syslog.h"
+
#include <stdio.h>
#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <netdb.h>
#include <signal.h>
# include <sys/param.h> /* MAXHOSTNAMELEN (often) */
#endif
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_request.h"
-#include "ntp_stdlib.h"
-#include "ntp_syslog.h"
-
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
/*
# include <config.h>
#endif
+#include "ntp_machine.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "iosignal.h"
+#include "ntp_refclock.h"
+#include "ntp_if.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <signal.h>
-#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
# include <ifaddrs.h>
#endif
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "iosignal.h"
-#include "ntp_refclock.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-
#if defined(VMS) /* most likely UCX-specific */
#include <UCX$INETDEF.H>
# include <config.h>
#endif
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
-#include <sys/time.h>
-
#include <signal.h>
#include <setjmp.h>
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
#if defined(VMS) && defined(VMS_LOCALUNIT) /*wjm*/
#include "ntp_refclock.h"
#endif /* VMS */
/*
* ntp_monitor.c - monitor who is using the ntpd server
*/
+
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-# ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-# endif
-# include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_if.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <signal.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+
/*
* I'm still not sure I like what I've done here. It certainly consumes
* memory like it is going out of style, and also may not be as low
#include <config.h>
#endif
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "ntp_string.h"
#include "ntp_crypto.h"
+#include <stdio.h>
+
#if defined(VMS) && defined(VMS_LOCALUNIT) /*wjm*/
#include "ntp_refclock.h"
#endif
# include <config.h>
#endif
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
+
#ifdef REFCLOCK
#ifdef TTYCLK
# include <config.h>
#endif
-#include <sys/types.h>
-#include <stdio.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_request.h"
#include "ntp_refclock.h"
#include "ntp_if.h"
#include "ntp_stdlib.h"
+
+#include <stdio.h>
+#include <signal.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include "recvbuff.h"
#ifdef KERNEL_PLL
# include <config.h>
#endif
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_request.h"
+#include "ntp_stdlib.h"
+#include "ntp_syslog.h"
+
#include <stdio.h>
#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <netdb.h>
#include <signal.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_request.h"
-#include "ntp_stdlib.h"
-#include "ntp_syslog.h"
-
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
/*
# include <config.h>
#endif
+#include "ntp_machine.h"
+#include "ntpd.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <signal.h>
#include <sys/signal.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_stdlib.h"
+
#if defined(HAVE_IO_COMPLETION_PORT)
# include "ntp_iocompletionport.h"
# include "ntp_timer.h"
/*
* ntp_util.c - stuff I didn't have any other place for
*/
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntp_filegen.h"
+#include "ntp_if.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
-#include <sys/time.h>
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
# include <math.h>
#endif
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_filegen.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-
#ifdef DOSYNCTODR
#if !defined(VMS)
#include <sys/resource.h>
/*
* ntpd.c - main program for the fixed point NTP daemon
*/
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-#include <sys/types.h>
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_stdlib.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
# ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
# endif /* HAVE_SYS_IOCTL_H */
-# include <sys/time.h>
# ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
# endif /* HAVE_SYS_RESOURCE_H */
# include <apollo/base.h>
#endif /* SYS_DOMAINOS */
-#include "ntpd.h"
-#include "ntp_io.h"
-
-#include "ntp_stdlib.h"
#include "recvbuff.h"
#include "ntp_cmdargs.h"
#if defined(REFCLOCK) && (defined(CLOCK_ACTS) || defined(CLOCK_PTBACTS))
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
#include "ntp_control.h"
+#include <stdio.h>
+#include <ctype.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
+
/* MUST BE AFTER LAST #include <config.h> !!! */
#if defined(CLOCK_ACTS) && defined(CLOCK_PTBACTS)
#if defined(REFCLOCK) && defined(CLOCK_ARBITER)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the Arbiter 1088A/B Satellite Controlled Clock.
* The claimed accuracy of this clock is 100 ns relative to the PPS
*/
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
#include <stdio.h>
#include <ctype.h>
-#include <sys/time.h>
#if defined(HAVE_BSD_TTYS)
#include <sgtty.h>
#include <termios.h>
#endif
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
/*
* This driver supports the ARCRON MSF Radio Controlled Clock
*/
#if defined(REFCLOCK) && defined(CLOCK_AS2201)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the Austron 2200A/2201A GPS Receiver with
* Buffered RS-232-C Interface Module. Note that the original 2200/2201
#if defined(REFCLOCK) && defined(CLOCK_ATOM)
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
#ifdef HAVE_PPSAPI
# ifdef HAVE_TIMEPPS_H
# include <timepps.h>
#endif
#if defined(REFCLOCK) && defined(CLOCK_BANC)
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/time.h>
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <syslog.h>
+#include <ctype.h>
+
/* STUFF BY RES */
struct btfp_time /* Structure for reading 5 time words */
/* in one ioctl(2) operation. */
#if defined(REFCLOCK) && defined(CLOCK_CHRONOLOG)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the Chronolog K-series WWVB receiver.
*
#if defined(REFCLOCK) && defined(CLOCK_CHU)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
-#include <math.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
+
+#include <stdio.h>
+#include <ctype.h>
+#include <math.h>
+
#ifdef HAVE_AUDIO
#include "audio.h"
#endif /* HAVE_AUDIO */
** Include Files
*/
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
#if defined(HAVE_BSD_TTYS)
#include <sgtty.h>
#endif /* HAVE_BSD_TTYS */
#if defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports a generic dumb clock that only outputs hh:mm:ss,
* in local time, no less.
#if defined(REFCLOCK) && defined(CLOCK_FG)
-#include <time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#endif
#if defined(REFCLOCK) && defined(CLOCK_GPSVME)
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/time.h>
-#include "gps.h"
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+
+#include <stdio.h>
+#include <syslog.h>
+#include <ctype.h>
+
+#include "gps.h"
#include "/etc/conf/h/io.h"
/* GLOBAL STUFF BY RES */
#if defined(REFCLOCK) && defined(CLOCK_HEATH)
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
+
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif /* not HAVE_SYS_IOCTL_H */
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
/*
* This driver supports the Heath GC-1000 Most Accurate Clock, with
* RS232C Output Accessory. This is a WWV/WWVH receiver somewhat less
/*
* refclock_hpgps - clock driver for HP 58503A GPS receiver
*/
+
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
#if defined(REFCLOCK) && defined(CLOCK_HPGPS)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/* Version 0.1 April 1, 1995
* 0.2 April 25, 1995
* tolerant of missing timecode response prompt and sends
#if defined(REFCLOCK) && defined(CLOCK_IRIG)
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
-#include <sys/time.h>
#include <math.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
#include "audio.h"
/*
#if defined(REFCLOCK) && defined(CLOCK_JUPITER) && defined(PPS)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
#include "ntp_calendar.h"
+#include <stdio.h>
+#include <ctype.h>
+
#include "jupiter.h"
#include <sys/ppsclock.h>
/*
* refclock_leitch - clock driver for the Leitch CSD-5300 Master Clock
*/
+
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
#if defined(REFCLOCK) && defined(CLOCK_LEITCH)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
+#include <stdio.h>
+#include <ctype.h>
+
#ifdef STREAM
#include <stropts.h>
#if defined(LEITCHCLK)
#endif
#ifdef REFCLOCK
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
#include "ntpd.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
#ifdef KERNEL_PLL
#include "ntp_syscall.h"
#endif
* (hence probably didn't work). Still in RCS file at cl.cam.ac.uk
*/
-#include <ctype.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
+
+#include <ctype.h>
#if defined(HAVE_BSD_TTYS)
#include <sgtty.h>
#endif /* HAVE_BSD_TTYS */
#if defined(REFCLOCK) && defined(CLOCK_MX4200) && defined(HAVE_PPSAPI)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
#include "mx4200.h"
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
#ifdef HAVE_SYS_TERMIOS_H
# include <sys/termios.h>
#endif
#if defined(REFCLOCK) && defined(CLOCK_NMEA)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the NMEA GPS Receiver with
*
#if defined(REFCLOCK) && defined(CLOCK_ONCORE) && defined(HAVE_PPSAPI) && 0
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <sys/stat.h>
#ifdef ONCORE_SHMEM_STATUS
# ifdef HAVE_SYS_MMAN_H
#endif /* ONCORE_SHMEM_STATUS */
#ifdef HAVE_PPSAPI
-# ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
+# ifdef HAVE_TIMEPPS_H
+# include <timepps.h>
# else
# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
+# include <sys/timepps.h>
# endif
# endif
#endif
# include <sys/sio.h>
#endif
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
#ifdef HAVE_SYS_TERMIOS_H
-#include <sys/termios.h>
+# include <sys/termios.h>
#endif
#ifdef HAVE_SYS_PPSCLOCK_H
#if defined(REFCLOCK) && defined(CLOCK_PCF)
-#include <time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#if defined(REFCLOCK) && defined(CLOCK_PST)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the PSTI 1010 and Traconex 1020 WWV/WWVH
* Receivers. No specific claim of accuracy is made for these receiver,
#if defined(REFCLOCK) && defined(CLOCK_SHM)
-#undef fileno
-#include <ctype.h>
-#undef fileno
-#include <sys/time.h>
-#undef fileno
-
#include "ntpd.h"
#undef fileno
#include "ntp_io.h"
#undef fileno
#include "ntp_stdlib.h"
+#undef fileno
+#include <ctype.h>
+#undef fileno
+
#ifndef SYS_WINNT
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <assert.h>
-#include <time.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
+# include <sys/ipc.h>
+# include <sys/shm.h>
+# include <assert.h>
+# include <unistd.h>
+# include <stdio.h>
#endif
/*
#if defined(REFCLOCK) && defined(CLOCK_TPRO)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "sys/tpro.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the KSI/Odetecs TPRO-S IRIG-B reader and TPRO-
* SAT GPS receiver for the Sun Microsystems SBus. It requires that the
#if defined(REFCLOCK) && defined(CLOCK_TRAK) && defined(PPS)
-#include <stdio.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
+#include <stdio.h>
+#include <ctype.h>
+
#ifdef HAVE_SYS_TERMIOS_H
# include <sys/termios.h>
#endif
#if defined(REFCLOCK) && defined(CLOCK_TRUETIME)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/* This should be an atom clock but those are very hard to build.
*
* The PCL720 from P C Labs has an Intel 8253 lookalike, as well as a bunch
#include <stdio.h>
#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
#include "ntpd.h"
#include "ntp_io.h"
#if defined(REFCLOCK) && defined(CLOCK_USNO)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
#include "ntp_control.h"
+#include <stdio.h>
+#include <ctype.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
+
/*
* This driver supports the Naval Observatory dialup at +1 202 653 0351.
* It is a hacked-up version of the ACTS driver.
#if defined(REFCLOCK) && defined(CLOCK_WWV)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <math.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
#include "audio.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <math.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
+
#define ICOM 1 /* undefine to suppress ICOM code */
#ifdef ICOM
#if defined(REFCLOCK) && defined(CLOCK_SPECTRACOM)
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <time.h>
-
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+
/*
* This driver supports the Spectracom Model 8170 and Netclock/2 WWVB
* Synchronized Clocks and the Netclock/GPS Master Clock. Both the WWVB
# include <config.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntpdate.h"
+#include "ntp_string.h"
+#include "ntp_syslog.h"
+#include "ntp_select.h"
+#include "ntp_stdlib.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
# include <sys/ioctl.h>
# endif
#endif /* SYS_WINNT */
-#include <sys/time.h>
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOURCE_H */
struct timeval timeout = {60,0};
#endif
-
-#if defined(SYS_HPUX)
-# include <utmp.h>
-#endif
-
#ifdef HAVE_NETINFO
#include <netinfo/ni.h>
#endif
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntpdate.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
#include "recvbuff.h"
#ifdef SYS_WINNT
# include <config.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#include <sys/time.h>
-
#include "ntp_fp.h"
#include "ntp.h"
#include "ntp_io.h"
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <signal.h>
+#include <ctype.h>
+
/*
* These routines are used to read the configuration file at
* startup time. An entry in the file must fit on a single line.
# include <config.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "ntp_io.h"
+#include "iosignal.h"
+#include "ntp_unixtime.h"
+#include "ntpdate.h"
+#include "ntp_string.h"
+#include "ntp_syslog.h"
+#include "ntp_select.h"
+#include "ntp_stdlib.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
# include <sys/signal.h>
# include <sys/ioctl.h>
#endif /* SYS_WINNT */
-#include <sys/time.h>
+
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOURCE_H */
# include "timers.h"
#endif
-
-#if defined(SYS_HPUX)
-# include <utmp.h>
-#endif
-
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "iosignal.h"
-#include "ntp_unixtime.h"
-#include "ntpdate.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
#include "recvbuff.h"
#ifdef SYS_WINNT
/*
* ntpdc - control and monitor your ntpd daemon
*/
+
+#include "ntpdc.h"
+#include "ntp_select.h"
+#include "ntp_io.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <netdb.h>
#ifdef SYS_WINNT
# include <readline/history.h>
#endif /* HAVE_LIBREADLINE */
-#include "ntpdc.h"
-#include "ntp_select.h"
-#include "ntp_io.h"
-#include "ntp_stdlib.h"
-
#ifdef SYS_VXWORKS
/* vxWorks needs mode flag -casey*/
#define open(name, flags) open(name, flags, 0777)
# include <config.h>
#endif
+#include "ntpdc.h"
+#include "ntp_control.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
#ifdef HAVE_SYS_TIMEX_H
# include <sys/timex.h>
#endif
#include <netinet/in.h>
#endif
-#include "ntpdc.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
#include <arpa/inet.h>
/*
/*
* ntpq - query an NTP server using mode 6 commands
*/
+
+#include "ntpq.h"
+#include "ntp_unixtime.h"
+#include "ntp_calendar.h"
+#include "ntp_io.h"
+#include "ntp_select.h"
+#include "ntp_stdlib.h"
+
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <netdb.h>
#ifdef SYS_WINNT
# include <io.h>
#define closesocket close
#endif /* SYS_WINNT */
-#include "ntpq.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#include "ntp_io.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-
#ifdef SYS_VXWORKS
/* vxWorks needs mode flag -casey*/
#define open(name, flags) open(name, flags, 0777)
/*
* ntpdc_ops.c - subroutines which are called to perform operations by ntpdc
*/
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <netdb.h>
#include "ntpq.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <netdb.h>
+
extern char * chosts[];
extern char currenthost[];
extern int numhosts;
# include <config.h>
#endif
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <sys/types.h>
-#include <sys/signal.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#if defined(SYS_HPUX)
-#include <utmp.h>
-#endif
-
#include "ntp_fp.h"
#include "ntp.h"
#include "ntp_io.h"
#include "ntp_select.h"
#include "ntp_stdlib.h"
#include "recvbuff.h"
+
+#include <stdio.h>
+#include <signal.h>
+#include <ctype.h>
+#include <netdb.h>
+#include <sys/signal.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#include <sys/resource.h>
+
/*
* only 16 stratums, so this is more than enough.
*/
* written consent of the author.
*/
+#include "ntp_stdlib.h"
+
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <termios.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-#include "ntp_stdlib.h"
/*
* state flags
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
-#include <sys/time.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "ntp_types.h"
+#include <stdio.h>
+#include <stdlib.h>
+
#define NBUF 100001 /* size of basic histogram */
#define NSRT 20000 /* size of overflow histogram */
#define NCNT (600 * 1000000) /* sample interval (us) */
* analysis. From this you can determine the jitter and if the clock ever
* runs backwards.
*/
-#include <sys/time.h>
+
#include <stdio.h>
+#include <sys/time.h>
#define NBUF 20002
* actual code segments from modified kernel distributions for SunOS,
* Ultrix and OSF/1 kernels. These segments do not use any licensed code.
*/
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include <config.h>
#endif
+#include "ntpd.h"
+#include "ntp_stdlib.h"
+#include "ntp_string.h"
+#include "ntp_filegen.h"
+#include "ntp_unixtime.h"
+#include "ntp_config.h"
+
#include <stdio.h>
-#include <sys/types.h>
#include <unistd.h>
#include <limits.h> /* PATH_MAX */
-#include <sys/stat.h> /* for umask() and stat() */
-#include <sys/time.h>
+#include <sys/stat.h>
#ifdef HAVE_NETINFO
#include <netinfo/ni.h>
#endif
-#include "ntpd.h"
-#include "ntp_stdlib.h"
-#include "ntp_string.h"
-#include "ntp_filegen.h"
-#include "ntp_unixtime.h"
-#include "ntp_config.h"
-
#ifdef PUBKEY
# include "ntp_crypto.h"
#endif
* For more information, see the README.kern file in the doc directory
* of the xntp3 distribution.
*/
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <signal.h>
-#include <setjmp.h>
-
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_syscall.h"
#include "ntp_stdlib.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+#include <setjmp.h>
+
#ifdef NTP_SYSCALLS_STD
# ifndef SYS_DECOSF1
# define BADCALL -1 /* this is supposed to be a bad syscall */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <stdio.h>
#include "ntp_unixtime.h"
+#include <stdio.h>
+
#define DEFAULT_SYS_PRECISION -99
int default_get_resolution();
# include <config.h>
#endif
+#include "ntp_types.h"
+#include "l_stdlib.h"
+
#include <stdio.h>
-#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
-#include "ntp_types.h"
-#include "l_stdlib.h"
-
#ifdef HAVE___ADJTIMEX /* Linux */
#include <sys/timex.h>
#ifdef NLIST_STRUCT
# include <nlist.h>
#else /* not NLIST_STRUCT */ /* was defined(SYS_AUX3) || defined(SYS_AUX2) */
-# include <sys/time.h>
# include <sys/resource.h>
# include <sys/file.h>
# include <a.out.h>