delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/03/20/22:40:25

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <3C9954EF.3020101@ece.gatech.edu>
Date: Wed, 20 Mar 2002 22:35:11 -0500
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Prentis Brooks <prentis AT aol DOT net>
CC: cygwin-apps AT cygwin DOT com
Subject: Re: tcp wrappers
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0203202117420 DOT 3563-100000 AT magetower DOT office DOT aol DOT com>


Prentis Brooks wrote:

> Hrmmm.... I will look into it, I am sure there is some efficiency gained
> from making it a DLL.  Would packages that are built against libwrap
> automatically use the DLL if it is available, or would they need to be
> tweaked as well (ie sshd is compiled such that if libwrap.a is available
> it will use it to make use of host.allow files).


If an import lib is found during the link step (say when building 
sshd.exe), then the linker will use that in preference to a static lib. 
  Import libs are usually named
   /usr/lib/libfoo.dll.a
While static libs are typically
   /usr/lib/libfoo.a
And of course, the DLL is usually
   /usr/bin/cygfoo-N.dll
where 'N' is the interface number (see libtool docs for more info; on 
cygwin, N = c - a  (interface - age)

libtool knows about these rules (on cygwin) when building the library 
(say libtcpwrap) so a properly libtoolized/autoconfiscated tcpwrappers 
package will automagically generate
   /usr/lib/libtcpwrap.dll.a
   /usr/lib/libtcpwrap.a
   /usr/bin/cygtcpwrap-N.dll

When linking a client (say sshd.exe) the linker will use 
libtcpwrap.dll.a, and your sshd.exe will have a runtime dependency on 
cygtcpwrap-N.dll.  (In the past, you had to #define special stuff when 
compiled sshd's .c files; this is no longer necessary thanks to 
auto-import).  It just works (tm).

However, if tcpwrapper is not yet libtoolized (nor autoconfiscated), 
then autoconfiscating and libtoolizing it yourself from "scratch" is a 
pretty big undertaking...

--Chuck


- Raw text -


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