##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 \
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF)
#SCRIPT=netbsd
-##--netbsd-arm32--
+##--netbsd-nocast--
## Ultrix
##--ultrix--
#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"
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;
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) {
#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"
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,
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,
#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"
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;
#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"
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;
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;
#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"
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;
#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"
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;
}
}
#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"
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;
NetBSD)
hw=`uname -m`
case $hw in
- arm32) sysname=netbsd-arm32;;
+ arm32) sysname=netbsd-nocast;;
+ alpha) sysname=netbsd-nocast;;
*) sysname=netbsd;;
esac;;
OpenBSD)
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;
}
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 ();
}
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);
#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"
/* 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;
#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"
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;