From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30695 invoked by alias); 13 Jul 2007 00:44:18 -0000 Received: (qmail 30685 invoked by uid 22791); 13 Jul 2007 00:44:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 13 Jul 2007 00:44:15 +0000 Received: from zps77.corp.google.com (zps77.corp.google.com [172.25.146.77]) by smtp-out.google.com with ESMTP id l6D0i3Sh032254; Thu, 12 Jul 2007 17:44:03 -0700 Received: from smtp.corp.google.com (spacemonkey2.corp.google.com [192.168.120.114]) by zps77.corp.google.com with ESMTP id l6D0htvT017884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 12 Jul 2007 17:43:55 -0700 Received: from localhost.localdomain.google.com (64.sub-75-209-49.myvzw.com [75.209.49.64]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id l6D0hprN025814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 12 Jul 2007 17:43:54 -0700 To: Nick Clifton Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Subject: Re: Update to splay-tree.h for 64-bit Windows host References: From: Ian Lance Taylor Date: Fri, 13 Jul 2007 00:44:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 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/msg00200.txt.bz2 Nick Clifton writes: > +#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 I think we should instead use a configure test to see whether exists and defines uintptr_t and intptr_t. We should use those when they exist. If they don't, we should do something like #ifdef __GNUC__ typedef unsigned int libi_uhostptr_t __attribute__ ((mode (pointer))); typedef int libi_shostptr_t __attribute__ ((mode (pointer))); #else typedef unsigned long long libi_uhostptr_t; typedef long long libi_shostptr_t; #endif Ideally we don't have to test _WIN64 at all. Ian