Module Name:    src
Committed By:   pooka
Date:           Wed Dec 15 11:22:42 UTC 2010

Modified Files:
        src/distrib/utils/x_netstat: Makefile
        src/usr.bin/netstat: Makefile prog_ops.h

Log Message:
Deal with crunch the standard way.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/x_netstat/Makefile
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/netstat/Makefile
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/netstat/prog_ops.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/x_netstat/Makefile
diff -u src/distrib/utils/x_netstat/Makefile:1.10 src/distrib/utils/x_netstat/Makefile:1.11
--- src/distrib/utils/x_netstat/Makefile:1.10	Wed Dec 12 00:05:13 2001
+++ src/distrib/utils/x_netstat/Makefile	Wed Dec 15 11:22:42 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2001/12/12 00:05:13 tv Exp $
+#	$NetBSD: Makefile,v 1.11 2010/12/15 11:22:42 pooka Exp $
 
 SRCDIR=		${.CURDIR}/../../../usr.bin/netstat
 
@@ -7,7 +7,7 @@
 
 SRCS=		if.c inet.c main.c mbuf.c route.c
 
-CPPFLAGS+=	-DSMALL -I${SRCDIR}
+CPPFLAGS+=	-DSMALL -I${SRCDIR} -DCRUNCHOPS
 DPADD=		${LIBKVM}
 LDADD=		-lkvm
 

Index: src/usr.bin/netstat/Makefile
diff -u src/usr.bin/netstat/Makefile:1.31 src/usr.bin/netstat/Makefile:1.32
--- src/usr.bin/netstat/Makefile:1.31	Wed Dec 15 09:15:05 2010
+++ src/usr.bin/netstat/Makefile	Wed Dec 15 11:22:41 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2010/12/15 09:15:05 he Exp $
+#	$NetBSD: Makefile,v 1.32 2010/12/15 11:22:41 pooka Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/12/93
 
 .include <bsd.own.mk>
@@ -23,10 +23,6 @@
 RUMPSRCS+= sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c
 RUMPSRCS+= if_indextoname.c getifaddrs.c
 
-.if defined(CRUNCHEDPROG)
-SRCS+=	netstat_hostops.c
-.endif
-
 .if (${USE_INET6} != "no")
 CPPFLAGS+= -DINET6
 .endif

Index: src/usr.bin/netstat/prog_ops.h
diff -u src/usr.bin/netstat/prog_ops.h:1.1 src/usr.bin/netstat/prog_ops.h:1.2
--- src/usr.bin/netstat/prog_ops.h:1.1	Mon Dec 13 21:15:30 2010
+++ src/usr.bin/netstat/prog_ops.h	Wed Dec 15 11:22:41 2010
@@ -1,4 +1,4 @@
-/*      $NetBSD: prog_ops.h,v 1.1 2010/12/13 21:15:30 pooka Exp $	*/
+/*      $NetBSD: prog_ops.h,v 1.2 2010/12/15 11:22:41 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
 
 #include <sys/types.h>
 
+#ifndef CRUNCHOPS
 struct prog_ops {
 	int (*op_init)(void);
 
@@ -41,5 +42,9 @@
 
 #define prog_init prog_ops.op_init
 #define prog_sysctl prog_ops.op_sysctl
+#else
+#define prog_init ((int (*)(void))NULL)
+#define prog_sysctl sysctl
+#endif
 
 #endif /* _PROG_OPS_H_ */

Reply via email to