[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: Minor modifications to platform.h to make it C++-friendly



>>> On 23.02.15 at 10:34, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
> Moved the definition of struct xenpf_efi_guid up, and rearranged
> struct xenpf_efi_time in the containing union to avoid compilation
> errors with C++ (structs defined inside unnamed structs become
> unavailable outside their scope with C++). The change allows C++
> applications to use platform.h with no consequences for current
> C clients.

What's wrong with simply naming the union/struct, making for a
much smaller change?

> @@ -152,24 +159,24 @@ struct xenpf_efi_runtime_call {
>      xen_ulong_t status;
>      union {
>  #define XEN_EFI_GET_TIME_SET_CLEARS_NS 0x00000001
> +        struct xenpf_efi_time {
> +            uint16_t year;
> +            uint8_t month;
> +            uint8_t day;
> +            uint8_t hour;
> +            uint8_t min;
> +            uint8_t sec;
> +            uint32_t ns;
> +            int16_t tz;
> +            uint8_t daylight;
> +        } set_time;
> +

If we were to go this proposed route, the insertion would need
to happen above the #define.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.