Hello, by trying to compile a C++ source having included "xencrtl.h" I got the following errors on g++ (gcc version 4.1.2 20061115) and XEN-3.0.4-1: /usr/include/xenctrl.h:707: error: duplicate ''const'' /usr/include/xenctrl.h:714: error: duplicate ''const'' /usr/include/xenctrl.h:719: error: duplicate ''const'' By changing line 707 from const xc_error const *xc_get_last_error(void); to xc_error const *xc_get_last_error(void); line 714 from typedef void (*xc_error_handler)(const xc_error const* err); to typedef void (*xc_error_handler)(xc_error const* err); line 719 from void xc_default_error_handler(const xc_error const* err); to void xc_default_error_handler(xc_error const* err); these errors could be solved. Any comments? Regards, Reiner _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 12/6/07 07:01, "Reiner Dassing" <dassing@fs.wettzell.de> wrote:> these errors could be solved. > > Any comments?I think it''s the const before the * that is bogus. It''s probably meant to be after the *, otherwise it probably can be interpreted as a duplicate of the const before the type name. That const can be removed entirely in fact, as the const-ness of the pointer itself is quite uninteresting: it''s the thing pointed at that we care about the const-ness of. So, e.g., I''ll change it to const xc_error *xc_get_last_error(void); -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel