Commit c4661845 authored by Ted Lemon's avatar Ted Lemon
Browse files

Fix up NetBSD/alpha build.

parent a1ec58f6
......@@ -209,11 +209,12 @@ MINORVERSION=MinorVersion
##MKDEP=makedepend
##--netbsd--
## NetBSD Arm32
## The arm32 gcc currently has a bug in the conversion warning code. :'(
## Don't consider this to be true when you read this - it's probably
## not permanent...
##--netbsd-arm32--
## NetBSD nocast
## Some versions of the arm32 gcc have a problem in cast conversions.
## The Alpha definitely has a problem - if you pass '6' where a size_t
## is expected, you get a warning. So on these architectures, we do
## not ask for that sort of warning.
##--netbsd-nocast--
#CF = cf/netbsd.h
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
# -Wno-uninitialized -Werror \
......@@ -222,7 +223,7 @@ MINORVERSION=MinorVersion
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF)
#SCRIPT=netbsd
##--netbsd-arm32--
##--netbsd-nocast--
## Ultrix
##--ultrix--
......
......@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: clparse.c,v 1.55 2001/02/12 19:37:03 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: clparse.c,v 1.56 2001/02/26 22:21:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -576,7 +576,7 @@ void parse_option_list (cfile, list)
r = new_pair (MDL);
if (!r)
log_fatal ("can't allocate pair for option code.");
r -> car = (caddr_t)i;
r -> car = (caddr_t)(long)i;
r -> cdr = (pair)0;
if (p)
q -> cdr = r;
......@@ -601,7 +601,7 @@ void parse_option_list (cfile, list)
else {
ix = 0;
for (q = p; q; q = q -> cdr)
(*list) [ix++] = (u_int32_t)q -> car;
(*list) [ix++] = (u_int32_t)(long)q -> car;
(*list) [ix] = 0;
}
while (p) {
......
......@@ -41,7 +41,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhclient.c,v 1.121 2001/02/15 22:17:05 neild Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
"$Id: dhclient.c,v 1.122 2001/02/26 22:21:04 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -201,8 +201,8 @@ int main (argc, argv, envp)
log_fatal ("Can't record interface %s:%s",
argv [i], isc_result_totext (status));
if (strlen (argv [i]) > sizeof tmp -> name)
log_fatal ("%s: interface name too long (max %d)",
argv [i], strlen (argv [i]));
log_fatal ("%s: interface name too long (max %ld)",
argv [i], (long)strlen (argv [i]));
strcpy (tmp -> name, argv [i]);
if (interfaces) {
interface_reference (&tmp -> next,
......@@ -1352,7 +1352,7 @@ void send_discover (cpp)
log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
client -> name ? client -> name : client -> interface -> name,
inet_ntoa (sockaddr_broadcast.sin_addr),
ntohs (sockaddr_broadcast.sin_port), client -> interval);
ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval));
/* Send out a packet. */
result = send_packet (client -> interface, (struct packet *)0,
......
......@@ -47,7 +47,7 @@
#ifndef lint
static char copyright[] =
"$Id: bpf.c,v 1.45 2000/12/28 23:13:07 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: bpf.c,v 1.46 2001/02/26 22:21:05 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -282,8 +282,8 @@ void if_register_receive (info)
log_fatal ("Can't get bpf buffer length: %m");
info -> rbuf = dmalloc (info -> rbuf_max, MDL);
if (!info -> rbuf)
log_fatal ("Can't allocate %d bytes for bpf input buffer.",
info -> rbuf_max);
log_fatal ("Can't allocate %ld bytes for bpf input buffer.",
(long)(info -> rbuf_max));
info -> rbuf_offset = 0;
info -> rbuf_len = 0;
......
......@@ -50,7 +50,7 @@
#ifndef lint
static char copyright[] =
"$Id: comapi.c,v 1.7 2000/12/28 23:14:05 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: comapi.c,v 1.8 2001/02/26 22:21:06 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -267,7 +267,7 @@ isc_result_t dhcp_group_signal_handler (omapi_object_t *h,
if (!group -> name) {
char hnbuf [64];
sprintf (hnbuf, "ng%08lx%08lx",
cur_time, (unsigned long)group);
(unsigned long)cur_time, (unsigned long)group);
group -> name = dmalloc (strlen (hnbuf) + 1, MDL);
if (!group -> name)
return ISC_R_NOMEMORY;
......
......@@ -68,8 +68,8 @@ void trace_interface_input (trace_type_t *ttype, unsigned len, char *buf)
isc_result_t status;
if (len != sizeof *tipkt) {
log_error ("trace interface packet size mismatch: %d != %d",
sizeof *tipkt, len);
log_error ("trace interface packet size mismatch: %ld != %d",
(long)(sizeof *tipkt), len);
return;
}
tipkt = (trace_interface_packet_t *)buf;
......
......@@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
"$Id: icmp.c,v 1.27 2001/02/17 21:34:50 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: icmp.c,v 1.28 2001/02/26 22:21:08 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -311,7 +311,7 @@ void trace_icmp_output_input (trace_type_t *ttype, unsigned length, char *buf)
if (length != (sizeof (*icmp) + (sizeof *ia))) {
log_error ("trace_icmp_output_input: data size mismatch %d:%d",
length, (sizeof (*icmp) + (sizeof *ia)));
length, (int)((sizeof (*icmp)) + (sizeof *ia)));
return;
}
ia = (struct iaddr *)buf;
......
......@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: packet.c,v 1.39 2000/10/15 18:54:29 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: packet.c,v 1.40 2001/02/26 22:21:10 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -305,8 +305,8 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
if (len + data < buf + bufix + buflen)
log_debug ("accepting packet with data after udp payload.");
if (len + data > buf + bufix + buflen) {
log_debug ("dropping packet with bogus uh_ulen %d",
len + sizeof *udp);
log_debug ("dropping packet with bogus uh_ulen %ld",
(long)(len + sizeof *udp));
return -1;
}
}
......
......@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: tree.c,v 1.98 2001/01/25 08:24:33 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: tree.c,v 1.99 2001/02/26 22:21:11 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -2220,7 +2220,7 @@ int evaluate_numeric_expression (result, packet, lease, client_state,
if (lease -> ends < cur_time) {
log_error ("%s %lu when it is now %lu",
"data: lease_time: lease ends at",
lease -> ends, cur_time);
(long)(lease -> ends), (long)cur_time);
return 0;
}
*result = lease -> ends - cur_time;
......
......@@ -83,7 +83,8 @@ if [ "$sysname" = "" ]; then
NetBSD)
hw=`uname -m`
case $hw in
arm32) sysname=netbsd-arm32;;
arm32) sysname=netbsd-nocast;;
alpha) sysname=netbsd-nocast;;
*) sysname=netbsd;;
esac;;
OpenBSD)
......
......@@ -130,8 +130,8 @@ isc_result_t trace_begin (const char *filename,
log_error ("%s(%d): trace_begin write failed: %m", file, line);
return ISC_R_UNEXPECTED;
} else if (status != sizeof tfh) {
log_error ("%s(%d): trace_begin: short write (%d:%d)",
file, line, status, sizeof tfh);
log_error ("%s(%d): trace_begin: short write (%d:%ld)",
file, line, status, (long)(sizeof tfh));
trace_stop ();
return ISC_R_UNEXPECTED;
}
......@@ -207,8 +207,8 @@ isc_result_t trace_write_packet_iov (trace_type_t *ttype,
file, line);
return ISC_R_UNEXPECTED;
} else if (status != sizeof tmp) {
log_error ("%s(%d): trace_write_packet: short write (%d:%d)",
file, line, status, sizeof tmp);
log_error ("%s(%d): trace_write_packet: short write (%d:%ld)",
file, line, status, (long)(sizeof tmp));
trace_stop ();
}
......@@ -408,8 +408,8 @@ void trace_file_replay (const char *filename)
if (ferror (traceinfile))
log_error ("Error reading trace file header: %m");
else
log_error ("Short read on trace file header: %d %d.",
status, sizeof tracefile_header);
log_error ("Short read on trace file header: %d %ld.",
status, (long)(sizeof tracefile_header));
goto out;
}
tracefile_header.magic = ntohl (tracefile_header.magic);
......
......@@ -43,7 +43,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhcrelay.c,v 1.49 2001/02/12 20:50:31 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n";
"$Id: dhcrelay.c,v 1.50 2001/02/26 22:21:14 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -819,8 +819,8 @@ int add_relay_agent_options (ip, packet, length, giaddr)
/* Relay option's total length shouldn't ever get to be more than
257 bytes. */
if (sp - op > 257)
log_fatal ("total agent option length exceeds 257 (%d) on %s\n",
sp - op, ip -> name);
log_fatal ("total agent option length exceeds 257 (%ld) on %s\n",
(long)(sp - op), ip -> name);
/* Calculate length of RAI option. */
op [1] = sp - op - 2;
......
......@@ -50,7 +50,7 @@
#ifndef lint
static char copyright[] =
"$Id: omapi.c,v 1.42 2001/02/12 21:10:10 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: omapi.c,v 1.43 2001/02/26 22:21:15 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
......@@ -1004,7 +1004,7 @@ isc_result_t dhcp_host_signal_handler (omapi_object_t *h,
if (!host -> name) {
char hnbuf [64];
sprintf (hnbuf, "nh%08lx%08lx",
cur_time, (unsigned long)host);
(unsigned long)cur_time, (unsigned long)host);
host -> name = dmalloc (strlen (hnbuf) + 1, MDL);
if (!host -> name)
return ISC_R_NOMEMORY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment