summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-11-05 16:20:37 +0000
committerJakub Jelinek <jakub@redhat.com>2001-11-05 16:20:37 +0000
commit51d3f0854e89fd9002c6f1732a42ab99013d97fd (patch)
treecbf4f994a352c51c651625ca70614c62960b4340 /binutils
parentc28e627df9d8ec54802ea6c0c8216d9d07156174 (diff)
downloadbinutils-redhat-51d3f0854e89fd9002c6f1732a42ab99013d97fd.tar.gz
* arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.
* arsup.c (ar_open): Prepend tmp- to basename, not whole path.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/arlex.l2
-rw-r--r--binutils/arsup.c3
3 files changed, 9 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 11f2b7832a..bc8fc5788e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2001-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ * arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.
+
+ * arsup.c (ar_open): Prepend tmp- to basename, not whole path.
+
2001-11-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
* MAINTAINERS: Add self as s390/s390x maintainer.
diff --git a/binutils/arlex.l b/binutils/arlex.l
index 71ef56ee6f..4e2895cdc9 100644
--- a/binutils/arlex.l
+++ b/binutils/arlex.l
@@ -71,7 +71,7 @@ int linenumber;
"(" { return '('; }
")" { return ')'; }
"," { return ','; }
-[A-Za-z0-9/$:.\-\_]+ {
+[A-Za-z0-9/\\$:.\-\_]+ {
yylval.name = xstrdup (yytext);
return FILENAME;
}
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 0058c0d31f..1e86479395 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -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) {