Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 2020 14:55:21 +0100
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        Alex Richardson <arichardson@FreeBSD.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r366634 - head/contrib/nvi/common
Message-ID:  <BAA9B321-AE1A-40E8-BA91-5274F11E30DE@freebsd.org>
In-Reply-To: <202010121042.09CAgOYV071542@repo.freebsd.org>
References:  <202010121042.09CAgOYV071542@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 Oct 2020, at 11:42, Alex Richardson <arichardson@FreeBSD.org> wrote:
> --- head/contrib/nvi/common/common.h	Mon Oct 12 10:42:19 2020	(r366633)
> +++ head/contrib/nvi/common/common.h	Mon Oct 12 10:42:24 2020	(r366634)
> @@ -14,7 +14,7 @@
> #ifdef __linux__
> #include "/usr/include/db1/db.h"	/* Only include db1. */
> #else
> -#include "/usr/include/db.h"	/* Only include db1. */
> +#include <db.h>			/* Only include db1. */
> #endif

Can this not be expressed more nicely as the following?

/* Only include db1 */
#if __has_include(<db1/db.h>)
#include <db1/db.h>
#else
#include <db.h>
#endif

Jess




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAA9B321-AE1A-40E8-BA91-5274F11E30DE>