summaryrefslogtreecommitdiff
path: root/misc/celestia/patches/patch-ab
blob: c2c7bbb46bc33f99590479dea293b51a2ace5040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ab,v 1.5 2011/11/25 22:08:30 joerg Exp $

--- src/celutil/formatnum.cpp.orig	2006-02-13 14:33:02.000000000 +0000
+++ src/celutil/formatnum.cpp
@@ -7,8 +7,10 @@
 // as published by the Free Software Foundation; either version 2
 // of the License, or (at your option) any later version.
 
+#include <climits>
 #include <cmath>
 #include <cstdio>
+#include <cstring>
 #include <string>
 #include "formatnum.h"
 
@@ -60,9 +62,9 @@ std::ostream& operator<<(std::ostream& o
     char buf[32];
     char obuf[64];
     double value = num.getRoundedValue();
-    char *decimal_point = localeconv()->decimal_point;
-    char *thousands_sep = localeconv()->thousands_sep;
-    char *grouping = localeconv()->grouping;
+    const char *decimal_point = localeconv()->decimal_point;
+    const char *thousands_sep = localeconv()->thousands_sep;
+    const char *grouping = localeconv()->grouping;
 
     memset(obuf, 0, sizeof(obuf));