* lbasename.c: New file.
* libiberty.h: Add lbasename.
Approved by: Philip Blundell <philb@gnu.org>
<E15K1Xn-00032C-00@kings-cross.london.uk.eu.org>
* emultempl/elf32.em: Do not assuming that contents of the buffer
returned from basename function will remain unchanged accross other
function calls.
Approved by: Philip Blundell <philb@gnu.org>
<E15MO4s-00017V-00@kings-cross.london.uk.eu.org>
+2001-07-19 David O'Brien <obrien@FreeBSD.org>
+
+ * libiberty.h: Add lbasename.
+
2001-06-07 Alan Modra <amodra@bigpond.net.au>
* Many files: Update copyright notices.
# endif
#endif
+/* A well-defined basename () that is always compiled in. */
+
+extern char *lbasename PARAMS ((const char *));
+
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
Allocates memory using xmalloc. */
+2001-07-19 David O'Brien <obrien@FreeBSD.org>
+
+ * emultempl/elf32.em: Do not assuming that contents of the buffer
+ returned from basename function will remain unchanged accross other
+ function calls.
+
2001-07-19 Nick Clifton <nickc@cambridge.redhat.com>
* ldlang.c (lang_leave_overlay): If a region is specified assign
soname = bfd_elf_get_dt_soname (s->the_bfd);
if (soname == NULL)
- soname = basename (bfd_get_filename (s->the_bfd));
+ soname = lbasename (bfd_get_filename (s->the_bfd));
for (l = global_vercheck_needed; l != NULL; l = l->next)
{
soname = bfd_elf_get_dt_soname (s->the_bfd);
if (soname == NULL)
- soname = basename (s->filename);
+ soname = lbasename (s->filename);
if (strncmp (soname, global_needed->name,
suffix - global_needed->name) == 0)
einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
/* First strip off everything before the last '/'. */
- soname = basename (abfd->filename);
+ soname = lbasename (abfd->filename);
if (trace_file_tries)
info_msg (_("found %s at %s\n"), soname, name);
+2001-07-19 David O'Brien <obrien@FreeBSD.org>
+
+ * lbasename.c: New file.
+
2000-12-29 DJ Delorie <dj@redhat.com>
* fnmatch.c: Make the note about the origins of this file more
bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c \
cp-demangle.c dyn-string.c fdmatch.c fnmatch.c getcwd.c \
getpwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
- floatformat.c hashtab.c hex.c index.c insque.c md5.c memchr.c \
+ floatformat.c hashtab.c hex.c index.c insque.c lbasename.c \
+ md5.c memchr.c \
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \
partition.c pexecute.c putenv.c random.c rename.c rindex.c setenv.c \
sigsetmask.c safe-ctype.c sort.c spaces.c splay-tree.c strcasecmp.c \
# These are always included in the library.
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o \
dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o \
- getruntime.o hashtab.o hex.o floatformat.o md5.o objalloc.o obstack.o \
+ getruntime.o hashtab.o hex.o floatformat.o lbasename.o md5.o \
+ objalloc.o obstack.o \
partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o \
strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xmemdup.o \
xstrdup.o xstrerror.o
getruntime.o: config.h $(INCDIR)/libiberty.h
hex.o: $(INCDIR)/libiberty.h
floatformat.o: $(INCDIR)/floatformat.h
+lbasename.o: $(INCDIR)/libiberty.h
mkstemps.o: config.h
md5.o: config.h
objalloc.o: config.h $(INCDIR)/objalloc.h