+* [Bug 1355] ntp-dev won't compile on OpenBSD 4.6.
(4.2.5p236-RC) 2009/10/22 Released by Harlan Stenn <stenn@ntp.org>
* Cleanup from Dave Mills.
* [Bug 1343] ntpd/ntp_io.c close_fd() does not compile on Solaris 7.
ieee754io.h \
iosignal.h \
l_stdlib.h \
+ lib_strbuf.h \
mbg_gps166.h \
mx4200.h \
ntif.h \
#endif
#include <stdarg.h>
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
/* Needed for speed_t. */
#ifdef HAVE_TERMIOS_H
# include <config.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#define NTP_NET_H
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include "ntp_rfc2553.h"
#define NTP_STDLIB_H
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
#include "l_stdlib.h"
#include "ntp_rfc2553.h"
* as int and u_int.
* For 32 bit systems, define them as long and u_long
*/
+#ifndef NTP_TYPES_H
+#define NTP_TYPES_H
+
#include <sys/types.h>
#include "ntp_machine.h"
-#ifndef _NTP_TYPES_
-#define _NTP_TYPES_
-
/*
* This is another naming conflict.
* On NetBSD for MAC the macro "mac" is defined as 1
#endif
-#endif /* _NTP_TYPES_ */
-
+#endif /* NTP_TYPES_H */
*
* The header file for the ntp discrete event simulator.
*
- * Written By: Sachin Kamboj
- * University of Delaware
- * Newark, DE 19711
+ * Written By: Sachin Kamboj
+ * University of Delaware
+ * Newark, DE 19711
* Copyright (c) 2006
*/
-#ifndef __NTPSIM_H__
-#define __NTPSIM_H__
+#ifndef NTPSIM_H
+#define NTPSIM_H
#include <stdio.h>
#include <math.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
#include <arpa/inet.h>
#include "ntp_syslog.h"
#include "ntp_fp.h"
#include "ntp_io.h"
#include "ntp_stdlib.h"
-/* #include "config.tab.h"*/ /* Bison generated header file for flex */
#include "ntp_data_structures.h"
/* CONSTANTS */
int yyparse (void);
void create_server_associations (void);
-#endif
+#endif /* NTPSIM_H */
-I$(top_srcdir)/lib/isc/unix/include
ETAGS_ARGS = Makefile.am
-noinst_HEADERS = lib_strbuf.h
-
../include/des.h:
touch ../include/des.h
/*
* decodenetnum - return a net number (this is crude, but careful)
*/
+#include <config.h>
#include <sys/types.h>
#include <ctype.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include "ntp_stdlib.h"
#include "ntp_assert.h"
/*
* inttoa - return an asciized signed integer
*/
+#include <config.h>
#include <stdio.h>
#include "lib_strbuf.h"
char *
inttoa(
- long ival
+ long val
)
{
register char *buf;
LIB_GETBUF(buf);
+ snprintf(buf, sizeof(buf), "%ld", val);
- (void) sprintf(buf, "%ld", (long)ival);
return buf;
}
# include <config.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#endif /* LIBC_SCCS and not lint */
#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
/*
* numtoa - return asciized network numbers store in local array space
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-#if HAVE_NETINET_IN_H
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> /* ntohl */
#endif
/*
* numtohost - convert network number to host name.
*/
-
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-#if HAVE_NETINET_IN_H
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> /* ntohl */
#endif
#endif
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <arpa/inet.h>
* socktoa - return a numeric host name from a sockaddr_storage structure
*/
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <arpa/inet.h>
#include <ntp_stdlib.h>
#include <ntp_config.h>
-#include "../libntp/lib_strbuf.h"
+#include <lib_strbuf.h>
#include "ntp_scanner.h"
#include "ntp_parser.h"
#include <signal.h>
#include <sys/stat.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <arpa/inet.h>
/*
#include <signal.h>
/**/
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <arpa/inet.h>
/**/
#ifdef HAVE_SYS_PARAM_H
#include <stdio.h>
#include <stddef.h>
#include <signal.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <arpa/inet.h>
#include "recvbuff.h"
# include <sys/timex.h>
#endif
#if !defined(__bsdi__) && !defined(apollo)
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
+#endif
#include <arpa/inet.h>
struct info_clock *cl;
/* 8 is the maximum number of clocks which will fit in a packet */
u_long clist[min(MAXARGS, 8)];
+ int qitemc;
int qitems;
int items;
int itemsize;
l_fp ts;
struct clktype *clk;
- for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++)
+ qitemc = min(pcmd->nargs, COUNTOF(clist));
+
+ for (qitems = 0; qitems < qitemc; qitems++)
clist[qitems] = NSRCADR(&pcmd->argval[qitems].netnum);
again:
}
if (res != 0)
- return;
+ return;
if (!checkitems(items, fp))
- return;
+ return;
if (!checkitemsize(itemsize, sizeof(struct info_clock)))
- return;
+ return;
while (items-- > 0) {
(void) fprintf(fp, "clock address: %s\n",
+++ /dev/null
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
+++ /dev/null
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
+++ /dev/null
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
+++ /dev/null
-/**************************************************************
- * Dummy Header for Unix to Windows NT portability
- * Created for NTP package
- **************************************************************/
# End Source File
# Begin Source File
-SOURCE=..\..\..\libntp\lib_strbuf.h
+SOURCE=..\..\..\include\lib_strbuf.h
# End Source File
# Begin Source File
RelativePath="..\..\..\include\l_stdlib.h">
</File>
<File
- RelativePath="..\..\..\libntp\lib_strbuf.h">
+ RelativePath="..\..\..\include\lib_strbuf.h">
</File>
<File
RelativePath="..\..\..\lib\isc\include\isc\log.h">
>
</File>
<File
- RelativePath="..\..\..\libntp\lib_strbuf.h"
+ RelativePath="..\..\..\include\lib_strbuf.h"
>
</File>
<File
>
</File>
<File
- RelativePath="..\..\..\..\libntp\lib_strbuf.h"
+ RelativePath="..\..\..\..\include\lib_strbuf.h"
>
</File>
<File
#include <unistd.h>
#include <sys/stat.h>
#include <sys/time.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#include "ntp_types.h"
#include "ntp_random.h"
#include "l_stdlib.h"
#include "ntp-keygen-opts.h"
-#ifdef SYS_WINNT
-extern int ntp_getopt (int, char **, const char *);
-#define getopt ntp_getopt
-#define optarg ntp_optarg
-#endif /* SYS_WINNT */
-
#ifdef OPENSSL
#include "openssl/bn.h"
#include "openssl/evp.h"