Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2019 01:11:44 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Cc:        "Bjoern A. Zeeb" <bz@FreeBSD.org>, "rgrimes@freebsd.org" <rgrimes@freebsd.org>
Subject:   use of #ifdef INET and #ifdef INET6 in the kernel sources
Message-ID:  <QB1PR01MB353721C2A0CA0E38C7A8571EDD750@QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM>

next in thread | raw e-mail | index | archive | help

I thought (can't remember when/how I was told) that it was no longer
recommended to add
#ifdef INET
or
#ifdef INET6
to the kernel sources.

I'll admit I think #ifdef'ng code when it isn't necessary to get it to build makes the
code less readable and, as such, I prefer not to do this.

So, is this still recommended for blocks of code that only execute for the version
of IP, but will build for kernels that do not have the particular "options INET{6}"
in the kernel config?

If it is still recommended, I will do it, but I'll admit I don't understand why it should
be done? (All it does is reduce the size of the executable by a small amount and
that doesn't seem significant to me.)

rick




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?QB1PR01MB353721C2A0CA0E38C7A8571EDD750>