From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 45343BBAF for ; Tue, 5 May 2009 10:58:32 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuoBALOc/0nRVdunkWdsb2JhbACWLT8BAQEBCQkMBw+meoEJj10BAwEDg3oF X-IronPort-AV: E=Sophos;i="4.40,296,1238968800"; d="scan'208";a="27226412" Received: from mail-ew0-f167.google.com ([209.85.219.167]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 May 2009 10:58:31 +0200 Received: by ewy11 with SMTP id 11so4376108ewy.9 for ; Tue, 05 May 2009 01:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=niaMSrz7ntq2ZMMh4b806/fLL+5u21OQU1vjRP2JRz0=; b=xHtAmXrA1aPBpFAn8TZoBaM+WlbV94xRMpPqFszxXFVZbPScJeynqqU0X0A6ZxfPmw qRE9EXfy7308OlLGofn/bfYB8/v3f96kR4nMRAAfqiFguaG3e5m3l1ob593Q0ibZzhcf gg0517kCdYklYheZhjQF8pSDgP3R92iPNwrFQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=ddpBneCo/FQXhgRdg4AdBFvyLrYA0nDzttxZBDoWivhFsBaWuhPdVr3rN0y21fXRHA Xkp4tBmCKHuQ4t63ZHOB/sFC+tAh3YWSA+ohDHLbxEoiUAyWQmB2fAHwwjv9yMjnJ6NQ Y/kJRPiG+iZOnsQHL3XqueEiVEe2sRo7Nlzcg= Received: by 10.216.54.202 with SMTP id i52mr2232439wec.196.1241513911444; Tue, 05 May 2009 01:58:31 -0700 (PDT) Received: from ?192.168.0.25? (papillon.metalscan.fr [212.73.210.234]) by mx.google.com with ESMTPS id t12sm20928985gvd.6.2009.05.05.01.58.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 May 2009 01:58:30 -0700 (PDT) Message-ID: <49FFFFB5.1090403@gmail.com> Date: Tue, 05 May 2009 10:58:29 +0200 From: Matthieu Dubuget User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Sys.command and quotes Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 mingw:01 ocaml:01 bug:01 elided:01 mingw:01 ocamlfind:01 ocamlfind:01 dependencies:01 ocamldep:01 val:01 val:01 Hello, I have a problem with mingw version of ocaml (compiled by hand, or with godi). 1- Is the following reproducible? 2- If yes, do you consider this as a bug? It seems that in "Sys.command s", if the first and the last characters of s are '"', they are elided? It prevents menhir (20090402) to compile on my mingw system with ocamlfind in use (because when ocamlfind is used, the dependencies are found with an ocamlfind ocamldep call). Thanks in advance Objective Caml version 3.11.0 # let cmd = "echo";; val cmd : string = "echo" # let arg1 = "Hello world";; val arg1 : string = "Hello world" # let q = Filename.quote;; val q : string -> string = # let go c = Sys.command (String.concat " " c);; val go : string list -> int = # go [cmd;arg1];; Hello world - : int = 0 # go [q cmd; arg1];; Hello world - : int = 0 # go [cmd; q arg1];; "Hello world" - : int = 0 # go [q cmd; q arg1];; 'echo" "Hello' n'est pas reconnu en tant que commande interne ou externe, un programme ex‚cutable ou un fichier de commandes. - : int = 1