Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Deal with crunch the standard way.



details:   https://anonhg.NetBSD.org/src/rev/7a8764104c76
branches:  trunk
changeset: 759718:7a8764104c76
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Dec 15 11:22:41 2010 +0000

description:
Deal with crunch the standard way.

diffstat:

 distrib/utils/x_netstat/Makefile |  4 ++--
 usr.bin/netstat/Makefile         |  6 +-----
 usr.bin/netstat/prog_ops.h       |  7 ++++++-
 3 files changed, 9 insertions(+), 8 deletions(-)

diffs (65 lines):

diff -r f536c2d7fdaf -r 7a8764104c76 distrib/utils/x_netstat/Makefile
--- a/distrib/utils/x_netstat/Makefile  Wed Dec 15 10:42:56 2010 +0000
+++ b/distrib/utils/x_netstat/Makefile  Wed Dec 15 11:22:41 2010 +0000
@@ -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
 
diff -r f536c2d7fdaf -r 7a8764104c76 usr.bin/netstat/Makefile
--- a/usr.bin/netstat/Makefile  Wed Dec 15 10:42:56 2010 +0000
+++ b/usr.bin/netstat/Makefile  Wed Dec 15 11:22:41 2010 +0000
@@ -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
diff -r f536c2d7fdaf -r 7a8764104c76 usr.bin/netstat/prog_ops.h
--- a/usr.bin/netstat/prog_ops.h        Wed Dec 15 10:42:56 2010 +0000
+++ b/usr.bin/netstat/prog_ops.h        Wed Dec 15 11:22:41 2010 +0000
@@ -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_ */



Home | Main Index | Thread Index | Old Index