Date: Wed, 4 Oct 2017 21:05:44 +0000 (UTC) From: Mariusz Zaborski <oshogbo@FreeBSD.org> 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 Message-ID: <201710042105.v94L5iHX045623@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <libcasper.h> #include <casper/cap_dns.h> -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ #include <netdissect-stdinc.h> @@ -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 <sys/ioccom.h> #include <net/bpf.h> #include <libgen.h> -#ifdef WITH_CASPER +#ifdef HAVE_CASPER #include <libcasper.h> #include <casper/cap_dns.h> -#endif /* WITH_CASPER */ +#endif /* HAVE_CASPER */ #endif /* HAVE_CAPSICUM */ #include <pcap.h> #include <signal.h> @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710042105.v94L5iHX045623>