WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] minios: do not expose #define current to applica

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [PATCH] minios: do not expose #define current to applications
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 29 Oct 2008 12:01:40 +0000
Delivery-date: Wed, 29 Oct 2008 05:02:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18693.60683.98148.588009@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <18688.43589.339402.607213@xxxxxxxxxxxxxxxxxxxxxxxx> <18693.60683.98148.588009@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I wrote:
> The attached patch arranges for this only to be done if
>  #define __MINIOS__
> is declared, which is set up by the makefile in extras/mini-os.

It turns out that __MINIOS__ is already used to mean `we are running
under minios' rather than `this is a source file which is part of
minios.  This causes a build failure (but apparently on amd64 only!)

The attached patch changes the __MINIOS__ introduced in c/s 18727 to
__INSIDE__MINIOS__.  It also arranges to define it for the arch/
subdirectories too.

Ian.

diff -r bec755616e8e extras/mini-os/Makefile
--- a/extras/mini-os/Makefile   Wed Oct 29 10:19:35 2008 +0000
+++ b/extras/mini-os/Makefile   Wed Oct 29 11:58:32 2008 +0000
@@ -17,9 +17,6 @@ include minios.mk
 
 # Set tester flags
 # CFLAGS += -DBLKTEST_WRITE
-
-# Make the headers define our internal stuff
-CFLAGS += -D__MINIOS__
 
 # Define some default flags for linking.
 LDLIBS := 
diff -r bec755616e8e extras/mini-os/include/sched.h
--- a/extras/mini-os/include/sched.h    Wed Oct 29 10:19:35 2008 +0000
+++ b/extras/mini-os/include/sched.h    Wed Oct 29 11:51:32 2008 +0000
@@ -48,7 +48,7 @@ void exit_thread(void) __attribute__((no
 void exit_thread(void) __attribute__((noreturn));
 void schedule(void);
 
-#ifdef __MINIOS__
+#ifdef __INSIDE_MINIOS__
 #define current get_current()
 #endif
 
diff -r bec755616e8e extras/mini-os/minios.mk
--- a/extras/mini-os/minios.mk  Wed Oct 29 10:19:35 2008 +0000
+++ b/extras/mini-os/minios.mk  Wed Oct 29 11:58:30 2008 +0000
@@ -25,6 +25,9 @@ else
 else
 DEF_CFLAGS += -O3
 endif
+
+# Make the headers define our internal stuff
+DEF_CFLAGS += -D__INSIDE_MINIOS__
 
 # Build the CFLAGS and ASFLAGS for compiling and assembling.
 # DEF_... flags are the common mini-os flags,
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>