From 0b48acfe664456ecf535a81be69bae8b52ae5631 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 16 Feb 2005 07:49:26 +0000 Subject: [PATCH] * configure.in (AC_CHECK_FUNCS): Add glob. * configure: Regenerated. * emultempl/elf32.em (): Do not include if HAVE_GLOB is not defined. (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob if HAVE_GLOB is not defined. --- ld/ChangeLog | 9 +++++++++ ld/configure | 2 +- ld/configure.in | 2 +- ld/emultempl/elf32.em | 9 +++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 7138eda17db..3b2159b35b1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2005-02-15 Mark Mitchell + + * configure.in (AC_CHECK_FUNCS): Add glob. + * configure: Regenerated. + * emultempl/elf32.em (): Do not include if HAVE_GLOB is + not defined. + (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob + if HAVE_GLOB is not defined. + 2005-02-16 Kaz Kojima * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Define diff --git a/ld/configure b/ld/configure index a79adf38a84..5ccd435d174 100755 --- a/ld/configure +++ b/ld/configure @@ -4635,7 +4635,7 @@ else fi done -for ac_func in sbrk realpath +for ac_func in sbrk realpath glob do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:4642: checking for $ac_func" >&5 diff --git a/ld/configure.in b/ld/configure.in index 28665eac25c..8b8354d1a11 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -119,7 +119,7 @@ AC_SUBST(HOSTING_LIBS) AC_SUBST(NATIVE_LIB_DIRS) AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h) -AC_CHECK_FUNCS(sbrk realpath) +AC_CHECK_FUNCS(sbrk realpath glob) AC_HEADER_DIRENT BFD_BINARY_FOPEN diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 886c7a44a95..5337e1814e4 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -67,7 +67,9 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then case ${target} in *-*-linux-gnu*) cat >>e${EMULATION_NAME}.c < +#endif EOF ;; esac @@ -539,7 +541,9 @@ gld${EMULATION_NAME}_parse_ld_so_conf_include const char *pattern) { char *newp = NULL; +#ifdef HAVE_GLOB glob_t gl; +#endif if (pattern[0] != '/') { @@ -552,6 +556,7 @@ gld${EMULATION_NAME}_parse_ld_so_conf_include pattern = newp; } +#ifdef HAVE_GLOB if (glob (pattern, 0, NULL, &gl) == 0) { size_t i; @@ -560,6 +565,10 @@ gld${EMULATION_NAME}_parse_ld_so_conf_include gld${EMULATION_NAME}_parse_ld_so_conf (info, gl.gl_pathv[i]); globfree (&gl); } +#else + /* If we do not have glob, treat the pattern as a literal filename. */ + gld${EMULATION_NAME}_parse_ld_so_conf (info, pattern); +#endif if (newp) free (newp); -- 2.30.2