RFC: Cygwin 64 bit?

Charles Wilson cygwin@cwilson.fastmail.fm
Tue Jun 28 20:29:00 GMT 2011

On 6/28/2011 3:58 PM, Thomas Wolff wrote:
> I have always wondered what the cyg*.dll's are doing in /bin. Not being
> a dll insider..., I may be overlooking something, but maybe it's time to
> move them over to /usr/lib and then add /usr/lib64, just as on Linux
> systems.
> Oh, and if it's about the PATH, I don't think any Windows programm will
> look for a cyg*.dll, so the cygwin loading function could probably be
> hard-coded to add /usr/lib (and /usr/lib64) to the path.

That only helps if the new process is being launched by an existing
cygwin process.  If you launch the cygwin app from windows (e.g. via a
shortcut), then you're completely at the mercy of the system $PATH
value.  In many cases, you don't WANT to add the cygwin directories to
the global PATH -- what if you have two (or more) separate cygwin
installations?  Which one gets the preferred system PATH entry?  What if
you switch between cygwin and msys? or cygwin and interix?  Having a
cygwin DLL dir in the global $PATH might interfere with the operation of
those other environments.

By putting (most) DLLs in the same directory that (most) cygwin EXEs
live in, we leverage the Windows Runtime Loader behavior that FIRST
looks in dir-of-EXE for any linked DLLs, before searching $PATH.

That's why cygwin.bat -- which starts bash.exe, which depends on
actually works, regardless of the global $PATH settings.


More information about the Cygwin-developers mailing list