This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: (Fwd) Re: Absolute paths in BFD
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: (Fwd) Re: Absolute paths in BFD
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Wed, 3 May 2000 18:07:46 +1000 (EST)
- cc: binutils at sourceware dot cygnus dot com, snowball3 at bigfoot dot com
On Sat, 29 Apr 2000, Eli Zaretskii wrote:
> Could you please look at the patches I submitted and tell what else
> should I do to get them accepted?
Here are some problems.
1) I think your test for the file name part of a path has a bug. A path
like "abc\\def/ghi" will not be handled correctly. Change the code to
something like this example for the first hunk in bfd/archive.c. This
needs fixing in many places.
char *filename = strrchr (file, '/');
#ifdef DOSISH_FILENAMES
{
char *filename2 = strrchr (file, '\\');
if (filename2 > filename)
filename = filename2;
if (filename == NULL && file[0] != '\0' && file[1] == ':')
filename = file + 1;
}
#endif
2) IS_ABSOLUTE in include/filename.h should test for a slash after the
colon. a:zzz is not an absolute file. You also need some parentheses to
keep gcc quiet.
3) Satisfy Ian's concerns about O_BINARY and setmode.
4) Your test for .exe suffix in binutils/objcopy.c should test that the
length is > 4 first.
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.