Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2014 10:58:20 +0100
From:      Julio Merino <jmmv@freebsd.org>
To:        Garrett Cooper <ngie@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r273389 - head/contrib/netbsd-tests/lib/libc/gen
Message-ID:  <CAFY7cWCojvA5ZdWp2jbxovCOA2mZOsb63hC0oEgk=zPj6MNn%2BQ@mail.gmail.com>
In-Reply-To: <201410211756.s9LHu6Q9098073@svn.freebsd.org>
References:  <201410211756.s9LHu6Q9098073@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 21, 2014 at 6:56 PM, Garrett Cooper <ngie@freebsd.org> wrote:
> Modified: head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c
> ==============================================================================
> --- head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c  Tue Oct 21 17:17:40 2014        (r273388)
> +++ head/contrib/netbsd-tests/lib/libc/gen/t_siginfo.c  Tue Oct 21 17:56:06 2014        (r273389)
> @@ -29,7 +29,9 @@
>  #include <atf-c.h>
>  #include <atf-c/config.h>
>
> +#if defined(__NetBSD__)

Every time I see this (and checks for __FreeBSD__ as well), I can't
stop wondering... "why bother?"

This codebase lives in the FreeBSD source tree so it should be able to
assume it is being built on FreeBSD. The only thing these ifdefs
achieve is bloat, because there is no way their code paths will ever
be executed (and thus it's guaranteed that they will rot over time).
The differences between NetBSD and FreeBSD can easily be checked by
diffing the vendor branch with the contrib tree.

(Plus #ifdefs based on __*BSD__ macros are usually wrong because they
don't account for OS release differences and thus they will certainly
also break over time.)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFY7cWCojvA5ZdWp2jbxovCOA2mZOsb63hC0oEgk=zPj6MNn%2BQ>