From 0b48acfe664456ecf535a81be69bae8b52ae5631 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 16 Feb 2005 07:49:26 +0000 Subject: * 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/emultempl/elf32.em | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ld/emultempl') diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 886c7a4..5337e18 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); -- cgit v1.1