nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build warning about duplicate definition of NOTHING


From: Benno Schulenberg
Subject: Re: Build warning about duplicate definition of NOTHING
Date: Tue, 2 Feb 2021 12:12:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Op 02-02-2021 om 02:22 schreef Hans-Bernhard Bröker:
> a build from a tarball made from current git sources would now trigger a macro
> redefinition warning because of this change to src/definitions.h by commit
> 3ea2694d9c0f590fda7973d519936b0578eac449:
> 
> -#define CNONE           (1<<1)
> +#define NOTHING      (1<<1)
> 
> This definition of "NOTHING" collides with the one in generated file 
> "revision.h"
> in case the configury did not detect a build from git:
> 
> #define NOTHING "from tarball"

Thanks for reporting.  Fixed in git:

  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=45defd25

> Generally speaking I would advise against defining globally visible enums as
> macros, and against doing either without any kind of name-space prefix.

I don't like repetitive prefixes, so I try to get by without those.

> As an aside, I only noticed this because the detection logic for a build from 
> git
> fails in an out-of-tree build.  It checks for the presence of a file in the 
> build
> root which only exists in the source root.  This should help:

> -if test -f roll-a-release.sh ; then
> +if test -f $srcdir/roll-a-release.sh ; then

Thanks.  Fixed in git:

  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=5ea930e2

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]