Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen \(garbage mail\)" To: Subject: RE: Path separator Date: Wed, 4 Jun 2003 12:57:26 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <20030603220046.97377.qmail@web40605.mail.yahoo.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf > Of Greg Fenton > --- Max Bowsher wrote: > > > > No: Cygwin != _WIN32. > > > > No argument from me here. :-) > > > > A native/Cygwin dual-mode binary sounds like a clever idea, but AFAIK > > has never been done before, and is probably ridiculously infeasible > on the balance of work/benefit. > I don't see that the amount of work is ridiculous at all. Any portable > code will have a path-conversion (canonicalization) function in place > for any and all file system access. That canonicalization should be > able to determine the PATH_SEPARATOR for the given environment. What in particular is it that you wish to do? Idea: Windows <-link-> DOS This means that %PATH% contains ':\' characters and ';' separators cygwin <-link-> Unix/Linux Here we have '/' characters and ':' separators in $PATH Might it be possible to exploit this? It won't work by simply reading the environment as cygwin.dll will be in there, supplying you with the (converted) environment contents. To see the difference you neeed to recompile under the other OS. /Hannu E K Nevalainen, Mariefred, Sweden, 59~14'N, 17~12'E. >17~C avg/d now. ~ <=> degree -- /* I have not seen 'char **env' _really_ documented -- pointers? */ # include int main(int argc, char **argv, char **env) { int i; printf("*** Arg-vector *** %d items \n",argc); for (i=0; i