caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: RE: [Caml-list] Need help installing OCaml-Cygwin packages!
Date: Mon, 19 Aug 2013 14:06:41 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9CCB2C4CA@Remus.metastack.local> (raw)
In-Reply-To: <521210D3.60302@gmail.com>

Jonathan Protzenko wrote:
> > But I haven't understood why Protz' OCaml uses '\', since when I'm
> > inside cmd.exe, the windows terminal, using '/' works just fine, but
> > using '\' inside Cygwin's terminal just clashes...
> If you have specific instances of a "\" that would be better turned into a
> "/", I can take a look. I think I just did whatever seemed easiest at the
> time. I'm using the stock OCaml sources, meaning I didn't change anything
> in OCaml's Makefile, so some "\" might originate from there.

Personally, I wouldn't go changing working ones from "\" to "/" - for the most part, programs which use "/" as the directory separator on Windows make it quite clear that they weren't written for Windows (and so cast doubt on their quality - if a program is written using properly portable name manipulation, the directory separator is not hard coded - for example in OCaml, see Filename). It's not relevant now, because the versions of Windows have expired, but older command shells could not consistently use / as a separator (try cd /WINNT on Windows 2000...).

Cygwin programs accept / as a Windows PATH separator for pretty much the same reason as Windows (or historically DOS) uses \ - because it didn't interfere with the command line parsing already in place (DOS had command line switches prefixed with "/" before it had directories). The forward slash is therefore used in the build system (as that's Cygwin) but the output should really use backslashes - for example, both %OCAMLLIB% and %OCAMLLIB%\ld.conf in OCaml accept PATHs written that way.


David 


  reply	other threads:[~2013-08-19 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16  1:14 wizbyron
2013-08-16 12:42 ` Florent Monnier
2013-08-19 12:34   ` Jonathan Protzenko
2013-08-19 14:06     ` David Allsopp [this message]
2013-08-19 18:05 ` Damien Doligez

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=E51C5B015DBD1348A1D85763337FB6D9CCB2C4CA@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    /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 NNTP newsgroup(s).