This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (Fwd) Re: Absolute paths in BFD


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]