$OpenBSD: patch-cmn_utils_cpp,v 1.5 2018/12/20 23:20:07 naddy Exp $
Index: cmn/utils.cpp
--- cmn/utils.cpp.orig
+++ cmn/utils.cpp
@@ -30,18 +30,22 @@
 
 // Include Files
 #include "stdafx.h"
-#include <iostream.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-#include <fstream.h>
+#include <iostream>
+
+#include <climits>
+#include <cstring>
+#include <cctype>
+#include <fstream>
 #if WIN32
 #include <strstrea.h>
 #endif
 #if X11
-#include <strstream.h>
+#include <strstream>
 #endif
 
+using namespace std;
+
+#include <stdint.h>
 #ifdef WIN32
 // For file manipulation routines.
 #include <direct.h>
@@ -605,7 +609,7 @@ void PtrList::write(OutStreamP out) const{
   // Not tested.
   out->write_int(len);
   for (int n = 0; n < len; n++) {
-    out->write_int((int)data[n]);
+    out->write_int((intptr_t)data[n]);
   }
 }
 
@@ -761,7 +765,7 @@ class HashTable: public IDictionary {
 (public)
 
 
 private:
-  Bucket* HashTable::_get(int &index,void* key);
+  Bucket* _get(int &index,void* key);
   /* MODIFIES: index */
   /* EFFECTS: Internal helper function.  Return the Bucket containing key
      or NULL if not found.  Set index to the bucket list for key whether
@@ -944,7 +948,7 @@ Bucket* HashTable::_get(int &index,void* key) {  
 // Pretty crappy hash function, I know.
 // Careful if bucketsNum is a power of 2.
 int HashTable::defaultHash(void* key,int bucketsNum) {
-  return ((unsigned int)key) % bucketsNum;
+  return ((uintptr_t)key) % bucketsNum;
 }
 
 
