From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2561 invoked by alias); 12 Jul 2007 07:21:40 -0000 Received: (qmail 2416 invoked by uid 22791); 12 Jul 2007 07:21:39 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 12 Jul 2007 07:21:37 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l6C7LUkE030124; Thu, 12 Jul 2007 03:21:30 -0400 Received: from pobox.fab.redhat.com (pobox.fab.redhat.com [10.33.63.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6C7LTn5014258; Thu, 12 Jul 2007 03:21:29 -0400 Received: from workshop.redhat.com (vpn-6-14.fab.redhat.com [10.33.6.14]) by pobox.fab.redhat.com (8.13.1/8.13.1) with ESMTP id l6C7LRlN014657; Thu, 12 Jul 2007 03:21:28 -0400 To: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Subject: Update to splay-tree.h for 64-bit Windows host From: Nick Clifton Date: Thu, 12 Jul 2007 07:21:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00183.txt.bz2 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 * 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;