This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: fix brokeness for cygwin
> This is fine by me. If the DOS/Cygwin people are happy with your change, go
> ahead and check it into the branch.
None of the dos-based ports (dos, cygwin, uwin, msvc) fail with the
'/' slashes in a path, so that part is OK. The only part that would
matter is this:
if (base_len != 0
&& temp_filename[base_len-1] != '/'
&& temp_filename[base_len-1] != DIR_SEPARATOR)
temp_filename[base_len++] = DIR_SEPARATOR;
But without '\\' we'd just end up with two consecutive slashes. The
only time that's a problem is if they're right at the beginning of the
path, where Windows treats it as a share name (think
\\machine\c\windows). Best to avoid that. I think a safe solution is
to change that first chunk of your patch to define DIR_SEPARATOR2 and
#ifdefly include the second != in the source above. There's two
places in choose-temp.c that do that.
Too bad we can't just merge the head code, it's completely different.