mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Syrone Wong <wong.syrone@gmail.com>
Cc: musl@lists.openwall.com
Subject: Re: superfluous space char in marco
Date: Mon, 17 Apr 2017 10:48:41 -0400	[thread overview]
Message-ID: <20170417144841.GZ17319@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAEaqfoZUb5XOstw4A+NNScHbbYfpqDQAbaSPEL+n_P-QDCqcfg@mail.gmail.com>

On Sun, Apr 16, 2017 at 03:58:11PM +0800, Syrone Wong wrote:
> For include/net/if.h, we define it as
> 
> #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \
>         IFF_ECHO|IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
> 
> while iproute2 4.10.0 define it as
> 
> #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
> IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
> 
> in include/linux/if.h. The only difference is the space char after
> IFF_BROADCAST.

Do the other iproute2 include/linux/* headers actually work now? My
experience building it in the past has been that you have to rm -rf
that directory to get it to build at all since it contained outdated
and clashing versions of those headers. Maybe something has changed in
recent versions.

> This causes the redefinition of IFF_VOLATILE.
> 
> Warning when compiling iproute2 4.10.0:
> 
> In file included from ../include/linux/if_tunnel.h:5:0,
>                  from iptunnel.c:24:
> .../include/linux/if.h:130:0: warning: "IFF_VOLATILE" redefined
>  #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
> 
> In file included from iptunnel.c:21:0:
> /home/wong/github/lede-1/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-6.3.0_musl_eabi/include/net/if.h:48:0:
> note: this is the location of the previous definition
>  #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

This is odd and looks like a gcc bug. Preprocessor macros definitions
are sequences of PP tokens, not literal code strings, meaning that
whitespace is irrelevant as long as the resulting sequence of PP
tokens remains the same; it's a matching definition not a
redefinition.

Anyone else have thoughts on what's going on?

Rich


  reply	other threads:[~2017-04-17 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-16  7:58 Syrone Wong
2017-04-17 14:48 ` Rich Felker [this message]
2017-04-17 15:28   ` Alexander Monakov
2017-04-17 17:02     ` Rich Felker
2017-04-17 17:29       ` Szabolcs Nagy
2017-04-17 17:35         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170417144841.GZ17319@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=wong.syrone@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).