From 27aac7ff48e06d83f102a463685bc61469c8265b Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 23 Feb 2002 21:54:25 +0000 Subject: [PATCH] * configure.in: (AC_CHECK_FUNCS) Added test for canonicalize_file_name Regenerated. * config.in, configure: Regenerated. * utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is defined use canonicalize_file_name. --- gdb/ChangeLog | 10 ++++++++++ gdb/config.in | 3 +++ gdb/configure | 4 ++-- gdb/configure.in | 4 ++-- gdb/utils.c | 4 +++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 65ae27501dc..3361c1ec392 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2002-02-23 Andrew Cagney + + From 2002-02-22 Alfred M. Szmidt : + + * configure.in: (AC_CHECK_FUNCS) Added test for + canonicalize_file_name Regenerated. + * config.in, configure: Regenerated. + * utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is + defined use canonicalize_file_name. + 2002-02-23 Michael Chastain * MAINTAINERS: Remove Michael Chastain from "paper trail" list. diff --git a/gdb/config.in b/gdb/config.in index c8ac3fa04e4..f2bab550d14 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -202,6 +202,9 @@ /* Define if you have the bzero function. */ #undef HAVE_BZERO +/* Define if you have the canonicalize_file_name function. */ +#undef HAVE_CANONICALIZE_FILE_NAME + /* Define if you have the dcgettext function. */ #undef HAVE_DCGETTEXT diff --git a/gdb/configure b/gdb/configure index 8a9500b8147..c111aea9ffe 100755 --- a/gdb/configure +++ b/gdb/configure @@ -3582,8 +3582,8 @@ EOF fi -for ac_func in bcopy btowc bzero isascii poll realpath sbrk setpgid setpgrp \ - sigaction sigprocmask sigsetmask +for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \ + realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3590: checking for $ac_func" >&5 diff --git a/gdb/configure.in b/gdb/configure.in index 672f2600579..cb9e59beccc 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -131,8 +131,8 @@ AC_HEADER_STAT AC_C_CONST -AC_CHECK_FUNCS(bcopy btowc bzero isascii poll realpath sbrk setpgid setpgrp \ - sigaction sigprocmask sigsetmask) +AC_CHECK_FUNCS(bcopy btowc bzero canonicalize_file_name isascii poll \ + realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask ) AC_FUNC_ALLOCA AC_FUNC_VFORK dnl AC_FUNC_SETPGRP does not work when cross compiling diff --git a/gdb/utils.c b/gdb/utils.c index 627c89e39ec..8646020d9c7 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2526,7 +2526,9 @@ string_to_core_addr (const char *my_string) char * gdb_realpath (const char *filename) { -#ifdef HAVE_REALPATH +#ifdef HAVE_CANONICALIZE_FILE_NAME + return canonicalize_file_name (filename); +#elif defined (HAVE_REALPATH) #if defined (PATH_MAX) char buf[PATH_MAX]; #elif defined (MAXPATHLEN) -- 2.30.2