From: Ian Jackson Subject: Re: [PATCH] minios: do not expose #define current to applications Date: Wed, 29 Oct 2008 12:01:40 +0000 Message-ID: <18696.20644.785298.692010@mariner.uk.xensource.com> References: <18688.43589.339402.607213@mariner.uk.xensource.com> <18693.60683.98148.588009@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="R3t71GWcr/" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18693.60683.98148.588009@mariner.uk.xensource.com> 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@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --R3t71GWcr/ Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit 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. --R3t71GWcr/ Content-Type: text/plain Content-Description: minios no-#define current (take 3) Content-Disposition: inline; filename="minios-no-current-define-3.patch" Content-Transfer-Encoding: 7bit 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, --R3t71GWcr/ 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 --R3t71GWcr/--