All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xs.h cannot include xenctrl.h
@ 2005-10-11 16:02 Anthony Liguori
  2005-10-11 16:25 ` David Hopwood
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2005-10-11 16:02 UTC (permalink / raw)
  To: xen-devel

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xs.h cannot include xenctrl.h
  2005-10-11 16:02 [PATCH] xs.h cannot include xenctrl.h Anthony Liguori
@ 2005-10-11 16:25 ` David Hopwood
  2005-10-11 17:08   ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: David Hopwood @ 2005-10-11 16:25 UTC (permalink / raw)
  To: xen-devel

Anthony Liguori wrote:
> 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.

Why not just make all headers LGPL (or less restrictive, e.g. BSD)?
Don't many of these headers need to be referenced from OSes where software
is typically BSD-licensed, anyway?

(BSD without the advertising clause is compatible with GPL and LGPL.)

-- 
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xs.h cannot include xenctrl.h
  2005-10-11 16:25 ` David Hopwood
@ 2005-10-11 17:08   ` Keir Fraser
  0 siblings, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2005-10-11 17:08 UTC (permalink / raw)
  To: david.nospam.hopwood; +Cc: xen-devel


On 11 Oct 2005, at 17:25, David Hopwood wrote:

> Anthony Liguori wrote:
>> 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.
>
> Why not just make all headers LGPL (or less restrictive, e.g. BSD)?
> Don't many of these headers need to be referenced from OSes where 
> software
> is typically BSD-licensed, anyway?
>
> (BSD without the advertising clause is compatible with GPL and LGPL.)

libxenctrl is GPL. Anything that includes the header file ought also to 
be linking with libxenctrl, so just changing the header file license is 
something of a hack.

Getting rid of the dependency is the right answer I think.

  -- Keir

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-11 17:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11 16:02 [PATCH] xs.h cannot include xenctrl.h Anthony Liguori
2005-10-11 16:25 ` David Hopwood
2005-10-11 17:08   ` Keir Fraser

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.