All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] xs.h cannot include xenctrl.h
Date: Tue, 11 Oct 2005 11:02:11 -0500	[thread overview]
Message-ID: <434BE203.5070303@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

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 <aliguori@us.ibm.com>

Regards,

Anthony Liguori

[-- Attachment #2: 7314_xs_xenctrl.diff --]
[-- Type: text/x-patch, Size: 1932 bytes --]

# HG changeset patch
# User Anthony Liguori <anthony@codemonkey.ws>
# 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 <aliguori@us.ibm.com>

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 <stdint.h>
 
-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 <sys/ptrace.h>
 #include <xen/xen.h>
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 <stdbool.h>
 #include <limits.h>
-#include <xenctrl.h>
 #include <errno.h>
+
+#ifndef _XEN_TYPES_
+#define _XEN_TYPES_
+
+#include <stdint.h>
+
+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 <xen/io/xs_wire.h>
 
 /* Bitmask of permissions. */

[-- Attachment #3: 7315_xenstore_build.diff --]
[-- Type: text/x-patch, Size: 899 bytes --]

# HG changeset patch
# User Anthony Liguori <anthony@codemonkey.ws>
# 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 <xenctrl.h>
 #include <xen/linux/evtchn.h>
 
 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 <xen/xen.h>
 #include <xen/io/xs_wire.h>
 
 /* Bitmask of permissions. */

[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2005-10-11 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 16:02 Anthony Liguori [this message]
2005-10-11 16:25 ` [PATCH] xs.h cannot include xenctrl.h David Hopwood
2005-10-11 17:08   ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=434BE203.5070303@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.