This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Update to splay-tree.h for 64-bit Windows host


Hi Guys,

  I have checked in the patch below as part of a wider patch to allow
  the binutils to be built on a 64-bit windows host.  It provides a
  64-bit windows alternative for the type of the splay_tree_key and
  splay_tree_value types.

Cheers
  Nick

include/ChangeLog
2007-07-12  Kai Tietz   <kai.tietz@onevision.com>

	* splay-tree.h (libi_uhostptr_t, libi_shostptr_t): New types,
	needed for WIN64 when a long is not wide enough for a pointer.
        (splay_tree_key, splay_tree_value): Use the new types.

Index: include/splay-tree.h
===================================================================
RCS file: /cvs/src/src/include/splay-tree.h,v
retrieving revision 1.13
diff -b -u -r1.13 splay-tree.h
--- include/splay-tree.h	10 May 2005 10:21:08 -0000	1.13
+++ include/splay-tree.h	18 Apr 2007 09:15:43 -0000
@@ -36,6 +36,14 @@
 
 #include "ansidecl.h"
 
+#ifndef _WIN64
+  typedef unsigned long int libi_uhostptr_t;
+  typedef long int libi_shostptr_t;
+#else
+  typedef unsigned long long libi_uhostptr_t;
+  typedef long long libi_shostptr_t;
+#endif
+
 #ifndef GTY
 #define GTY(X)
 #endif
@@ -44,8 +52,8 @@
    these types, if necessary.  These types should be sufficiently wide
    that any pointer or scalar can be cast to these types, and then
    cast back, without loss of precision.  */
-typedef unsigned long int splay_tree_key;
-typedef unsigned long int splay_tree_value;
+typedef libi_uhostptr_t splay_tree_key;
+typedef libi_uhostptr_t splay_tree_value;
 
 /* Forward declaration for a node in the tree.  */
 typedef struct splay_tree_node_s *splay_tree_node;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]