This is the mail archive of the cygwin-apps 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: Please upload: tcp_wrappers-7.6-3


On Apr 21 06:56, Bryan D. Thomas wrote:
> Yaakov wrote:
> > I know that tcp_wrappers doesn't officially come
> with
> > a shared library, but other distributions also do
> > such patches, but they version their shared lib as
> > libwrap0
> 
> Yes, I have been looking at Debian. I will attempt to
> create libwrap0.dll.a, libwrap0.a.  cygwrap-1.dll is
> still correct, or cygwrap-0.dll?

No, you got that wrong.  The import library must not have the version in
its name.  If at one point tcp_wrappers would be changed in a backward
incompatible way, you would like new applications to be linked to the
new DLL, without forcing them to change their Makefiles.  Consider this
situation:

  zap: zap.o
    $(CC) -o zap zap.o -lwrap

If you rename libwrap.a and libwrap.dll.a to libwrap0.a and
libwrap0.dll.a, the Makefile would have to be changed accordingly.  But
that's not waht this is good for.  The import libs should always link
against the latest version of the DLL, only the DLL change their name
at each backward incompatible change.  So, right now, you should
create

  cygwrap-0.dll
  libwrap.dll.a
  libwrap.a

> Thank you for the helpful information! Another help
> would be an example of how to see that things are
> working.  Am I correct to expect I could compile, for
> example, Apache from source and OpenSSH from source to
> get them both using the shared wrapper library, then
> see in Sysinternals Process Explorer that one is
> loaded, shared between? lsof would show this also,

Very simple.  The linker searches for *.dll.a first.  So, if it
exists, the application is linked against the DLL.  Only if *.dll.a
doesn't exists, it looks for *.a.

If you want to know which DLLs are linked to an application, just
use cygcheck:

  $ cygcheck /usr/bin/ssh.exe
  C:/cygwin/bin/ssh.exe
    C:/cygwin/bin\cygcrypto-0.9.8.dll
      C:/cygwin/bin\cygwin1.dll
	C:\WINDOWS\system32\ADVAPI32.DLL
	  C:\WINDOWS\system32\ntdll.dll
	  C:\WINDOWS\system32\KERNEL32.dll
	  C:\WINDOWS\system32\RPCRT4.dll
    C:/cygwin/bin\cygminires.dll
    C:/cygwin/bin\cygz.dll


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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