From owner-svn-src-all@freebsd.org  Fri Jun 14 01:26:24 2019
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD8715C277D;
 Fri, 14 Jun 2019 01:26:24 +0000 (UTC)
 (envelope-from chagin.dmitry@gmail.com)
Received: from mail-io1-f46.google.com (mail-io1-f46.google.com
 [209.85.166.46])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 26F2E76387;
 Fri, 14 Jun 2019 01:26:24 +0000 (UTC)
 (envelope-from chagin.dmitry@gmail.com)
Received: by mail-io1-f46.google.com with SMTP id e3so2111507ioc.12;
 Thu, 13 Jun 2019 18:26:24 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=/iElz/kjuib3F+c36X9dLvxLJ8zEu0veIQfqzL/Ko0Q=;
 b=bYxx1tQnpq8Z7Kwub21CgwOhMmgZ1WqtPospEvMKi8pphnrN+0XnS24BHg7dtfbfR7
 aXVxOuf8wcUQFk6PiCeFYOsDFV75/gOZIz7lkkK3xExElM3d9jwzVPkZtScrJYHbnQZE
 TbC9zCSLdeg80ImwvL1MITGGXhe1hokBaX8g7CztFkFjuY7n09Az+VVaDG53XFLK8uGQ
 1w4ttxf4TLuG1LbA6hUtkK0osito9hSkaTqTphVYafqwpxUGiMi5NUa0pa2E5BxyAE5x
 G9VDSeuu3ezMouVV/7Fb3o5Fac5Bb7G2OORULu9PiNq6vWqwgOdz3Ijrq9DfTO8Jndwt
 ZVDA==
X-Gm-Message-State: APjAAAX88zTM36p2ko4xFEhUTsQpY4XetsXvVGXBYhSbCX4pjozJ+/Ck
 7QfnWhlpzU+nDlxQZ7GPu1QwIEbe6q9vxLkMlXzAVe+W
X-Google-Smtp-Source: APXvYqzqGZdR3edRu/oLl0B62bbYaOu0sL8IXVxPeoihOTt0GyaIq2hZzZ41sq2m3a/GEtqfr6UZ1h7HTlGsNKLvOwQ=
X-Received: by 2002:a5e:a712:: with SMTP id b18mr2701992iod.220.1560446174837; 
 Thu, 13 Jun 2019 10:16:14 -0700 (PDT)
MIME-Version: 1.0
References: <201906100528.x5A5S4gm072561@repo.freebsd.org>
 <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org>
 <20190612224255.GA67242@FreeBSD.org>
 <CANCZdfrox5-Va1WUdf4y-Oe2qQ-XsXC9QfsDCRRHhAPXkihEhw@mail.gmail.com>
 <20190613104310.1b0f8f70@kalimero.tijl.coosemans.org>
In-Reply-To: <20190613104310.1b0f8f70@kalimero.tijl.coosemans.org>
From: Dmitry Chagin <dchagin@freebsd.org>
Date: Thu, 13 Jun 2019 20:16:04 +0300
Message-ID: <CAC0jpUBFnMRQW507Ds2u1WCfdu6PP9YxLWOhM62HKDG-20juBg@mail.gmail.com>
Subject: Re: svn commit: r348847 - head/sys/sys
To: =?UTF-8?Q?T=C4=B3l_Coosemans?= <tijl@freebsd.org>
Cc: Dmitry Chagin <dchagin@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org>, 
 Warner Losh <imp@bsdimp.com>, src-committers <src-committers@freebsd.org>, 
 svn-src-all <svn-src-all@freebsd.org>,
 svn-src-head <svn-src-head@freebsd.org>
X-Rspamd-Queue-Id: 26F2E76387
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.95 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.95)[-0.955,0]; TAGGED_FROM(0.00)[]
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Jun 2019 01:26:24 -0000

Hi, All! thanks for reply,

I will be back in a week and fix it, I am rafting in Eastern Siberia))



=D1=87=D1=82, 13 =D0=B8=D1=8E=D0=BD=D1=8F 2019 =D0=B3. =D0=B2 11:43, T=C4=
=B3l Coosemans <tijl@freebsd.org>:

> On Wed, 12 Jun 2019 16:51:03 -0600 Warner Losh <imp@bsdimp.com> wrote:
> > On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff <glebius@freebsd.org>
> wrote:
> >> On Mon, Jun 10, 2019 at 11:09:09AM +0200, T=C4=B3l Coosemans wrote:
> >>>> Date: Mon Jun 10 05:28:03 2019
> >>>> New Revision: 348847
> >>>> URL: https://svnweb.freebsd.org/changeset/base/348847
> >>>>
> >>>> Log:
> >>>>   Use C11 anonymous unions.
> >>>>
> >>>>   PR:              215202
> >>>>   Reported by:     glebius
> >>>>   MFC after:       2 weeks
> >>>>
> >>>> Modified:
> >>>>   head/sys/sys/ucred.h
> >>>>
> >>>> Modified: head/sys/sys/ucred.h
> >>>>
> >>>>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>
> >>>> --- head/sys/sys/ucred.h   Mon Jun 10 05:09:34 2019        (r348846)
> >>>> +++ head/sys/sys/ucred.h   Mon Jun 10 05:28:03 2019        (r348847)
> >>>> @@ -89,12 +89,11 @@ struct xucred {
> >>>>    gid_t   cr_groups[XU_NGROUPS];  /* groups */
> >>>>    union {
> >>>>            void    *_cr_unused1;   /* compatibility with old ucred *=
/
> >>>> -          pid_t   _pid;
> >>>> -  } _cr;
> >>>> +          pid_t   cr_pid;
> >>>> +  };
> >>>>  };
> >>>>  #define   XUCRED_VERSION  0
> >>>>
> >>>> -#define   cr_pid _cr._pid
> >>>>  /* This can be used for both ucred and xucred structures. */
> >>>>  #define   cr_gid cr_groups[0]
> >>>
> >>> Isn't this a userland header that should work with non-C11 compilers?
> >>
> >> It could make sense to keep such low bar for standard headers, but
> ucred.h
> >> is BSD-specific header and struct xucred is FreeBSD specific.
> >
> > This is solvable with proper visibility, I'd think..
>
> I think "union {" should be replaced with "__extension__ union {".  That
> seems to kill this warning:
>
> /usr/include/sys/ucred.h:90:2: warning: anonymous unions are a C11
> extension
>       [-Wc11-extensions]
>         union {
>         ^
> 1 warning generated.
>