Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

[Xen-devel] [PATCH] 13120:3e2d3d737624 breaks Solaris compile

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] 13120:3e2d3d737624 breaks Solaris compile
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Thu, 28 Dec 2006 17:39:08 +0000
Delivery-date: Thu, 28 Dec 2006 09:37:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061222142957.GA4041@xxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20061222142957.GA4041@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Dec 22, 2006 at 02:29:57PM +0000, John Levon wrote:

> Are both unneccessary on Linux (as they're const char * already), and
> broken on Solaris, where we have rather unfortunate prototypes from
> pre-history that aren't constified. I think these need to be reverted
> back to being the meaningful '(char *)'.

The below is still needed.

regards
john


# HG changeset patch
# User john.levon@xxxxxxx
# Date 1167321418 28800
# Node ID a00bf3c8f7bc8cb8537b153c61e6d09c9b494459
# Parent  bce4fd687b7901de6f2e72ea37d92508eb3f5a77
Older curses implementations don't have const-safe prototypes, so we must cast.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -271,7 +271,7 @@ static void print(const char *fmt, ...)
        if (!batch) {
                if((current_row() < lines()-1)) {
                        va_start(args, fmt);
-                       vwprintw(stdscr, fmt, args);
+                       vwprintw(stdscr, (char *)fmt, args);
                        va_end(args);
                }
        } else {
@@ -285,7 +285,7 @@ static void attr_addstr(int attr, const 
 static void attr_addstr(int attr, const char *str)
 {
        attron(attr);
-       addstr(str);
+       addstr((char *)str);
        attroff(attr);
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>