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-changelog

[Xen-changelog] [xen-unstable] Workaround buggy GCCs wrt strftime.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Workaround buggy GCCs wrt strftime.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Mar 2007 22:00:28 -0700
Delivery-date: Sun, 25 Mar 2007 22:00:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174672284 0
# Node ID 0810daf7206e603c9fee1decfc9f446626b5772c
# Parent  94943f2e1de990fb1f73a801b8e266a928a574c5
Workaround buggy GCCs wrt strftime.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/test/test_bindings.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

diff -r 94943f2e1de9 -r 0810daf7206e tools/libxen/test/test_bindings.c
--- a/tools/libxen/test/test_bindings.c Fri Mar 23 17:50:18 2007 +0000
+++ b/tools/libxen/test/test_bindings.c Fri Mar 23 17:51:24 2007 +0000
@@ -573,6 +573,16 @@ static void print_vm_power_state(xen_ses
 
 
 /**
+ * Workaround for whinging GCCs, as suggested by strftime(3).
+ */
+static size_t my_strftime(char *s, size_t max, const char *fmt,
+                          const struct tm *tm)
+{
+    return strftime(s, max, fmt, tm);
+}
+
+
+/**
  * Print the metrics for the given VM.
  */
 static void print_vm_metrics(xen_session *session, xen_vm vm)
@@ -594,7 +604,7 @@ static void print_vm_metrics(xen_session
 
     char time[256];
     struct tm *tm = localtime(&vm_metrics_record->last_updated);
-    strftime(time, 256, "Metrics updated at %c, local time.\n", tm);
+    my_strftime(time, 256, "Metrics updated at %c, local time.\n", tm);
     printf(time);
 
     for (size_t i = 0; i < vm_metrics_record->vcpus_utilisation->size; i++)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Workaround buggy GCCs wrt strftime., Xen patchbot-unstable <=