/* arsup.c - Archive support for MRI compatibility
- Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1992, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
{
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) {