summaryrefslogtreecommitdiff
path: root/devel/tvision/patches/patch-lib_tobjstrm_h
blob: 102d64fea07eb216b4de7dd997d75d2ab257f04c (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
29
30
31
32
33
34
35
36
37
$NetBSD: patch-lib_tobjstrm_h,v 1.1.32.1 2016/05/23 05:14:35 bsiegert Exp $

- Use intptr_t to deal with pointer-sized values.

--- lib/tobjstrm.h.orig	2016-05-18 10:49:59.000000000 +0000
+++ lib/tobjstrm.h
@@ -14,6 +14,7 @@
 #include <iostream>
 #include <fstream>
 
+#include <inttypes.h>
 #include <limits.h>
 
 /**
@@ -139,7 +140,7 @@ const P_id_type P_id_notFound = UINT_MAX
  */
 typedef TStreamable *(*BUILDER)();
 
-#define __DELTA( d ) ((int)(TStreamable*)(d*)1-1 )
+#define __DELTA( d ) ((intptr_t)(TStreamable*)(d*)1-1 )
 
 /**
  * TStreamableClass is used by @ref TStreamableTypes and @ref pstream in the
@@ -179,11 +180,11 @@ public:
      * typedef TStreamable *(*BUILDER)();
      * </pre>
      */
-    TStreamableClass(const char *aName, BUILDER aBuild, int aDelta );
+    TStreamableClass(const char *aName, BUILDER aBuild, intptr_t aDelta );
 private:
     const char *name;
     BUILDER build;
-    int delta;
+    intptr_t delta;
 };
 
 #endif  // Uses_TStreamableClass