Subject: Re: creeping protocol defines
To: None <itojun@iijlab.net, smd@ebone.net>
From: Sean Doran <smd@ebone.net>
List: current-users
Date: 04/14/2000 15:06:26
| 	we define them unconditionally to help people who gets binary
| 	distribution happy.  basically, binaries are designed to be
| 	"protocol independent" - works fine on IPv4-only kernel, IPv4/v6
| 	kernel and IPv6-only kernel.
|
| 	if we make them conditional, binary builds will become complicated
| 	too much (and impose pain to users).

Why?  You could define them conditionally, and allow an
explicit "disable define of -DINET6" by simply looking for
USE_INET6, as done in pkgsrc.

That is, use USE_INET6, and assume that if it's not "no",
then the user wants -DINET6.

This doesn't affect all that many files, afaict, as below.

	Sean.

P.S.: I would say that -DIPSEC and -DNETISO should also be conditionalized.
P.S.S.: I am also willing to accept a "go soak your head, IPv6-Hater" answer.
- --
/usr/src/distrib/utils/sysinst/arch/i386/Makefile:CPPFLAGS+=-DINET6
/usr/src/distrib/utils/sysinst/arch/hpcmips/Makefile:CPPFLAGS+=-DINET6
/usr/src/distrib/utils/x_ifconfig/Makefile:CPPFLAGS+= -DINET6 -DINET_ONLY -I${SR
CDIR}
/usr/src/distrib/utils/x_ping6/Makefile:CPPFLAGS+=-DINET6
/usr/src/lib/libc/Makefile:CPPFLAGS+=   -DINET6
/usr/src/lib/libipsec/Makefile:CPPFLAGS+=-DIPSEC_DEBUG -DIPSEC -DINET6 -I. -DYY_
NO_UNPUT
/usr/src/lib/libpcap/Makefile:CPPFLAGS+=-DINET6
/usr/src/lib/libresolv/Makefile:CPPFLAGS+=-DINET6
/usr/src/lib/libwrap/Makefile.cflags:CPPFLAGS+=-DINET6
/usr/src/libexec/fingerd/Makefile:CPPFLAGS+=-DINET6
/usr/src/libexec/ftpd/Makefile:CPPFLAGS+=-DINET6
/usr/src/libexec/rlogind/Makefile:CPPFLAGS+=    -DINET6
/usr/src/libexec/rshd/Makefile:CPPFLAGS+=-DINET6
/usr/src/libexec/telnetd/Makefile:CPPFLAGS+=-DINET6
/usr/src/sbin/ifconfig/Makefile:CPPFLAGS+=-DINET6
/usr/src/sbin/ping6/Makefile:CPPFLAGS+=-DINET6
/usr/src/sbin/route/Makefile:CPPFLAGS+=-DINET6
/usr/src/sbin/rtsol/Makefile:CPPFLAGS+=-DINET6 -DHAVE_GETIFADDRS
/usr/src/sbin/sysctl/Makefile:CPPFLAGS+=-DINET6 -DIPSEC
/usr/src/usr.bin/finger/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.bin/fstat/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.bin/ftp/Makefile:CPPFLAGS+= -DINET6
/usr/src/usr.bin/netstat/Makefile:CPPFLAGS+= -DINET6 -DIPSEC
/usr/src/usr.bin/systat/Makefile:CPPFLAGS+=-DINET6 -DIPSEC
/usr/src/usr.bin/telnet/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/gifconfig/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/ifmcstat/Makefile:CPPFLAGS+=  -DINET6
/usr/src/usr.sbin/inetd/Makefile:CPPFLAGS+=-DLIBWRAP -DINET6
/usr/src/usr.sbin/mld6query/Makefile:CPPFLAGS+= -DINET6 -DIPSEC
/usr/src/usr.sbin/ndp/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/pim6dd/Makefile:CPPFLAGS+=-DINET6 -DPIM -DIOCTL_OK_ON_RAW_SOCK
ET -DHAVE_GETIFADDRS
/usr/src/usr.sbin/pppd/pppd/Makefile:#CPPFLAGS+= -DINET6
/usr/src/usr.sbin/pvcsif/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/pvctxctl/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/pim6sd/Makefile:CPPFLAGS+=-DINET6 -DPIM -DIOCTL_OK_ON_RAW_SOCK
ET
/usr/src/usr.sbin/rip6query/Makefile:CPPFLAGS+= -DINET6 -I${.CURDIR}/../route6d
/usr/src/usr.sbin/route6d/Makefile:CPPFLAGS+=-Dss_len=__ss_len -Dss_family=__ss_
family -DADVAPI -DINET6 \
/usr/src/usr.sbin/rtadvd/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/rtsold/Makefile:CPPFLAGS+=-DINET6 -DHAVE_GETIFADDRS
/usr/src/usr.sbin/setkey/Makefile:CPPFLAGS+=-DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT
/usr/src/usr.sbin/syslogd/Makefile:CPPFLAGS+=-DINET6
/usr/src/usr.sbin/tcpdump/Makefile:CPPFLAGS+=-DINET6 -DHAVE_LIBZ -DHAVE_ZLIB_H
/usr/src/usr.sbin/traceroute6/Makefile:CPPFLAGS+=-DINET6 -DIPSEC
/usr/src/usr.sbin/trpt/Makefile:CPPFLAGS+=      -DINET6
/usr/src/gnu/usr.sbin/sendmail/Makefile.inc:CPPFLAGS+=  -DNETINET6 -DNETISO