Mon Mar 25 01:11:03 2013 UTC ()
Undo horrid configure hack, use compiler define.


(christos)
diff -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/common/icmp.c
diff -r1.2 -r1.3 src/external/bsd/dhcp/include/config.h

cvs diff -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/common/Attic/icmp.c (expand / switch to unified diff)

--- src/external/bsd/dhcp/dist/common/Attic/icmp.c 2013/03/24 15:45:53 1.1.1.1
+++ src/external/bsd/dhcp/dist/common/Attic/icmp.c 2013/03/25 01:11:02 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: icmp.c,v 1.1.1.1 2013/03/24 15:45:53 christos Exp $ */ 1/* $NetBSD: icmp.c,v 1.2 2013/03/25 01:11:02 christos Exp $ */
2 2
3/* dhcp.c 3/* dhcp.c
4 4
5 ICMP Protocol engine - for sending out pings and receiving 5 ICMP Protocol engine - for sending out pings and receiving
6 responses. */ 6 responses. */
7 7
8/* 8/*
9 * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC") 9 * Copyright (c) 2011 by Internet Systems Consortium, Inc. ("ISC")
10 * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC") 10 * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
11 * Copyright (c) 1996-2003 by Internet Software Consortium 11 * Copyright (c) 1996-2003 by Internet Software Consortium
12 * 12 *
13 * Permission to use, copy, modify, and distribute this software for any 13 * Permission to use, copy, modify, and distribute this software for any
14 * purpose with or without fee is hereby granted, provided that the above 14 * purpose with or without fee is hereby granted, provided that the above
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
27 * Redwood City, CA 94063 27 * Redwood City, CA 94063
28 * <info@isc.org> 28 * <info@isc.org>
29 * https://www.isc.org/ 29 * https://www.isc.org/
30 * 30 *
31 * This software has been written for Internet Systems Consortium 31 * This software has been written for Internet Systems Consortium
32 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. 32 * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
33 * To learn more about Internet Systems Consortium, see 33 * To learn more about Internet Systems Consortium, see
34 * ``https://www.isc.org/''. To learn more about Vixie Enterprises, 34 * ``https://www.isc.org/''. To learn more about Vixie Enterprises,
35 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see 35 * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
36 * ``http://www.nominum.com''. 36 * ``http://www.nominum.com''.
37 */ 37 */
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40__RCSID("$NetBSD: icmp.c,v 1.1.1.1 2013/03/24 15:45:53 christos Exp $"); 40__RCSID("$NetBSD: icmp.c,v 1.2 2013/03/25 01:11:02 christos Exp $");
41 41
42#include "dhcpd.h" 42#include "dhcpd.h"
43#include "netinet/ip.h" 43#include "netinet/ip.h"
44#include "netinet/ip_icmp.h" 44#include "netinet/ip_icmp.h"
45 45
46struct icmp_state *icmp_state; 46struct icmp_state *icmp_state;
47static omapi_object_type_t *dhcp_type_icmp; 47static omapi_object_type_t *dhcp_type_icmp;
48static int no_icmp; 48static int no_icmp;
49 49
50OMAPI_OBJECT_ALLOC (icmp_state, struct icmp_state, dhcp_type_icmp) 50OMAPI_OBJECT_ALLOC (icmp_state, struct icmp_state, dhcp_type_icmp)
51 51
52#if defined (TRACING) 52#if defined (TRACING)
53trace_type_t *trace_icmp_input; 53trace_type_t *trace_icmp_input;
@@ -154,27 +154,27 @@ int icmp_echorequest (addr) @@ -154,27 +154,27 @@ int icmp_echorequest (addr)
154 154
155 memset (&to, 0, sizeof(to)); 155 memset (&to, 0, sizeof(to));
156#ifdef HAVE_SA_LEN 156#ifdef HAVE_SA_LEN
157 to.sin_len = sizeof to; 157 to.sin_len = sizeof to;
158#endif 158#endif
159 to.sin_family = AF_INET; 159 to.sin_family = AF_INET;
160 to.sin_port = 0; /* unused. */ 160 to.sin_port = 0; /* unused. */
161 memcpy (&to.sin_addr, addr -> iabuf, sizeof to.sin_addr); /* XXX */ 161 memcpy (&to.sin_addr, addr -> iabuf, sizeof to.sin_addr); /* XXX */
162 162
163 icmp.icmp_type = ICMP_ECHO; 163 icmp.icmp_type = ICMP_ECHO;
164 icmp.icmp_code = 0; 164 icmp.icmp_code = 0;
165 icmp.icmp_cksum = 0; 165 icmp.icmp_cksum = 0;
166 icmp.icmp_seq = 0; 166 icmp.icmp_seq = 0;
167#if SIZEOF_STRUCT_IADDR_P == 8 167#ifdef _LP64
168 icmp.icmp_id = (((u_int32_t)(u_int64_t)addr) ^ 168 icmp.icmp_id = (((u_int32_t)(u_int64_t)addr) ^
169 (u_int32_t)(((u_int64_t)addr) >> 32)); 169 (u_int32_t)(((u_int64_t)addr) >> 32));
170#else 170#else
171 icmp.icmp_id = (u_int32_t)addr; 171 icmp.icmp_id = (u_int32_t)addr;
172#endif 172#endif
173 memset (&icmp.icmp_dun, 0, sizeof icmp.icmp_dun); 173 memset (&icmp.icmp_dun, 0, sizeof icmp.icmp_dun);
174 174
175 icmp.icmp_cksum = wrapsum (checksum ((unsigned char *)&icmp, 175 icmp.icmp_cksum = wrapsum (checksum ((unsigned char *)&icmp,
176 sizeof icmp, 0)); 176 sizeof icmp, 0));
177 177
178#if defined (TRACING) 178#if defined (TRACING)
179 if (trace_playback ()) { 179 if (trace_playback ()) {
180 char *buf = (char *)0; 180 char *buf = (char *)0;

cvs diff -r1.2 -r1.3 src/external/bsd/dhcp/include/Attic/config.h (expand / switch to unified diff)

--- src/external/bsd/dhcp/include/Attic/config.h 2013/03/24 23:03:07 1.2
+++ src/external/bsd/dhcp/include/Attic/config.h 2013/03/25 01:11:03 1.3
@@ -126,27 +126,27 @@ @@ -126,27 +126,27 @@
126/* Define to the one symbol short name of this package. */ 126/* Define to the one symbol short name of this package. */
127#define PACKAGE_TARNAME "dhcp" 127#define PACKAGE_TARNAME "dhcp"
128 128
129/* Define to the version of this package. */ 129/* Define to the version of this package. */
130#define PACKAGE_VERSION "4.2.5" 130#define PACKAGE_VERSION "4.2.5"
131 131
132/* Define to any value to include Ari's PARANOIA patch. */ 132/* Define to any value to include Ari's PARANOIA patch. */
133/* #undef PARANOIA */ 133/* #undef PARANOIA */
134 134
135/* Define to correct bad byteorders in secs field. */ 135/* Define to correct bad byteorders in secs field. */
136/* #undef SECS_BYTEORDER */ 136/* #undef SECS_BYTEORDER */
137 137
138/* The size of `struct iaddr *', as computed by sizeof. */ 138/* The size of `struct iaddr *', as computed by sizeof. */
139#define SIZEOF_STRUCT_IADDR_P 8 139/* #undef SIZEOF_STRUCT_IADDR_P */
140 140
141/* Define to 1 if you have the ANSI C header files. */ 141/* Define to 1 if you have the ANSI C header files. */
142#define STDC_HEADERS 1 142#define STDC_HEADERS 1
143 143
144/* Define to include server activity tracing support. */ 144/* Define to include server activity tracing support. */
145#define TRACING 1 145#define TRACING 1
146 146
147/* Define to 1 to use the standard BSD socket API. */ 147/* Define to 1 to use the standard BSD socket API. */
148/* #undef USE_SOCKETS */ 148/* #undef USE_SOCKETS */
149 149
150/* Define to 1 to enable IPv4 packet info support. */ 150/* Define to 1 to enable IPv4 packet info support. */
151/* #undef USE_V4_PKTINFO */ 151/* #undef USE_V4_PKTINFO */
152 152