$OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.1.1.1 2005/05/25 17:27:53 kurt Exp $
--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig	Tue Jan 25 22:14:35 2005
+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp	Tue Jan 25 22:16:08 2005
@@ -16,7 +16,9 @@
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifndef __OpenBSD__
 #include <wchar.h>
+#endif
 #ifdef SOLARIS
   #include <ieeefp.h>
 #endif // SOLARIS
@@ -40,12 +42,24 @@
 # include <sys/procfs.h>
 # endif
 
+#ifdef __OpenBSD__
+// XXX Fix hotspot datatype problems later and remove this hack
+// #include <inttypes.h>
+#define _INTTYPES_H_
+ 
+/* Machine type dependent parameters. */
+#include <machine/types.h>
+
+typedef int                    intptr_t;
+typedef unsigned int           uintptr_t;
+#else
 #if defined(LINUX) || defined(_ALLBSD_SOURCE)
   #include <inttypes.h>
   #include <signal.h>
   #include <ucontext.h>
   #include <sys/time.h>
 #endif // LINUX || _ALLBSD_SOURCE
+#endif
 
 // 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures
 // When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in
@@ -187,7 +201,18 @@ inline int g_isfinite(jdouble f)        
 
 // Wide characters
 
+#ifdef __OpenBSD__
+inline int wcslen(const jchar* x) {
+  short l = 0;
+  while (*x) {
+    l++;
+    x++;
+  }
+  return l;
+}
+#else
 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
+#endif
 
 
 // [RGV] Need to check for accurate sizes 
