This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Cygwin 64 bit?


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
	cygwin1.dll
	cygintl-8.dll
	cygiconv-2.dll
	cyggcc_s-1.dll
	cygreadline7.dll
	cygncursesw-10.dll
actually works, regardless of the global $PATH settings.

--
Chuck


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]