Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Nick Clifton <nickc@redhat.com>
Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
Subject: Re: Update to splay-tree.h for 64-bit Windows host
Date: Fri, 13 Jul 2007 00:44:00 -0000	[thread overview]
Message-ID: <m3tzs9f80m.fsf@localhost.localdomain> (raw)
In-Reply-To: <m3vecqoznm.fsf@redhat.com>

Nick Clifton <nickc@redhat.com> 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
<stdint.h> 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


  parent reply	other threads:[~2007-07-13  0:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-07-13  1:09   ` Ian Lance Taylor
     [not found] <OF44DF70AB.8739E80A-ONC1257316.00431EFF-C1257316.004400F4@onevision.de>
2007-07-12 12:33 ` Hans-Peter Nilsson
2007-07-12 12:40 ` Diego Novillo
2007-07-12 13:09 ` Hans-Peter Nilsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tzs9f80m.fsf@localhost.localdomain \
    --to=iant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox