File: size_t_32bit.patch

package info (click to toggle)
odb-api 0.18.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,452 kB
  • sloc: cpp: 115,083; ansic: 86,859; f90: 30,318; sql: 12,508; sh: 9,939; yacc: 3,680; python: 2,432; lex: 1,593; perl: 1,116; fortran: 341; csh: 214; makefile: 111; lisp: 17
file content (36 lines) | stat: -rw-r--r-- 1,809 bytes parent folder | 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
Description: Drop duplicate method that causes FTBFS on 32-bit systems
 Also, need to cast a long in call to std::min on 32-bit systems too
Author: Alastair McKinstry <mckinstry@debian.org>
Bug-Origin: https://bugs.debian.org/880966
Last-Updated: 2017-11-06
Forwarded: no

Index: odb-api-0.18.0/eckit/src/eckit/container/DenseMap.h
===================================================================
--- odb-api-0.18.0.orig/eckit/src/eckit/container/DenseMap.h
+++ odb-api-0.18.0/eckit/src/eckit/container/DenseMap.h
@@ -138,8 +138,9 @@ public: // methods
 	const V& at( const size_t i ) const { ASSERT(i < keys_.size()); return values_[ keys_[i].idx() ]; }
 	V& at( const size_t i ) { ASSERT(i < keys_.size()); return values_[ i ]; }
 
-	const V& operator[] (const K& k ) const { return values_[ find(k)->idx() ]; }
-	V& operator[] (const K& k ) { return values_[ find(k)->idx() ]; }
+	// Dup of size_t below on 32-bit systems. Can it be removed?
+	//const V& operator[] (const K& k ) const { return values_[ find(k)->idx() ]; }
+	//V& operator[] (const K& k ) { return values_[ find(k)->idx() ]; }
 
 	const V& operator[] (const size_t& i ) const { ASSERT(i < values_.size()); return values_[ i ]; }
 	V& operator[] (const size_t& i ) { ASSERT(i < keys_.size()); return values_[ i ]; }
Index: odb-api-0.18.0/odb_api/src/odb_api/TReadOnlyMemoryDataHandle.h
===================================================================
--- odb-api-0.18.0.orig/odb_api/src/odb_api/TReadOnlyMemoryDataHandle.h
+++ odb-api-0.18.0/odb_api/src/odb_api/TReadOnlyMemoryDataHandle.h
@@ -79,7 +79,7 @@ public:
 //            dst[i] = *it_;
 //        return i;
 
-        long len = std::min(n, end_ - it_);
+	  long len = std::min(n, long(end_ - it_));
         ::memcpy(p, it_, len);
         it_ += len;
         return len;