From: Matthieu Dubuget <matthieu.dubuget@gmail.com>
To: caml-list@inria.fr
Cc: Alain Frisch <alain@frisch.fr>
Subject: Re: [Caml-list] Re: Strange compilation problem -> solved
Date: Wed, 11 Feb 2009 17:30:48 +0100 [thread overview]
Message-ID: <4992FD38.9050708@gmail.com> (raw)
In-Reply-To: <BB046CA812535C45BD0029AA9D04BA7905ECDCCB@KL-SRV57.lmsintl.com>
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
Here is a patch against subversion version of flexlink that solves my
problem.
Salutations
P.S. Alain, j'ai eu un problème d’édition de liens avec flexlink, qui
s’est avéré être
à ma portée (voir la liste de diffusion caml) ; d’autant plus que la
solution était
déjà en partie dans les sources de flexlink ;-)
Voici de quoi je suis parti.
Path: .
URL: svn://frisch.fr/flexdll/trunk
Repository Root: svn://frisch.fr/flexdll
Repository UUID: 673e9a06-3c3d-0410-add4-e21af864612f
Revision: 153
Node Kind: directory
Schedule: normal
Last Changed Author: frisch
Last Changed Rev: 153
Last Changed Date: 2009-01-28 17:17:06 +0100 (Wed, 28 Jan 2009)
[-- Attachment #2: long_path.patch --]
[-- Type: text/x-diff, Size: 1208 bytes --]
Index: reloc.ml
===================================================================
--- reloc.ml (revision 153)
+++ reloc.ml (working copy)
@@ -58,13 +58,25 @@
close_in ic;
List.rev !r
+
let get_output cmd =
let fn = Filename.temp_file "flexdll" "" in
- if (Sys.command (cmd ^ " > " ^ fn) < 0)
- then failwith ("Cannot run " ^ cmd);
- let r = read_file fn in
- Sys.remove fn;
- r
+ let cmd' = cmd ^ " > " ^ (Filename.quote fn) in
+ if String.length cmd' < 8182 then
+ begin
+ if (Sys.command cmd' < 0)
+ then failwith ("Cannot run " ^ cmd);
+ end
+ else
+ begin
+ let (cfn, oc) = Filename.open_temp_file "longcmd" ".sh" in
+ output_string oc cmd'; close_out oc;
+ if Sys.command (Printf.sprintf "bash %s" cfn) < 0
+ then failwith ("Cannot run " ^ cmd)
+ end;
+ let r = read_file fn in
+ Sys.remove fn;
+ r
let get_output1 cmd =
List.hd (get_output cmd)
@@ -142,7 +154,7 @@
(* Looking for files *)
let cygpath l =
- get_output (Printf.sprintf "cygpath -m %s" (String.concat " " l))
+ get_output (Printf.sprintf "cygpath -m %s" (String.concat " " (List.map Filename.quote l)))
let gcclib () =
let extra = match !toolchain with
next prev parent reply other threads:[~2009-02-11 16:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 9:28 Strange compilation problem Matthieu Dubuget
2009-02-11 12:05 ` Matthieu Dubuget
2009-02-11 14:30 ` Matthieu Dubuget
[not found] ` <BB046CA812535C45BD0029AA9D04BA7905ECDCCB@KL-SRV57.lmsintl.com>
2009-02-11 14:51 ` [Caml-list] " Matthieu Dubuget
[not found] ` <BB046CA812535C45BD0029AA9D04BA7905ECDCD6@KL-SRV57.lmsintl.com>
2009-02-11 15:15 ` [Caml-list] Re: Strange compilation problem (flexlink trying to deal with windows and cygwin shell limitations) Matthieu Dubuget
2009-02-11 16:30 ` Matthieu Dubuget [this message]
2009-02-11 17:19 ` [Caml-list] Re: Strange compilation problem -> solved Alain Frisch
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=4992FD38.9050708@gmail.com \
--to=matthieu.dubuget@gmail.com \
--cc=alain@frisch.fr \
--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