Package: metview / 5.10.2-1

mir-32bit.patch Patch series | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Description: Fix for FTBFS on 32-bit platforms due to size_t /long issue
 Also: eckit / SimpleOption lacks an int implementation, use size_t 
 instead of prec_t
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated:  2020-11-05
Forwarded: no

Index: metview-5.10.2/mir/src/mir/caching/matrix/SharedMemoryLoader.cc
===================================================================
--- metview-5.10.2.orig/mir/src/mir/caching/matrix/SharedMemoryLoader.cc
+++ metview-5.10.2/mir/src/mir/caching/matrix/SharedMemoryLoader.cc
@@ -154,7 +154,7 @@ SharedMemoryLoader::SharedMemoryLoader(c
     size_ = shmsize;
 
     msg << ", size: " << shmsize << " (" << eckit::Bytes(shmsize) << "), key: 0x" << std::hex << key << std::dec
-        << ", page size: " << eckit::Bytes(page_size) << ", pages: " << Pretty(shmsize / page_size);
+        << ", page size: " << eckit::Bytes(page_size) << ", pages: " << Pretty( (size_t) (shmsize / page_size));
 
 #ifdef IPC_INFO
     // Only on Linux?
Index: metview-5.10.2/mir/src/tools/mir-get-data.cc
===================================================================
--- metview-5.10.2.orig/mir/src/tools/mir-get-data.cc
+++ metview-5.10.2/mir/src/tools/mir-get-data.cc
@@ -56,7 +56,7 @@ public:
         options_.push_back(new VectorOption<double>("closest", "Point(s) close to given latitude/longitude", 2));
         options_.push_back(
             new SimpleOption<size_t>("nclosest", "Number of points close to given latitude/longitude, default 1"));
-        options_.push_back(new SimpleOption<prec_t>("precision", "Output precision"));
+        options_.push_back(new SimpleOption<size_t>("precision", "Output precision"));
     }
 };
 
Index: metview-5.10.2/mir/src/tools/mir-statistics.cc
===================================================================
--- metview-5.10.2.orig/mir/src/tools/mir-statistics.cc
+++ metview-5.10.2/mir/src/tools/mir-statistics.cc
@@ -63,7 +63,7 @@ public:
         options_.push_back(new SimpleOption<double>("counter-upper-limit", "count upper limit"));
         options_.push_back(new FactoryOption<PerPointStatistics>(
             "output", "/-separated list of per-point statistics (output GRIB to <statistics>"));
-        options_.push_back(new SimpleOption<prec_t>("precision", "Output precision"));
+        options_.push_back(new SimpleOption<size_t>("precision", "Output precision"));
     }
 };
 
Index: metview-5.10.2/mir/src/mir/caching/legendre/SharedMemoryLoader.cc
===================================================================
--- metview-5.10.2.orig/mir/src/mir/caching/legendre/SharedMemoryLoader.cc
+++ metview-5.10.2/mir/src/mir/caching/legendre/SharedMemoryLoader.cc
@@ -149,7 +149,7 @@ SharedMemoryLoader::SharedMemoryLoader(c
     size_t shmsize = ((size_ + page_size - 1) / page_size) * page_size + sizeof(SHMInfo);
 
     msg << ", size: " << shmsize << " (" << eckit::Bytes(shmsize) << "), key: 0x" << std::hex << key << std::dec
-        << ", page size: " << eckit::Bytes(page_size) << ", pages: " << Pretty(shmsize / page_size);
+        << ", page size: " << eckit::Bytes(page_size) << ", pages: " << Pretty((size_t) (shmsize / page_size));
 
 #ifdef IPC_INFO
     // Only on Linux?
Index: metview-5.10.2/mir/src/tools/mir-count.cc
===================================================================
--- metview-5.10.2.orig/mir/src/tools/mir-count.cc
+++ metview-5.10.2/mir/src/tools/mir-count.cc
@@ -28,7 +28,8 @@
 #include "mir/util/Increments.h"
 
 
-using prec_t = decltype(std::cout.precision());
+//using prec_t = decltype(std::cout.precision());
+using prec_t = size_t; 
 
 
 class MIRCount : public mir::tools::MIRTool {