Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BE0F97A.93A18F26@email.byu.edu> Date: Thu, 01 Nov 2001 00:27:54 -0700 From: Eric Blake Organization: BYU Student X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Supressing @path expansion Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm wondering if there is a way to make a cygwin-compiled program always receive its @pathname arguments unexpanded. Here's my situation: I'm working on the jikes compiler, a C++ program for compiling Java files, with cygwin.dll 1.3.3 on Win98. I'm trying to make jikes a drop-in replacement for Sun's javac, which has special rules for parsing @files. For example: $ cat filelist 'A.java'B.java Calling `javac @filelist' will compile both A.java and B.java, as if I had called `javac A.java B.java' (javac is doing all the expansion, since the executable is not compiled against cygwin). However, when calling `jikes @filelist' at a DOS prompt, cygwin pre-expands the argument, so that jikes sees argv[1] == "'A.java'B.java" instead of "@filelist". At this point, execution fails because the file 'A.java'B.java does not exist. I note that calling `jikes "@filelist"' on my patched version of jikes does work, giving me argv[1] == "@filelist". But this is not always an option. For example, part of the jikes test suite is written in Tcl, and relies on the exec command of tcl 8.3 (not the cygwin release of 8.0, but the Windows version available from a Tcl website). In the Tcl exec command, there is no way to pass the original argument un-expanded. Calling `exec jikes "@filelist"' gives argv[1] == "'A.java'B.java", while calling `exec jikes {"@filelist"}' gives argv[1] == "\\@filelist\"" (I'm not sure if that strange expansion is a bug in Tcl or cygwin). Even something like `exec jikes "{@filelist}"' is unacceptable, because although it gives jikes argv[1] == "@filelist", it gives javac argv[1] == "{@filelist}" (in other words, cygwin is also unwrapping {} as part of argument pre-processing). As a result, it is impossible for both jikes and javac to pass the test suite, because I cannot determine a way to pass the raw @ argument to the program. Does anyone know a work around to this, or know of a way to supress the command-line argument pre-processing that goes on in the cygwin API before the main method of my program even starts up? -- This signature intentionally left boring. Eric Blake ebb9 AT email DOT byu DOT edu BYU student, free software programmer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/