This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] gdb_thread_db.h: #errror if no uintptr_t
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Elizabeth Chastain <mec at shout dot net>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 26 Feb 2003 11:58:58 -0500
- Subject: Re: [rfa] gdb_thread_db.h: #errror if no uintptr_t
- References: <200302261652.h1QGq0R27186@duracef.shout.net>
On Wed, Feb 26, 2003 at 10:52:00AM -0600, Michael Elizabeth Chastain wrote:
> This patch updates gdb_thread_db.h to die with a more explicit error
> message if HAVE_UINTPTR_T is not defined. 'uintptr_t' is defined in
> glibc 2.1.3 and later. It might be defined in glibc versions earlier
> than 2.1.3, too, but 2.1.3 is already three years old so I figure that
> is enough.
>
> Instead of dying, gdb_thread_db.h could substitute some definition
> for uintptr_t. I chose not to do this because if glibc is that old
> then I don't want to support it anyways. But a case could be made
> for doing so.
>
> Note that gdb_thread_db.h is used only on *-*-*linux* and s390-*-*.
>
> Testing: again, I fiddled with my /usr/include/stdint.h to see both
> code paths. I also had to disable thread_db.h because my system is
> new enough to actually use this file instead of the copy embedded
> in gdb_thread_db.h.
>
> This will close PR build/660.
>
> OK to commit?
> +#error Unable to find uintptr_t type in <stdint.h>.
> +#error Your libc or glibc is too old!
> +#error You must upgrade to glibc 2.1.3 or later.
How about just:
#error No uintptr_t available; your C library is too old.
[This file might be used in non-glibc systems at some point.]
OK with that change.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer