Date: Tue, 29 Jun 2010 11:48:26 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Matthew Fleming <mdf356@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209578 - head/sys/sys Message-ID: <20100629084826.GH13238@deviant.kiev.zoral.com.ua> In-Reply-To: <AANLkTilWzaFxFN1gNPVmj_Fwm6j_nmM06eXtEDVHZgjS@mail.gmail.com> References: <201006281759.o5SHxkoR076207@svn.freebsd.org> <AANLkTilWzaFxFN1gNPVmj_Fwm6j_nmM06eXtEDVHZgjS@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Mon, Jun 28, 2010 at 02:07:02PM -0700, Matthew Fleming wrote: > On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov <kib@freebsd.org> wrote: > > Author: kib > > Date: Mon Jun 28 17:59:45 2010 > > New Revision: 209578 > > URL: http://svn.freebsd.org/changeset/base/209578 > > > > Log: > > Use C99 initializers for the struct sysent generated by MAKE_SYSENT(). > > > > MFC after: 1 week > > > > Modified: > > head/sys/sys/sysent.h > > > > Modified: head/sys/sys/sysent.h > > ============================================================================== > > --- head/sys/sys/sysent.h Mon Jun 28 17:45:00 2010 (r209577) > > +++ head/sys/sys/sysent.h Mon Jun 28 17:59:45 2010 (r209578) > > @@ -144,10 +144,10 @@ struct syscall_module_data { > > > > #define MAKE_SYSENT(syscallname) \ > > static struct sysent syscallname##_sysent = { \ > > - (sizeof(struct syscallname ## _args ) \ > > + .sy_narg = (sizeof(struct syscallname ## _args ) \ > > / sizeof(register_t)), \ > > - (sy_call_t *)& syscallname, \ > > - SYS_AUE_##syscallname \ > > + .sy_call = (sy_call_t *)& syscallname, \ > > + .sy_auevent = SYS_AUE_##syscallname, \ > > } > > > > #define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) \ > > > > This change prevents (I assume) the use of MAKE_SYSENT() in a C++ > kernel module, as C++ does not support the .name = value style of > named initializers. > > gcc does allow name: value initializers and it's easy to patch it to > accept .name = value, but it's not strictly conforming C++ code > anymore. I do not mind reverting this, I think it would be better then having #ifdef __cplusplus and two definitions. I really wanted to have a way to provide sparce initializator for the struct sysent. I managed to not require it for r209579. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwps1oACgkQC3+MBN1Mb4jGsQCdFkZBqsnJ+BVTZzJXRaOXtUor ZJ0An0OHU8OF0Xh+UxB4u8s8c+CkMJon =evKS -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100629084826.GH13238>
