diff options
author | Ted Lemon <source@isc.org> | 2001-02-26 22:21:15 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2001-02-26 22:21:15 +0000 |
commit | c466184540e5bfa0a26e9871e83c33e0e9e9eab1 (patch) | |
tree | 7471a221fc367f22ca3e99cdf1ea686340c22dbc | |
parent | a1ec58f60800a5a644961601f5093161aabb6057 (diff) | |
download | isc-dhcp-c466184540e5bfa0a26e9871e83c33e0e9e9eab1.tar.gz |
Fix up NetBSD/alpha build.
-rw-r--r-- | Makefile.conf | 13 | ||||
-rw-r--r-- | client/clparse.c | 6 | ||||
-rw-r--r-- | client/dhclient.c | 8 | ||||
-rw-r--r-- | common/bpf.c | 6 | ||||
-rw-r--r-- | common/comapi.c | 4 | ||||
-rw-r--r-- | common/ctrace.c | 4 | ||||
-rw-r--r-- | common/icmp.c | 4 | ||||
-rw-r--r-- | common/packet.c | 6 | ||||
-rw-r--r-- | common/tree.c | 4 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | omapip/trace.c | 12 | ||||
-rw-r--r-- | relay/dhcrelay.c | 6 | ||||
-rw-r--r-- | server/omapi.c | 4 |
13 files changed, 41 insertions, 39 deletions
diff --git a/Makefile.conf b/Makefile.conf index b67c788c..06bd1175 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -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-- diff --git a/client/clparse.c b/client/clparse.c index cc0c6e73..8f54209c 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -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) { diff --git a/client/dhclient.c b/client/dhclient.c index 4898da07..0f992375 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -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, diff --git a/common/bpf.c b/common/bpf.c index 3a65ffa3..c7809f25 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -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; diff --git a/common/comapi.c b/common/comapi.c index 405769ba..1e5e98a1 100644 --- a/common/comapi.c +++ b/common/comapi.c @@ -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; diff --git a/common/ctrace.c b/common/ctrace.c index 60988a64..bea933cb 100644 --- a/common/ctrace.c +++ b/common/ctrace.c @@ -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; diff --git a/common/icmp.c b/common/icmp.c index a5811c5d..d1376f7a 100644 --- a/common/icmp.c +++ b/common/icmp.c @@ -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; diff --git a/common/packet.c b/common/packet.c index a34aae19..cafe26e3 100644 --- a/common/packet.c +++ b/common/packet.c @@ -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; } } diff --git a/common/tree.c b/common/tree.c index 25b2abe2..f0464fe0 100644 --- a/common/tree.c +++ b/common/tree.c @@ -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) diff --git a/omapip/trace.c b/omapip/trace.c index 8cfd49be..2891b556 100644 --- a/omapip/trace.c +++ b/omapip/trace.c @@ -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); diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index b07874e3..daadec68 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -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; diff --git a/server/omapi.c b/server/omapi.c index 30884447..6fe0fc98 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -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; |