[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5 04/32] libxl: libxl_uuid_copy now taks a ctx argument
On Fri, May 16, 2014 at 12:17:26PM +0100, Wei Liu wrote: > On Fri, May 16, 2014 at 11:30:52AM +0100, Ian Campbell wrote: > > On Fri, 2014-05-16 at 11:18 +0100, Wei Liu wrote: > > > On Fri, May 16, 2014 at 10:46:52AM +0100, Ian Campbell wrote: > > > > On Thu, 2014-05-15 at 18:13 +0100, Wei Liu wrote: > > > > > > > > > > > +typedef struct libxl__ctx libxl_ctx; > > > > > > > > > > > > Maybe libxl_uuid.h should include libxl.h? > > > > > > > > > > > > > > > > That leads to circular inclusion. > > > > > > > > Do the #define guards not solve that? > > > > > > > > Or do you mean that libxl.h's include of libxl_uuid.h might be before > > > > libxl_ctx is typedefd? > > > > > > > > > > The latter. libxl includes libxl_uuid.h at the beginning. > > > > Is reordering the typedef wrt that an option? > > > > Moving typedef before including libxl_FOO.h does the job, I think. > Opps, hit "send" too fast. It still fails. diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index be722b6..9664cae 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -319,6 +319,8 @@ #include <xentoollog.h> +typedef struct libxl__ctx libxl_ctx; + #include <libxl_uuid.h> #include <_libxl_list.h> @@ -542,8 +544,6 @@ */ #define LIBXL_HAVE_CPUPOOL_NAME 1 -typedef struct libxl__ctx libxl_ctx; - typedef uint8_t libxl_mac[6]; #define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" #define LIBXL_MAC_FMTLEN ((2*6)+5) /* 6 hex bytes plus 5 colons */ diff --git a/tools/libxl/libxl_uuid.h b/tools/libxl/libxl_uuid.h index 041b927..5cbee99 100644 --- a/tools/libxl/libxl_uuid.h +++ b/tools/libxl/libxl_uuid.h @@ -15,6 +15,8 @@ #ifndef __LIBXL_UUID_H__ #define __LIBXL_UUID_H__ +#include <libxl.h> + #define LIBXL_UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" #define LIBXL_UUID_FMTLEN ((2*16)+4) /* 16 hex bytes plus 4 hypens */ #define LIBXL__UUID_BYTES(uuid) uuid[0], uuid[1], uuid[2], uuid[3], \ @@ -53,7 +55,6 @@ typedef struct { #endif -typedef struct libxl__ctx libxl_ctx; int libxl_uuid_is_nil(libxl_uuid *uuid); void libxl_uuid_generate(libxl_uuid *uuid); int libxl_uuid_from_string(libxl_uuid *uuid, const char And it fais with: In file included from ./libxl.h:636:0, from ./libxl_uuid.h:18, from libxl_uuid.c:17: ./_libxl_types.h:290:5: error: unknown type name âlibxl_uuidâ ./_libxl_types.h:331:5: error: unknown type name âlibxl_uuidâ ./_libxl_types.h:367:5: error: unknown type name âlibxl_uuidâ ./_libxl_types.h:585:5: error: unknown type name âlibxl_uuidâ ./_libxl_types.h:661:5: error: unknown type name âlibxl_uuidâ ./_libxl_types.h:766:5: error: unknown type name âlibxl_uuidâ In file included from ./libxl_uuid.h:18:0, from libxl_uuid.c:17: ./libxl.h:813:116: error: unknown type name âlibxl_uuidâ In file included from ./libxl_uuid.h:18:0, from libxl_uuid.c:17: ./libxl.h:1227:47: error: unknown type name âlibxl_uuidâ In file included from libxl_uuid.c:19:0: libxl_internal.h:56:3: error: #error libxl.h should be included via libxl_internal.h, not separately libxl_internal.h:59:0: error: "LIBXL_EXTERNAL_CALLERS_ONLY" redefined [-Werror] In file included from ./libxl_uuid.h:18:0, from libxl_uuid.c:17: ./libxl.h:512:0: note: this is the location of the previous definition cc1: all warnings being treated as errors make: *** [libxl_uuid.o] Error 1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |