[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [PATCH] minios: do not expose #define current to applications
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |