Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Update to splay-tree.h for 64-bit Windows host
@ 2007-07-12  7:21 Nick Clifton
  2007-07-12 11:17 ` Richard Guenther
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nick Clifton @ 2007-07-12  7:21 UTC (permalink / raw)
  To: gcc-patches, gdb-patches

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;


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-07-13  1:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OF44DF70AB.8739E80A-ONC1257316.00431EFF-C1257316.004400F4@onevision.de>
2007-07-12 12:33 ` Update to splay-tree.h for 64-bit Windows host Hans-Peter Nilsson
2007-07-12 12:40 ` Diego Novillo
2007-07-12 13:09 ` Hans-Peter Nilsson
2007-07-12  7:21 Nick Clifton
2007-07-12 11:17 ` Richard Guenther
2007-07-12 11:58   ` Kai Tietz
2007-07-12 12:48     ` Andreas Schwab
2007-07-12 15:23 ` Jim Blandy
2007-07-13  0:44 ` Ian Lance Taylor
2007-07-13  1:09   ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox