This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Update to splay-tree.h for 64-bit Windows host
- From: Ian Lance Taylor <iant at google dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org
- Date: 12 Jul 2007 17:43:21 -0700
- Subject: Re: Update to splay-tree.h for 64-bit Windows host
- References: <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