Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2010 14:07:02 -0700
From:      Matthew Fleming <mdf356@gmail.com>
To:        Konstantin Belousov <kib@freebsd.org>
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:  <AANLkTilWzaFxFN1gNPVmj_Fwm6j_nmM06eXtEDVHZgjS@mail.gmail.com>
In-Reply-To: <201006281759.o5SHxkoR076207@svn.freebsd.org>
References:  <201006281759.o5SHxkoR076207@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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.

Thanks,
matthew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilWzaFxFN1gNPVmj_Fwm6j_nmM06eXtEDVHZgjS>