* arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.

* arsup.c (ar_open): Prepend tmp- to basename, not whole path.
This commit is contained in:
Jakub Jelinek
2001-11-05 16:20:37 +00:00
parent 54589086a8
commit 5e9520c877
3 changed files with 9 additions and 2 deletions

View File

@@ -160,10 +160,11 @@ DEFUN(ar_open,(name, t),
{
char *tname = (char *) xmalloc (strlen (name) + 10);
const char *bname = lbasename (name);
real_name = name;
/* Prepend tmp- to the beginning, to avoid file-name clashes after
truncation on filesystems with limited namespaces (DOS). */
sprintf(tname, "tmp-%s", name);
sprintf(tname, "%.*stmp-%s", (int) (bname - name), name, bname);
obfd = bfd_openw(tname, NULL);
if (!obfd) {