Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Date: Wed, 19 Apr 2000 19:03:31 +0200
From: Jens Yllman <jens@uniweb.se>
Subject: Re: h_errno.
To: kevh@cgocable.net, GNUWin32 <cygwin@sourceware.cygnus.com>
Message-id: <38FDE6E3.5D098B7@uniweb.se>
Organization: Uniweb AB
MIME-version: 1.0
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
References: <20000419144404.24901.qmail@web2101.mail.yahoo.com>
 <20000419114605.A13838@cgocable.net> <38FDD88E.CE46FC90@uniweb.se>
 <20000419125413.A14434@cgocable.net>

 Hi,

 Now I see the problem. In ftp.c and http.c the code looks to see if
h_errno 'macro' is defined with a #ifndef h_errno. And since the netdb.h
does not define the h_errno 'macro'. ftp.c and http.c will do the
'extern' for h_errno incorrectly. It is probably the correct way on most
UNIX systems. But not in cygwin. So the question is, should the h_errno
'macro' bi defined in netdb.h. Or should wget not assume it is there.
And still wget does not include the netdb.h. But maybe on most UNIX
systems h_errno is also defined in errno.h.

 Anyway, I got it compiled now by comment out the rows in #ifndef
h_errno and included the netdb.h. So, thanks for the help.

 Jens Yllman

kevh@cgocable.net wrote:
> 
> On Wed, Apr 19, 2000 at 06:02:23PM +0200, Jens Yllman wrote:
> >  But it is not on compiletime I get the error. It is at linktime.
> 
> Right, sorry about that.  What I did was change the "extern int
> h_errno" to just "int h_errno" in ./src/ftp.c, ./src/http.c, and
> commented (#) out that line in the ./TAGS file (I doubt that last
> one was needed, I'm not sure what the TAGS file does.)
> 
> I got that idea from another message in the list archives, though I
> think it basically just ignores the problem and makes the value of
> h_errno meaningless.  That got it to build and work, in any case,
> though it might lead to some bugs eventually.
> 
> If you want I can email you the binary, just let me know.
> 
> -Kevin

-- 
------------------------------------------------------------
Uniweb AB                            Phone:  +46 8 626 42 00
P O Box 745                          FAX:    +46 8 626 42 01
S-191 27  SOLLENTUNA
SWEDEN                               http://www.uniweb.se/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

