* arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.
authorJakub Jelinek <jakub@redhat.com>
Mon, 5 Nov 2001 16:20:37 +0000 (16:20 +0000)
committerJakub Jelinek <jakub@redhat.com>
Mon, 5 Nov 2001 16:20:37 +0000 (16:20 +0000)
* arsup.c (ar_open): Prepend tmp- to basename, not whole path.

binutils/ChangeLog
binutils/arlex.l
binutils/arsup.c

index 11f2b7832a3ba50011a814ef8ac2d906b878f06a..bc8fc5788e436c6d20fbdeca6e1f5576f72d2964 100644 (file)
@@ -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.
index 71ef56ee6f9be1262aaa4552f90ed3de0e5eb1a6..4e2895cdc9caf5712a7a152b26a867c21e75ef1a 100644 (file)
@@ -71,7 +71,7 @@ int linenumber;
 "("             { return '('; }
 ")"             { return ')'; }
 ","             { return ','; }
-[A-Za-z0-9/$:.\-\_]+  {        
+[A-Za-z0-9/\\$:.\-\_]+  {      
                yylval.name =  xstrdup (yytext);
                return FILENAME;
                }
index 0058c0d31f566ccf388fe7d253ebbfebd7bcebae..1e864793955ff9ce5dda92765a09f6bedebaf6e2 100644 (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) {
This page took 0.036893 seconds and 4 git commands to generate.