diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-06-13 21:59:38 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-06-13 21:59:38 +0000 |
commit | 3be60c3d274d8a95d1e3c579c26140177b711d74 (patch) | |
tree | 0731ba7df624a82c962bbbff0618a73de7179f97 | |
parent | f9f87d2ca62abfc2102be8574167cb6aa6928a9e (diff) | |
download | gdb-3be60c3d274d8a95d1e3c579c26140177b711d74.zip gdb-3be60c3d274d8a95d1e3c579c26140177b711d74.tar.gz gdb-3be60c3d274d8a95d1e3c579c26140177b711d74.tar.bz2 |
* configure.ac: Use AC_CHECK_TYPES to check for uintptr_t.
* configure, config.in: Regenerate.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/config.in | 2 | ||||
-rwxr-xr-x | gdb/configure | 129 | ||||
-rw-r--r-- | gdb/configure.ac | 13 |
4 files changed, 71 insertions, 76 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 257dec2..5074c92 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2005-06-13 Mark Kettenis <kettenis@gnu.org> + * configure.ac: Use AC_CHECK_TYPES to check for uintptr_t. + * configure, config.in: Regenerate. + * ser-tcp.c: Tewak comment. [!HAVE_SOCKLEN_T]: Typedef socklen_t. * configure.ac: Add check for socklen_t. diff --git a/gdb/config.in b/gdb/config.in index 2e91e99..eb48a1a 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -566,7 +566,7 @@ /* Define to 1 if you have the `ttrace' function. */ #undef HAVE_TTRACE -/* Define if <stdint.h> provides the uintptr_t type. */ +/* Define to 1 if the system has the type `uintptr_t'. */ #undef HAVE_UINTPTR_T /* Define to 1 if you have the <unistd.h> header file. */ diff --git a/gdb/configure b/gdb/configure index be710de..f3b2da0 100755 --- a/gdb/configure +++ b/gdb/configure @@ -13864,6 +13864,72 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +if test "${ac_cv_type_uintptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdint.h> + +int +main () +{ +if ((uintptr_t *) 0) + return 0; +if (sizeof (uintptr_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_uintptr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_uintptr_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +if test $ac_cv_type_uintptr_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + +fi + # ------------------------------------- # # Checks for compiler characteristics. # @@ -17804,69 +17870,6 @@ _ACEOF fi -# See if stdint.h provides the uintptr_t type. -# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this. -echo "$as_me:$LINENO: checking for uintptr_t in stdint.h" >&5 -echo $ECHO_N "checking for uintptr_t in stdint.h... $ECHO_C" >&6 -if test "${gdb_cv_have_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdint.h> -int -main () -{ -uintptr_t foo = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gdb_cv_have_uintptr_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -gdb_cv_have_uintptr_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $gdb_cv_have_uintptr_t" >&5 -echo "${ECHO_T}$gdb_cv_have_uintptr_t" >&6 -if test $gdb_cv_have_uintptr_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - -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. diff --git a/gdb/configure.ac b/gdb/configure.ac index 0032d41..e77fc9e 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -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; then 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. |