Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [rfa] configure: new variable HAVE_UINTPTR_T
@ 2003-02-26 15:12 Michael Elizabeth Chastain
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2003-02-26 15:12 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

Woot!

Committed.

Coming next: a patch to check HAVE_UINTPTR_T in the two places that
use uintptr_t.

Michael C

> 2003-02-26  Michael Chastain  <mec@shout.net>
> 
> 	* configure.in: New variable HAVE_UINTPTR_T.
> 	* configure, config.in: Regenerated.


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [rfa] configure: new variable HAVE_UINTPTR_T
@ 2003-02-26 14:45 Michael Elizabeth Chastain
  2003-02-26 14:59 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2003-02-26 14:45 UTC (permalink / raw)
  To: gdb-patches

Draft #3.  Following Daniel J's advice, I use AC_CACHE_CHECK and the
multi-argument form of AC_DEFINE.  I re-tested with and without
uintptr_t in /usr/include/stdint.h to hit both paths.

I also learned that config.in is a regenerated file, not a hand-edited
file.  And by using multi-argument AC_DEFINE I dropped the change to

I don't show diffs for regenerated 'configure' and 'config.in'.  I
regenerated with stock autoconf 2.13 and autoheader 2.13 from
ftp.gnu.org.

Again, this is so that the gdb build can do something better when
it needs uintptr_t and doesn't have it (pr gdb/660).  My notion of
'something better' is going to be to spit out a better error message,
not to actually work.  Somebody has to have a really old libc
(more than 3 years old) to get this message, but with millions of
users, some people do.

OK to commit?

Michael C

2003-02-26  Michael Chastain  <mec@shout.net>

	* configure.in: New variable HAVE_UINTPTR_T.
	* configure, config.in: Regenerated.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.125
diff -u -r1.125 configure.in
--- configure.in	20 Feb 2003 23:38:58 -0000	1.125
+++ configure.in	26 Feb 2003 14:38:49 -0000
@@ -511,6 +511,18 @@
   AC_DEFINE(HAVE_PT_GETXMMREGS)
 fi
 
+# See if stdint.h provides the uintptr_t type.
+# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
+AC_CACHE_CHECK([for uintptr_t in stdint.h], gdb_cv_have_uintptr_t,
+  [AC_TRY_COMPILE(
+    [#include <stdint.h>],
+    [uintptr_t foo = 0;],
+    gdb_cv_have_uintptr_t=yes,
+    gdb_cv_have_uintptr_t=no)])
+AC_MSG_RESULT($gdb_cv_have_uintptr_t)
+if test $gdb_cv_have_uintptr_t = yes; then
+  AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if <stdint.h> provides the uintptr_t type.])
+fi
 
 BFD_NEED_DECLARATION(malloc)
 BFD_NEED_DECLARATION(realloc)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-26 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 15:12 [rfa] configure: new variable HAVE_UINTPTR_T Michael Elizabeth Chastain
  -- strict thread matches above, loose matches on Subject: below --
2003-02-26 14:45 Michael Elizabeth Chastain
2003-02-26 14:59 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox