public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: fix brokeness for cygwin
@ 2001-07-12 14:26 mike stump
  2001-07-12 14:31 ` Philip Blundell
  0 siblings, 1 reply; 3+ messages in thread
From: mike stump @ 2001-07-12 14:26 UTC (permalink / raw)
  To: binutils

Can someone put this patch on the binutils-2_11-branch release branch
only, this change is necessary for temp files to work on newer
cygwins, otherwise they abort.  The same logical change is already on
the top of the tree.

The theory is that the release branch should not have trival to fix things
that cause 100% non-workingness on major hosts.

I have an account on sources, if you want me to check it in.

Thanks.

Doing diffs in .:
*** ./choose-temp.c.~1~	Fri Jun 22 07:03:43 2001
--- ./choose-temp.c	Thu Jul 12 14:12:28 2001
*************** Boston, MA 02111-1307, USA.  */
*** 47,58 ****
  #include "libiberty.h"
  extern int mkstemps ();
  
- #ifndef IN_GCC
- #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN))
- #define DIR_SEPARATOR '\\'
- #endif
- #endif
- 
  #ifndef DIR_SEPARATOR
  #define DIR_SEPARATOR '/'
  #endif
--- 47,52 ----
--------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: fix brokeness for cygwin
  2001-07-12 14:26 PATCH: fix brokeness for cygwin mike stump
@ 2001-07-12 14:31 ` Philip Blundell
  2001-07-12 14:49   ` DJ Delorie
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Blundell @ 2001-07-12 14:31 UTC (permalink / raw)
  To: mike stump; +Cc: binutils

>Can someone put this patch on the binutils-2_11-branch release branch
>only, this change is necessary for temp files to work on newer
>cygwins, otherwise they abort.  The same logical change is already on
>the top of the tree.

This is fine by me.  If the DOS/Cygwin people are happy with your change, go 
ahead and check it into the branch.

p.


-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: Exmh version 2.1.1 10/15/1999 (debian)

iD8DBQE7ThcoVTLPJe9CT30RAnGzAJ0Zhff9UXeY7CpKfKMlYp6G8HydIwCfayu3
gCz3EP+qd6rIO3LJ7NfuGOw=
=H75O
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: fix brokeness for cygwin
  2001-07-12 14:31 ` Philip Blundell
@ 2001-07-12 14:49   ` DJ Delorie
  0 siblings, 0 replies; 3+ messages in thread
From: DJ Delorie @ 2001-07-12 14:49 UTC (permalink / raw)
  To: philb; +Cc: mrs, binutils

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-12 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-12 14:26 PATCH: fix brokeness for cygwin mike stump
2001-07-12 14:31 ` Philip Blundell
2001-07-12 14:49   ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).