From owner-svn-src-head@FreeBSD.ORG Mon Jun 28 21:07:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 559081065673; Mon, 28 Jun 2010 21:07:11 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 128808FC1A; Mon, 28 Jun 2010 21:07:10 +0000 (UTC) Received: by pwi5 with SMTP id 5so354525pwi.13 for ; Mon, 28 Jun 2010 14:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=s9HCQcM2dZqkkQOcgOHOdBJwJuG7jNAUmCL43NhD5dk=; b=UnzLsviAoR54f+fRZOhn45Sjt80KMUtb5v+A/hLHNyj3APSldRce0Sj6IMiJlN4XEJ z1LGVPwjvlBLw2Lc9iFkfp9v2+6UMTZCutTs5MLz9j+QoVg8jMynr2N8NiL1nr9zLryr IJKt8kx4L1k0Bjv/5otO69EWJGZ0m5bMaN4Js= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Bv15VKALZz+xy9m2qZ8Jd1/xoMnSO26Mc8UZyMI83btRYAZDEfaa7MDsK25tJVHvtO a/ZdqpuvI5M+HjS67o0QtPmVmgkYOK8+ynh4449uZ7wWUr2q5Nanoquy/NkZEF4LB0vl UG5vfaW26jDgtrn6eHB/k5KLN/TvTg/BSQEII= MIME-Version: 1.0 Received: by 10.142.1.5 with SMTP id 5mr4843051wfa.75.1277759222946; Mon, 28 Jun 2010 14:07:02 -0700 (PDT) Received: by 10.42.5.78 with HTTP; Mon, 28 Jun 2010 14:07:02 -0700 (PDT) In-Reply-To: <201006281759.o5SHxkoR076207@svn.freebsd.org> References: <201006281759.o5SHxkoR076207@svn.freebsd.org> Date: Mon, 28 Jun 2010 14:07:02 -0700 Message-ID: From: Matthew Fleming To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209578 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 21:07:11 -0000 On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov wro= te: > Author: kib > Date: Mon Jun 28 17:59:45 2010 > New Revision: 209578 > URL: http://svn.freebsd.org/changeset/base/209578 > > Log: > =A0Use C99 initializers for the struct sysent generated by MAKE_SYSENT(). > > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/sys/sysent.h > > Modified: head/sys/sys/sysent.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/sysent.h =A0 =A0 =A0 Mon Jun 28 17:45:00 2010 =A0 =A0 = =A0 =A0(r209577) > +++ head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:59:45 2010 =A0 =A0 = =A0 =A0(r209578) > @@ -144,10 +144,10 @@ struct syscall_module_data { > > =A0#define =A0 =A0 =A0 =A0MAKE_SYSENT(syscallname) =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0static struct sysent syscallname##_sysent =3D { =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0\ > - =A0 =A0 =A0 (sizeof(struct syscallname ## _args ) =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 .sy_narg =3D (sizeof(struct syscallname ## _args ) =A0 =A0 = =A0 =A0\ > =A0 =A0 =A0 =A0 =A0 =A0/ sizeof(register_t)), =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > - =A0 =A0 =A0 (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 \ > - =A0 =A0 =A0 SYS_AUE_##syscallname =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 .sy_call =3D (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0\ > + =A0 =A0 =A0 .sy_auevent =3D SYS_AUE_##syscallname, =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0\ > =A0} > > =A0#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) =A0 =A0 \ > This change prevents (I assume) the use of MAKE_SYSENT() in a C++ kernel module, as C++ does not support the .name =3D value style of named initializers. gcc does allow name: value initializers and it's easy to patch it to accept .name =3D value, but it's not strictly conforming C++ code anymore. Thanks, matthew