pkgsrc/devel/tvision/patches/patch-lib_tobjstrm_h
dholland a7762a5f5f Fix broken build by adding <cstring>. While here, deploy intptr_t, and
allow building this on LP64PLATFORMS again as I see no obvious further
reason it shouldn't work. If anyone knows how to test it properly,
please do so.
2012-06-28 03:16:06 +00:00

29 lines
870 B
Text

$NetBSD: patch-lib_tobjstrm_h,v 1.1 2012/06/28 03:16:07 dholland Exp $
- Use intptr_t to deal with pointer-sized values.
--- lib/tobjstrm.h~ 2012-06-28 02:28:23.000000000 +0000
+++ lib/tobjstrm.h
@@ -139,7 +139,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 +179,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