Sat Sep 29 06:17:30 2012 UTC ()
Restore patches to configure script lost in an update some time back.
Does not fix the build, but advances it; now it's having some kind
of bizarre problem with <sys/queue.h>.

While here, add three small patches to silence a large pile of const
warnings that made it impossible to see anything else that was going
on.


(dholland)
diff -r1.16 -r1.17 pkgsrc/net/ns/distinfo
diff -r1.9 -r1.10 pkgsrc/net/ns/patches/patch-af
diff -r0 -r1.1 pkgsrc/net/ns/patches/patch-common_packet.cc
diff -r0 -r1.1 pkgsrc/net/ns/patches/patch-common_packet.h
diff -r0 -r1.1 pkgsrc/net/ns/patches/patch-common_ptypes2tcl.cc

cvs diff -r1.16 -r1.17 pkgsrc/net/ns/distinfo (expand / switch to unified diff)

--- pkgsrc/net/ns/distinfo 2012/03/10 22:05:03 1.16
+++ pkgsrc/net/ns/distinfo 2012/09/29 06:17:29 1.17
@@ -1,23 +1,26 @@ @@ -1,23 +1,26 @@
1$NetBSD: distinfo,v 1.16 2012/03/10 22:05:03 markd Exp $ 1$NetBSD: distinfo,v 1.17 2012/09/29 06:17:29 dholland Exp $
2 2
3SHA1 (ns-2.33.tar.gz) = 0efd6aed45b504fcf3f125b0be00a60b87516a03 3SHA1 (ns-2.33.tar.gz) = 0efd6aed45b504fcf3f125b0be00a60b87516a03
4RMD160 (ns-2.33.tar.gz) = 54326b8ff4e63c0a9712c517c7ad4d9327a41d39 4RMD160 (ns-2.33.tar.gz) = 54326b8ff4e63c0a9712c517c7ad4d9327a41d39
5Size (ns-2.33.tar.gz) = 41649114 bytes 5Size (ns-2.33.tar.gz) = 41649114 bytes
6SHA1 (patch-aa) = 3b25eab34d7bdad7d370cea8450eb3c09c18c640 6SHA1 (patch-aa) = 3b25eab34d7bdad7d370cea8450eb3c09c18c640
7SHA1 (patch-ab) = 7c93e4540faa1b16a9e40bd063ffce510f5bc063 7SHA1 (patch-ab) = 7c93e4540faa1b16a9e40bd063ffce510f5bc063
8SHA1 (patch-ad) = 5f35152de976c2195dcff20abbe8610321dd9969 8SHA1 (patch-ad) = 5f35152de976c2195dcff20abbe8610321dd9969
9SHA1 (patch-ae) = c971d28448ae1b495119e3ec2c8de185468b9be2 9SHA1 (patch-ae) = c971d28448ae1b495119e3ec2c8de185468b9be2
10SHA1 (patch-af) = 3fece1ae7ec5ad01429224ec83a3b4df4f3083c8 10SHA1 (patch-af) = da5772371dd4d754fa8aeb904bdcf29c41552276
11SHA1 (patch-ah) = 51c36d73309d135f89f7d2362835052b304b88bd 11SHA1 (patch-ah) = 51c36d73309d135f89f7d2362835052b304b88bd
12SHA1 (patch-ai) = b75f36f986ca7c833769de09e6e79f6b87c5564a 12SHA1 (patch-ai) = b75f36f986ca7c833769de09e6e79f6b87c5564a
13SHA1 (patch-aj) = 533fa4f1bd1f8bf83882ed5ed2717511283d5ddc 13SHA1 (patch-aj) = 533fa4f1bd1f8bf83882ed5ed2717511283d5ddc
14SHA1 (patch-ak) = ea478696cdddc44ba7a76d1f31d4a6a97a88aaef 14SHA1 (patch-ak) = ea478696cdddc44ba7a76d1f31d4a6a97a88aaef
15SHA1 (patch-al) = 628733a1e9ccf34c677711666e833c1ede27b5b1 15SHA1 (patch-al) = 628733a1e9ccf34c677711666e833c1ede27b5b1
16SHA1 (patch-am) = 882ea61b7f6909336f72f637b041f373830197e8 16SHA1 (patch-am) = 882ea61b7f6909336f72f637b041f373830197e8
17SHA1 (patch-an) = c6dd6b93332a6c6dd169975836df9ef802bfc206 17SHA1 (patch-an) = c6dd6b93332a6c6dd169975836df9ef802bfc206
18SHA1 (patch-ao) = 2a1fd71686ff206fe2212605f91b8167b998d6e2 18SHA1 (patch-ao) = 2a1fd71686ff206fe2212605f91b8167b998d6e2
19SHA1 (patch-ap) = f130c112d7dfe114e637e190750d9caad55e4703 19SHA1 (patch-ap) = f130c112d7dfe114e637e190750d9caad55e4703
20SHA1 (patch-aq) = c46339a81f3f0dea9754f733d567c3c93f7dc19e 20SHA1 (patch-aq) = c46339a81f3f0dea9754f733d567c3c93f7dc19e
21SHA1 (patch-ar) = 64dafe254cfd28723422047aecb8086028d9f69e 21SHA1 (patch-ar) = 64dafe254cfd28723422047aecb8086028d9f69e
22SHA1 (patch-as) = 5fdd4418db3ee4b189913f1110fb260af710f746 22SHA1 (patch-as) = 5fdd4418db3ee4b189913f1110fb260af710f746
 23SHA1 (patch-common_packet.cc) = 74835d281febc195c5d1118bc5ceb40107597876
 24SHA1 (patch-common_packet.h) = 2b8289ee47206f7201ea225d23318202c7b370c5
 25SHA1 (patch-common_ptypes2tcl.cc) = 2354e030fef92d28c2c4049be30dcb365302068a
23SHA1 (patch-mac_mac-802_11Exr.cc) = 93e4112025b6e610e76694c6067723f77cd75b84 26SHA1 (patch-mac_mac-802_11Exr.cc) = 93e4112025b6e610e76694c6067723f77cd75b84

cvs diff -r1.9 -r1.10 pkgsrc/net/ns/patches/patch-af (expand / switch to unified diff)

--- pkgsrc/net/ns/patches/patch-af 2011/01/25 22:22:14 1.9
+++ pkgsrc/net/ns/patches/patch-af 2012/09/29 06:17:30 1.10
@@ -1,16 +1,19 @@ @@ -1,16 +1,19 @@
1$NetBSD: patch-af,v 1.9 2011/01/25 22:22:14 shattered Exp $ 1$NetBSD: patch-af,v 1.10 2012/09/29 06:17:30 dholland Exp $
2 2
3--- configure.orig 2008-03-31 19:00:25.000000000 -0700 3- provide pkgsrc's X11 dirs
 4- check for more ethernet headers
 5
 6--- configure.orig 2008-04-01 02:00:25.000000000 +0000
4+++ configure 7+++ configure
5@@ -5836,7 +5836,7 @@ powerpc-apple-darwin*) 8@@ -5836,7 +5836,7 @@ powerpc-apple-darwin*)
6 esac 9 esac
7  10
8  11
9-xlibdirs="\ 12-xlibdirs="\
10+xlibdirs="${X11LIBDIR} \ 13+xlibdirs="${X11LIBDIR} \
11 /usr/openwin/lib \ 14 /usr/openwin/lib \
12 /usr/X11R6/lib \ 15 /usr/X11R6/lib \
13 /usr/lib/X11R6 \ 16 /usr/lib/X11R6 \
14@@ -5851,7 +5851,7 @@ xlibdirs="\ 17@@ -5851,7 +5851,7 @@ xlibdirs="\
15 /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib \ 18 /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib \
16 /import/X11R4/usr/lib" 19 /import/X11R4/usr/lib"
@@ -19,13 +22,63 @@ $NetBSD: patch-af,v 1.9 2011/01/25 22:22 @@ -19,13 +22,63 @@ $NetBSD: patch-af,v 1.9 2011/01/25 22:22
19+xincdirs="${X11INCDIR} \ 22+xincdirs="${X11INCDIR} \
20 /usr/openwin/include \ 23 /usr/openwin/include \
21 /usr/X11R6/include \ 24 /usr/X11R6/include \
22 /usr/include/X11R6 \ 25 /usr/include/X11R6 \
23@@ -6906,7 +6906,7 @@ fi 26@@ -6906,7 +6906,7 @@ fi
24  27
25  28
26  29
27-for ac_header in arpa/inet.h fenv.h netinet/in.h string.h strings.h time.h unistd.h net/ethernet.h 30-for ac_header in arpa/inet.h fenv.h netinet/in.h string.h strings.h time.h unistd.h net/ethernet.h
28+for ac_header in arpa/inet.h fenv.h netinet/in.h string.h strings.h time.h unistd.h net/if.h net/ethernet.h netinet/if_ether.h sys/socket.h 31+for ac_header in arpa/inet.h fenv.h netinet/in.h string.h strings.h time.h unistd.h net/if.h net/ethernet.h netinet/if_ether.h sys/socket.h
29 do 32 do
30 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 33 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31 if eval "test \"\${$as_ac_Header+set}\" = set"; then 34 if eval "test \"\${$as_ac_Header+set}\" = set"; then
 35@@ -9667,7 +9667,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 36 /* end confdefs.h. */
 37
 38 #include <stdio.h>
 39+#ifdef HAVE_SYS_TYPES_H
 40+#include <sys/types.h>
 41+#endif
 42+#ifdef HAVE_SYS_SOCKET_H
 43+#include <sys/socket.h>
 44+#endif
 45+#ifdef HAVE_NETINET_IN_H
 46+#include <netinet/in.h>
 47+#endif
 48+#ifdef HAVE_NET_IF_H
 49+#include <net/if.h>
 50+#endif
 51+#ifdef HAVE_NET_ETHERNET_H
 52 #include <net/ethernet.h>
 53+#endif
 54+#ifdef HAVE_NETINET_IF_ETHER_H
 55+#include <netinet/if_ether.h>
 56+#endif
 57
 58 int
 59 main ()
 60@@ -9736,7 +9753,24 @@ cat >>conftest.$ac_ext <<_ACEOF
 61 /* end confdefs.h. */
 62
 63 #include <stdio.h>
 64+#ifdef HAVE_SYS_TYPES_H
 65+#include <sys/types.h>
 66+#endif
 67+#ifdef HAVE_SYS_SOCKET_H
 68+#include <sys/socket.h>
 69+#endif
 70+#ifdef HAVE_NETINET_IN_H
 71+#include <netinet/in.h>
 72+#endif
 73+#ifdef HAVE_NET_IF_H
 74+#include <net/if.h>
 75+#endif
 76+#ifdef HAVE_NET_ETHERNET_H
 77 #include <net/ethernet.h>
 78+#endif
 79+#ifdef HAVE_NETINET_IF_ETHER_H
 80+#include <netinet/if_ether.h>
 81+#endif
 82
 83 int
 84 main ()

File Added: pkgsrc/net/ns/patches/patch-common_packet.cc
$NetBSD: patch-common_packet.cc,v 1.1 2012/09/29 06:17:30 dholland Exp $

Suppress immensely noisy const warnings.

--- common/packet.cc~	2008-04-01 02:00:25.000000000 +0000
+++ common/packet.cc
@@ -41,7 +41,7 @@ static const char rcsid[] =
 #include "flags.h"
 
 p_info packet_info;
-char** p_info::name_;
+const char** p_info::name_;
 unsigned int p_info::nPkt_ = 0;
 PacketClassifier *p_info::pc_ = 0;
 

File Added: pkgsrc/net/ns/patches/patch-common_packet.h
$NetBSD: patch-common_packet.h,v 1.1 2012/09/29 06:17:30 dholland Exp $

Suppress immensely noisy const warnings.

--- common/packet.h.orig	2008-04-01 02:00:25.000000000 +0000
+++ common/packet.h
@@ -272,7 +272,7 @@ public:
 	{
 		if(nPkt_ >= PT_NTYPE+1)
 		        return;
-		char **nameNew = new char*[PT_NTYPE+1];
+		const char **nameNew = new const char*[PT_NTYPE+1];
 		for(unsigned int i = (unsigned int)PT_SMAC+1; i < nPkt_; i++)
 		{
 		        nameNew[i] = name_[i];
@@ -391,7 +391,7 @@ public:
 
 	}
 private:
-	static char** name_;
+	static const char** name_;
 	static unsigned int nPkt_;
 	static PacketClassifier *pc_;
 };

File Added: pkgsrc/net/ns/patches/patch-common_ptypes2tcl.cc
$NetBSD: patch-common_ptypes2tcl.cc,v 1.1 2012/09/29 06:17:30 dholland Exp $

Suppress const warnings. Required by the common/packet.h patch.
While here, use tolower() correctly.

--- common/ptypes2tcl.cc.orig	2008-04-01 02:00:25.000000000 +0000
+++ common/ptypes2tcl.cc
@@ -10,7 +10,7 @@
 #define TCL2C_INT
 #endif
 
-char** p_info::name_;
+const char** p_info::name_;
 unsigned int p_info::nPkt_ = 0;
 PacketClassifier *p_info::pc_ = 0;
 int p_info::addPacket(char *name)
@@ -26,7 +26,7 @@ int p_info::addPacket(char *name)
 }
 
 void
-printLine(char *s) {
+printLine(const char *s) {
 #ifdef TCL2C_INT
 	for (unsigned int i = 0; i < strlen(s); i++) 
 		if ((i > 0) && ((i % 20) == 0))
@@ -43,7 +43,7 @@ char *
 lcase(const char *s) {
 	static char charbuf[512];
 	char* to = charbuf;
-	while ((*to++ = tolower(*s++)))
+	while ((*to++ = tolower((unsigned char)*s++)))
 		/* NOTHING */;
 	*to = '\0';
 	return charbuf;