From: Roland McGrath Date: Tue, 12 Dec 1995 04:29:09 +0000 (+0000) Subject: Mon Dec 11 20:07:54 1995 Roland McGrath X-Git-Tag: upstream/2.30~29780 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3be01400fddc34cc895b903c69c5d24d4b38cdf9;p=external%2Fglibc.git Mon Dec 11 20:07:54 1995 Roland McGrath * posix/glob.c [! STDC_HEADERS]: Declare getenv. (glob): Avoid using function as value. * elf/rtld.c (dl_main): When mapping argument executable, set l_name to "", not l_libname. After loading DT_NEEDED library, set its l_type to lt_library. * sysdeps/mach/hurd/mmap.c: Don't interpret MAP_INHERIT to mean VM_INHERIT. We can't handle MAP_INHERIT easily. Handle non-page-aligned addresses if congruent to offset. * elf/dl-init.c: Skip the initializer for l_type lt_executable with l_name "". Start at _dl_loaded; don't skip the first element. * elf/dl-load.c (MAP_FILE): Define to zero if undefined. (MAP_COPY): Define to MAP_PRIVATE if undefined. (_dl_map_object_from_fd): Don't use MAP_INHERIT in mmap calls. If file it ET_EXEC, set its l_type to lt_executable. --- diff --git a/ChangeLog b/ChangeLog index a01a8f3..ceb34e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +Mon Dec 11 20:07:54 1995 Roland McGrath + + * posix/glob.c [! STDC_HEADERS]: Declare getenv. + (glob): Avoid using function as value. + + * elf/rtld.c (dl_main): When mapping argument executable, set + l_name to "", not l_libname. + After loading DT_NEEDED library, set its l_type to lt_library. + + * sysdeps/mach/hurd/mmap.c: Don't interpret MAP_INHERIT to mean + VM_INHERIT. We can't handle MAP_INHERIT easily. + Handle non-page-aligned addresses if congruent to offset. + + * elf/dl-init.c: Skip the initializer for l_type lt_executable + with l_name "". Start at _dl_loaded; don't skip the first element. + + * elf/dl-load.c (MAP_FILE): Define to zero if undefined. + (MAP_COPY): Define to MAP_PRIVATE if undefined. + (_dl_map_object_from_fd): Don't use MAP_INHERIT in mmap calls. + If file it ET_EXEC, set its l_type to lt_executable. + Sun Dec 10 09:56:06 1995 Roland McGrath * elf/dl-minimal.c (malloc): Use MAP_PRIVATE in mmap call. diff --git a/posix/glob.c b/posix/glob.c index ce17fe1..e212576 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -106,6 +106,8 @@ extern int errno; #define ANSI_STRING #else /* No standard headers. */ +extern char *getenv (); + #ifdef HAVE_STRING_H #include #define ANSI_STRING @@ -496,7 +498,8 @@ glob (pattern, flags, errfunc, pglob) struct stat st; for (i = oldcount; i < pglob->gl_pathc; ++i) if (((flags & GLOB_ALTDIRFUNC) ? - *pglob->gl_stat : __stat) (pglob->gl_pathv[i], &st) == 0 && + (*pglob->gl_stat) (pglob->gl_pathv[i], &st) : + __stat (pglob->gl_pathv[i], &st)) == 0 && S_ISDIR (st.st_mode)) { size_t len = strlen (pglob->gl_pathv[i]) + 2;