From owner-svn-src-head@freebsd.org Wed Oct 4 21:05:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5D89E42B85; Wed, 4 Oct 2017 21:05:45 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773797217A; Wed, 4 Oct 2017 21:05:45 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v94L5ibe045627; Wed, 4 Oct 2017 21:05:44 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v94L5iHX045623; Wed, 4 Oct 2017 21:05:44 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201710042105.v94L5iHX045623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 4 Oct 2017 21:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324287 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-SVN-Commit-Revision: 324287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Oct 2017 21:05:45 -0000 Author: oshogbo Date: Wed Oct 4 21:05:44 2017 New Revision: 324287 URL: https://svnweb.freebsd.org/changeset/base/324287 Log: Partially revert r323866. Using HAVE_* is a internal tcpdump style standard. We want to be consistent with the standard to upstream those changes in the future. Requested by: glebius@ Modified: head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/tcpdump.c head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/config.h Modified: head/contrib/tcpdump/addrtoname.c ============================================================================== --- head/contrib/tcpdump/addrtoname.c Wed Oct 4 18:11:00 2017 (r324286) +++ head/contrib/tcpdump/addrtoname.c Wed Oct 4 21:05:44 2017 (r324287) @@ -26,10 +26,10 @@ #include "config.h" #endif -#ifdef WITH_CASPER +#ifdef HAVE_CASPER #include #include -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ #include @@ -202,7 +202,7 @@ intoa(uint32_t addr) static uint32_t f_netmask; static uint32_t f_localnet; -#ifdef WITH_CASPER +#ifdef HAVE_CASPER extern cap_channel_t *capdns; #endif @@ -250,7 +250,7 @@ getname(netdissect_options *ndo, const u_char *ap) */ if (!ndo->ndo_nflag && (addr & f_netmask) == f_localnet) { -#ifdef WITH_CASPER +#ifdef HAVE_CASPER if (capdns != NULL) { hp = cap_gethostbyaddr(capdns, (char *)&addr, 4, AF_INET); @@ -311,7 +311,7 @@ getname6(netdissect_options *ndo, const u_char *ap) * Do not print names if -n was given. */ if (!ndo->ndo_nflag) { -#ifdef WITH_CASPER +#ifdef HAVE_CASPER if (capdns != NULL) { hp = cap_gethostbyaddr(capdns, (char *)&addr, sizeof(addr), AF_INET6); Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Wed Oct 4 18:11:00 2017 (r324286) +++ head/contrib/tcpdump/tcpdump.c Wed Oct 4 21:05:44 2017 (r324287) @@ -82,10 +82,10 @@ The Regents of the University of California. All righ #include #include #include -#ifdef WITH_CASPER +#ifdef HAVE_CASPER #include #include -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ #endif /* HAVE_CAPSICUM */ #include #include @@ -176,7 +176,7 @@ static int infoprint; char *program_name; -#ifdef WITH_CASPER +#ifdef HAVE_CASPER cap_channel_t *capdns; #endif @@ -730,7 +730,7 @@ get_next_file(FILE *VFile, char *ptr) return ret; } -#ifdef WITH_CASPER +#ifdef HAVE_CASPER static cap_channel_t * capdns_setup(void) { @@ -757,7 +757,7 @@ capdns_setup(void) return (capdnsloc); } -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ #ifdef HAVE_PCAP_SET_TSTAMP_PRECISION static int @@ -1839,10 +1839,10 @@ main(int argc, char **argv) exit_tcpdump(0); } -#ifdef WITH_CASPER +#ifdef HAVE_CASPER if (!ndo->ndo_nflag) capdns = capdns_setup(); -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ init_print(ndo, localnet, netmask, timezone_offset); @@ -2066,11 +2066,11 @@ main(int argc, char **argv) #ifdef HAVE_CAPSICUM cansandbox = (VFileName == NULL && zflag == NULL); -#ifdef WITH_CASPER +#ifdef HAVE_CASPER cansandbox = (cansandbox && (ndo->ndo_nflag || capdns != NULL)); #else cansandbox = (cansandbox && ndo->ndo_nflag); -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ if (cansandbox && cap_enter() < 0 && errno != ENOSYS) error("unable to enter the capability mode"); #endif /* HAVE_CAPSICUM */ Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Wed Oct 4 18:11:00 2017 (r324286) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Wed Oct 4 21:05:44 2017 (r324287) @@ -190,7 +190,7 @@ LIBADD= l pcap .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns -CFLAGS+=-DWITH_CASPER +CFLAGS+=-DHAVE_CASPER .endif .if ${MK_OPENSSL} != "no" LIBADD+= crypto Modified: head/usr.sbin/tcpdump/tcpdump/config.h ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/config.h Wed Oct 4 18:11:00 2017 (r324286) +++ head/usr.sbin/tcpdump/tcpdump/config.h Wed Oct 4 21:05:44 2017 (r324287) @@ -18,7 +18,7 @@ /* Casper library support available */ /* See Makefile */ -/* #undef WITH_CASPER */ +/* #undef HAVE_CASPER */ /* Define to 1 if you have the `cap_enter' function. */ #define HAVE_CAP_ENTER 1