delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/16/16:03:11

From: marcus AT bighorn DOT dr DOT lucent DOT com
Subject: Re: Absolute file-path under bash (cygwin32)
16 Apr 1997 16:03:11 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199704161831.MAA17429.cygnus.gnu-win32@chorus.dr.lucent.com>
Original-From: marcus AT drmail DOT dr DOT lucent DOT com
Original-From: marcus AT drmail DOT dr DOT lucent DOT com
Original-To: gnu-win32 AT cygnus DOT com
X-Sun-Charset: US-ASCII
Original-Sender: owner-gnu-win32 AT cygnus DOT com

> > 
> > vim(){
> > vim.exe `dospwd.sh $*`
> > }
> > 
> > try that,it's a little slow ;^), but I think it will work, and you only
> > have to set it up once, in .bashrc.
> 
> Once per non-cygwin executable that you want to use from within bash!
> What if "ld" marked cygwin executables with some sort of magic code?
> Then bash could fix up arguments to non-cygwin executables.

Well, they are marked, but you have to look a little deeply.  If the binary
imports cygwin.dll, then it's a cygwin binary.  To find this, you have to
find the .idata section and look through a list of 5 word headers.  The
4th word of the header points to the name of the DLL to be imported.

This may not be too bad to do, particularly if this becomes a "tracked alias"
and is tagged as cygwin/!cygwin automatically.  The information for the
dozen or so programs frequently run would be cached pretty quickly.  Of
course, the cygwin executable should not expect anything from bash, because
it should run on its own from any command interpreter, but this would
interface to non-cygwin programs much nicer.

marcus hall
Lucent Technologies
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019