From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: [PATCH] xs.h cannot include xenctrl.h Date: Tue, 11 Oct 2005 11:02:11 -0500 Message-ID: <434BE203.5070303@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040908060905050606040000" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------040908060905050606040000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit xs.h is LGPL. xenctrl.h is GPL. If xs.h includes xenctrl.h it implicitly makes xs.h GPL'd. The following patches remove the xenctrl.h dependency in xs.h. There's a hack to work around the problem of Xen's {u,s}{8,16,32,64} type usage. It would be nicer to have a common types header file in xen/include/public. Is there a right way to do this? Signed-off-by: Anthony Liguori Regards, Anthony Liguori --------------040908060905050606040000 Content-Type: text/x-patch; name="7314_xs_xenctrl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="7314_xs_xenctrl.diff" # HG changeset patch # User Anthony Liguori # Node ID 18897c2522a91e0c8c2486f0bb6fc70670d81a86 # Parent 4e335372ace84b605cebc36a42610caadb09a4d8 Having xs.h include xs_lib.h and then include xenctrl.h implicitly makes xs.h GPL (instead of the intended LGPL) b/c of the nature of the GPL. xs_lib.h only needs xenctrl.h for the xen type declarations. Change the xen types to be declared under a guard to avoid redefining in multiple places. Signed-off-by: Anthony Liguori diff -r 4e335372ace8 -r 18897c2522a9 tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Tue Oct 11 15:23:19 2005 +0100 +++ b/tools/libxc/xenctrl.h Tue Oct 11 10:44:33 2005 -0500 @@ -9,16 +9,22 @@ #ifndef XENCTRL_H #define XENCTRL_H +#ifndef _XEN_TYPES_ +#define _XEN_TYPES_ + #include -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; + +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; + +#endif #include #include diff -r 4e335372ace8 -r 18897c2522a9 tools/xenstore/xs_lib.h --- a/tools/xenstore/xs_lib.h Tue Oct 11 15:23:19 2005 +0100 +++ b/tools/xenstore/xs_lib.h Tue Oct 11 10:44:33 2005 -0500 @@ -22,8 +22,25 @@ #include #include -#include #include + +#ifndef _XEN_TYPES_ +#define _XEN_TYPES_ + +#include + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; + +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; + +#endif + #include /* Bitmask of permissions. */ --------------040908060905050606040000 Content-Type: text/x-patch; name="7315_xenstore_build.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="7315_xenstore_build.diff" # HG changeset patch # User Anthony Liguori # Node ID 50540a0583f3d7837e4eb5ea9843f53636b58f29 # Parent 18897c2522a91e0c8c2486f0bb6fc70670d81a86 Fix up a few more places where headers need to be explicit. diff -r 18897c2522a9 -r 50540a0583f3 tools/xenstore/xenstored_domain.c --- a/tools/xenstore/xenstored_domain.c Tue Oct 11 10:44:33 2005 -0500 +++ b/tools/xenstore/xenstored_domain.c Tue Oct 11 10:51:26 2005 -0500 @@ -36,6 +36,7 @@ #include "xenstored_watch.h" #include "xenstored_test.h" +#include #include static int *xc_handle; diff -r 18897c2522a9 -r 50540a0583f3 tools/xenstore/xs_lib.h --- a/tools/xenstore/xs_lib.h Tue Oct 11 10:44:33 2005 -0500 +++ b/tools/xenstore/xs_lib.h Tue Oct 11 10:51:26 2005 -0500 @@ -41,6 +41,7 @@ #endif +#include #include /* Bitmask of permissions. */ --------------040908060905050606040000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------040908060905050606040000--