public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Allsopp <David.Allsopp@cl.cam.ac.uk>
To: cyg Simple <cygsimple@gmail.com>,
	"cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Bug Report: Regression in Cygwin 2.11.0-1
Date: Sun, 02 Sep 2018 07:32:00 -0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D901ADFF6FE4@Remus.metastack.local> (raw)
In-Reply-To: <921ff66e-cc22-5df2-db16-5f9cc1193185@gmail.com>

cyg Simple wrote:
> On 9/1/2018 5:52 PM, Andrey Repin wrote:
> > Greetings, David Allsopp!
> >
> >>> In terms of this OCAML build system problem:
> >>>
> >>> Please fix your build system.  Do not mix POSIX and Win32 paths, use
> >>> POSIX paths only.  Backslashes are *no* drop-in replacement for slashes.
> >
> >> The "problem" for us is more subtle than this. The program which is
> >> generating that path is not a Cygwin executable, so it is correctly
> >> combining a path it has been supplied (the ../stdlib which has been
> >> supplied via Cygwin's make) with a filename, so it uses a backslash.
> >> It's been on my TODO for years to enhance to understand that the
> >> program it's supplying the path back to is a Cygwin executable and so
> >> sort it out properly but, well, we're a small number of maintainers! That
> said, WSL is forcing us to address it properly...
> >
> > You CAN just send back forward slashes. Windows don't care.

That's not strictly true, as mkdir foo/bar will demonstrate in a command prompt (it is almost true when dealing with the Windows API). However, IMO, one looks like a Unix programmer who doesn't really understand Windows when your programs visibly use forward slashes everywhere. 

> > If any program would choke, it would be that program's problem after all.
> 
> Certainly not "that program's problem". The problem becomes mine and yours
> as we've not followed the design of the program.  While Windows at the
> moment doesn't care there is always the possibility that some fix could break
> that since the documentation states to use \ in paths and not /.  So while we
> "CAN just send back forward slashes" we need to be prepared for the outcome
> if something changes in an update to the OS and breaks the assumptions based
> on observed behavior rather than the documented behavior.

Just as an aside, the use of slashes is documented: see Kuhne's compulsory reading on the subject at https://blogs.msdn.microsoft.com/jeremykuhne/2016/04/21/path-normalization/ and also the notes in MSDN (https://docs.microsoft.com/en-gb/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation) which do mention that normalisation of / to \ in the API is not an accident.


David


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


  reply	other threads:[~2018-09-02  7:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01  1:25 Bryan Phelps
2018-09-01  7:58 ` Andreas Hauptmann
2018-09-01 15:54   ` Corinna Vinschen
2018-09-01 16:42     ` David Allsopp
2018-09-01 19:22       ` Corinna Vinschen
2018-09-02  8:38         ` David Allsopp
2018-09-03  7:39           ` Corinna Vinschen
2018-09-03 19:13             ` Achim Gratz
2018-09-03 20:31               ` Corinna Vinschen
2018-09-01 22:05       ` Andrey Repin
2018-09-02  3:36         ` cyg Simple
2018-09-02  7:32           ` David Allsopp [this message]
2018-09-01 18:08     ` Houder
2018-09-01 19:24       ` Corinna Vinschen
2018-09-01 21:25         ` Houder
2018-09-01 20:08     ` Bryan Phelps
2018-09-01  8:03 ` Marco Atzeri
2018-09-01  8:11 ` Marco Atzeri
2018-09-01  8:31   ` David Allsopp
2018-09-01  9:07   ` Thomas Wolff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E51C5B015DBD1348A1D85763337FB6D901ADFF6FE4@Remus.metastack.local \
    --to=david.allsopp@cl.cam.ac.uk \
    --cc=cygsimple@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).