Use lstat unconditionally
authorYao Qi <yao@codesourcery.com>
Thu, 6 Nov 2014 12:34:28 +0000 (20:34 +0800)
committerYao Qi <yao@codesourcery.com>
Fri, 28 Nov 2014 10:38:02 +0000 (18:38 +0800)
Since lstat gnulib module is imported, we can use it unconditionally.
lstat usage was introduced by this patch

https://sourceware.org/ml/gdb-patches/2012-01/msg00390.html

during the review, it was suggested to import gnulib lstat module, but
we didn't do that.

gdb:

2014-11-28  Yao Qi  <yao@codesourcery.com>

* configure.ac (AC_CHECK_FUNCS): Remove lstat.
* config.in, configure: Regenerate.
* symfile.c (find_separate_debug_file_by_debuglink): Remove
code checking HAVE_LSTAT is defined.

gdb/ChangeLog
gdb/config.in
gdb/configure
gdb/configure.ac
gdb/symfile.c

index 3151d59ead498afb56e2236fab0922fc64efe5f2..f824ff30ef59e3f7fb1921af24506aef40a6e995 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-28  Yao Qi  <yao@codesourcery.com>
+
+       * configure.ac (AC_CHECK_FUNCS): Remove lstat.
+       * config.in, configure: Regenerate.
+       * symfile.c (find_separate_debug_file_by_debuglink): Remove
+       code checking HAVE_LSTAT is defined.
+
 2014-11-28  Yao Qi  <yao@codesourcery.com>
 
        * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
index 80b988b05a9a792c8179cceafbbef1662f7e1024..8c5a710812d97c1d339ce3d1515c820804382e3d 100644 (file)
 /* Define to 1 if the compiler supports long double. */
 #undef HAVE_LONG_DOUBLE
 
-/* Define to 1 if you have the `lstat' function. */
-#undef HAVE_LSTAT
-
 /* Define if <sys/procfs.h> has lwpid_t. */
 #undef HAVE_LWPID_T
 
index e1c0a108dfce7bfbd0133e049951b122a2744689..0c04ebaf3ab01ed897421bcd0b153dab41031911 100755 (executable)
@@ -10483,7 +10483,7 @@ for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
                sbrk setpgid setpgrp setsid \
                sigaction sigprocmask sigsetmask socketpair \
                ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
-               setrlimit getrlimit posix_madvise waitpid lstat \
+               setrlimit getrlimit posix_madvise waitpid \
                ptrace64 sigaltstack
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
index bcf1ef2ea9bbf33b9535ea1576207e5ca5391652..f8c32ad25c124dd18a10417c4ad6de5744eea25e 100644 (file)
@@ -1309,7 +1309,7 @@ AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid getgid \
                sbrk setpgid setpgrp setsid \
                sigaction sigprocmask sigsetmask socketpair \
                ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
-               setrlimit getrlimit posix_madvise waitpid lstat \
+               setrlimit getrlimit posix_madvise waitpid \
                ptrace64 sigaltstack])
 AM_LANGINFO_CODESET
 GDB_AC_COMMON
index 29877ec1673dfa297cd487a4d419d0d8d0e1f87d..a09ebe660e09b09d7e14f5b33dd612f3f9e0ce99 100644 (file)
@@ -1591,7 +1591,6 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
 
   if (debugfile == NULL)
     {
-#ifdef HAVE_LSTAT
       /* For PR gdb/9538, try again with realpath (if different from the
         original).  */
 
@@ -1618,7 +1617,6 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
                }
            }
        }
-#endif  /* HAVE_LSTAT  */
     }
 
   do_cleanups (cleanups);