This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Simplify check for uintptr_t


My eye fell on the comment suggesting to do this once we'd converted
to autoconf 2.5x.

Committed as obvious after verifying that uintptr_t is still detected
on Linux.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.ac: Use AC_CHECK_TYPES to check for uintptr_t.
	* configure, config.in: Regenerate.

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.21
diff -u -p -r1.21 configure.ac
--- configure.ac 13 Jun 2005 21:31:57 -0000 1.21
+++ configure.ac 13 Jun 2005 21:55:36 -0000
@@ -436,6 +436,7 @@ AC_CHECK_TYPES(socklen_t, [], [],
 [#include <sys/types.h>
 #include <sys/socket.h>
 ])
+AC_CHECK_TYPES(uintptr_t, [], [], [#include <stdint.h>])
 
 # ------------------------------------- #
 # Checks for compiler characteristics.  #
@@ -668,18 +669,6 @@ if test $gdb_cv_have_pt_getxmmregs = yes
   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)])
-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
-
 # If we are configured native on GNU/Linux, work around problems with
 # sys/procfs.h
 # Also detect which type of /proc is in use, such as for Unixware or Solaris.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]