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] Pesky '#define current' in mini-os/sched.h

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Pesky '#define current' in mini-os/sched.h
From: Ferenc Wagner <wferi@xxxxxxx>
Date: Mon, 27 Apr 2009 20:11:24 +0200
Delivery-date: Mon, 27 Apr 2009 11:11:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
Hi,

I'm trying to port ncurses to mini-os, and hit an ugly snag:
xen-3.3.1/extras/mini-os/include/mini-os/sched.h says near the end:

#define current get_current()

which clashes with each field or variable named 'current'.  Thus it
pollutes the global and field namespace real bad, and is very easy to
activate through including errno.h if HAVE_LIBC is defined.

What is the best way around?
-- 
Thanks,
Feri.

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