public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Making wget
@ 2000-01-26 12:31 David Robinow
  0 siblings, 0 replies; 6+ messages in thread
From: David Robinow @ 2000-01-26 12:31 UTC (permalink / raw)
  To: cygwin

--- Glenn Spell <glenn@gs.fay.nc.us> wrote:
> On 26 Jan 2000 around 9:38AM (-0000) Norling,
> Gunnar wrote:
> > Some days ago there where a discussion involving
> the wget program.
> >
> > ftp.o(.text+0x848):ftp.c: undefined reference to
> `h_errno'
> > http.o(.text+0x750):http.c: undefined reference to
> `h_errno'
> >
> > This is my versions:
> > gcc --version: 2.95.2
> > uname -a: CYGWIN_NT-4.0 <machine> 1.1.0(0.16/3/2)
> 2000-01-20
> > 00:22:41 i686 unknown
> 
> I get the same results. I'm using gcc-2.95 with the
> 1999-12-05
> dll (the newer dlls crash on me) on Win95.
> 
> The following patch worked for me. I gleaned the
> information
> from /usr/include/netdb.h.
> 
> I have no idea why this is necessary for some and
> not for others.
> 
 I've investigated a bit. Later snapshots have the
line
     h_errno DATA
in winsup.din, whereas 19990115 snapshot has
     h_errno

 I don't know what this means, but I'm guessing it has
something to do with why it seems to link with the old
snapshot but not the newer ones.
 Although the program seems to work for me, I haven't
tested it enough to tell if the part of the code that
uses h_errno is broken (i.e. links but doesn't work)
or not.
  Apparently Glenn's patch solves the problem, but I'm
wondering if this is a case like many old programs
declaring
  int errno
when they should use
 #include <errno.h>

 In other words, perhaps the code should just
 #include <netdb.h>

(Note that the last few lines above are off-topic for
Cygwin)

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Making wget
  2000-01-26  1:39 Norling, Gunnar
  2000-01-26  7:29 ` Chris Faylor
@ 2000-01-26 10:37 ` Glenn Spell
  1 sibling, 0 replies; 6+ messages in thread
From: Glenn Spell @ 2000-01-26 10:37 UTC (permalink / raw)
  To: cygwin

On 26 Jan 2000 around 9:38AM (-0000) Norling,
Gunnar wrote:
> Some days ago there where a discussion involving the wget program.
>
> ftp.o(.text+0x848):ftp.c: undefined reference to `h_errno'
> http.o(.text+0x750):http.c: undefined reference to `h_errno'
>
> This is my versions:
> gcc --version: 2.95.2
> uname -a: CYGWIN_NT-4.0 <machine> 1.1.0(0.16/3/2) 2000-01-20
> 00:22:41 i686 unknown

I get the same results. I'm using gcc-2.95 with the 1999-12-05
dll (the newer dlls crash on me) on Win95.

The following patch worked for me. I gleaned the information
from /usr/include/netdb.h.

I have no idea why this is necessary for some and not for others.

-------------------------------------------------
--- src/ftp.c.orig       Thu Sep 10 09:21:36 1998
+++ src/ftp.c            Wed Jan 26 12:39:46 2000
@@ -52,3 +52,8 @@
 #ifndef h_errno
+# ifdef __CYGWIN__
+extern int * __imp_h_errno;
+#  define h_errno (*__imp_h_errno)
+# else
 extern int h_errno;
+# endif
 #endif
--- src/http.c.orig      Thu Sep 10 10:14:44 1998
+++ src/http.c           Wed Jan 26 12:40:30 2000
@@ -70,3 +70,8 @@
 #ifndef h_errno
+# ifdef __CYGWIN__
+extern int * __imp_h_errno;
+#  define h_errno (*__imp_h_errno)
+# else
 extern int h_errno;
+# endif
 #endif
-------------------------------------------------

-glenn

-- 
  ________________________________________      _       _____
 )                                        )_ _ (__\____o /_/_ |
 )    Glenn Spell <glenn@gs.fay.nc.us>    )     >-----._/_/__]>
 )________________________________________)               `0  |

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Making wget
  2000-01-26  8:47 David Robinow
@ 2000-01-26 10:22 ` Chris Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Faylor @ 2000-01-26 10:22 UTC (permalink / raw)
  To: David Robinow; +Cc: cygwin

On Wed, Jan 26, 2000 at 08:47:08AM -0800, David Robinow wrote:
>--- Chris Faylor <cgf@cygnus.com> wrote:
>> On Wed, Jan 26, 2000 at 09:38:59AM -0000, Norling, Gunnar wrote:
>>>Some days ago there where a discussion involving the wget program.  ...
>
>>Why not just download one of the prebuilt versions???
>
>I find this strange, especially considering the source.  Isn't Cygwin
>supposed to be a development environment?

Sure.  Are you a developer?  If so, then these problems are not
insurmountable and probably only require some investigation of the
source.  Feel free to offer him some advice.

I didn't want to take time to figure out what was going on and suggested
a much faster way of getting wget on his system than doing a

1. configure
2. make
3. What???  HELP!!!!
4. Wait for someone on the mailing list to look at the source and figure
   out what was going wrong.

cgf

> As I reported Monday
>./configure; make
>worked for me. (make install did not but I don't expect that)
>
>I'm running gcc-2.95 with the 1/15/99 snapshot on NT 4.0

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Making wget
@ 2000-01-26  8:47 David Robinow
  2000-01-26 10:22 ` Chris Faylor
  0 siblings, 1 reply; 6+ messages in thread
From: David Robinow @ 2000-01-26  8:47 UTC (permalink / raw)
  To: cygwin

--- Chris Faylor <cgf@cygnus.com> wrote:
> On Wed, Jan 26, 2000 at 09:38:59AM -0000, Norling,
> Gunnar wrote:
> >Some days ago there where a discussion involving
> the wget program. ...

> Why not just download one of the prebuilt
> versions???
 I find this strange, especially considering the
source.  Isn't Cygwin supposed to be a development
environment?

 As I reported Monday
./configure; make
worked for me. (make install did not but I don't
expect that)

I'm running gcc-2.95 with the 1/15/99 snapshot on NT 4.0
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Making wget
  2000-01-26  1:39 Norling, Gunnar
@ 2000-01-26  7:29 ` Chris Faylor
  2000-01-26 10:37 ` Glenn Spell
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Faylor @ 2000-01-26  7:29 UTC (permalink / raw)
  To: Norling, Gunnar; +Cc: cygwin

On Wed, Jan 26, 2000 at 09:38:59AM -0000, Norling, Gunnar wrote:
>Some days ago there where a discussion involving the wget program. One of
>the mails (sorry, I've already deleted it) described the build process for
>it. I followed it, but in the end of the process I receive the following
>errors:

Why not just download one of the prebuilt versions???

The cygwin web site is your friend:  http://sourceware.cygnus.com/cygwin/

cgf

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Making wget
@ 2000-01-26  1:39 Norling, Gunnar
  2000-01-26  7:29 ` Chris Faylor
  2000-01-26 10:37 ` Glenn Spell
  0 siblings, 2 replies; 6+ messages in thread
From: Norling, Gunnar @ 2000-01-26  1:39 UTC (permalink / raw)
  To: cygwin

Hi,
Some days ago there where a discussion involving the wget program. One of
the mails (sorry, I've already deleted it) described the build process for
it. I followed it, but in the end of the process I receive the following
errors:

$ make
:
.
gcc -O2 -Wall -Wno-implicit  -o wget.exe  cmpt.o connect.o fnmatch.o ftp.o
ftp-basi
ers.o host.o html.o http.o init.o log.o main.o md5.o netrc.o rbuf.o recur.o
retr.o
ftp.o(.text+0x848):ftp.c: undefined reference to `h_errno'
ftp.o(.text+0x1378):ftp.c: undefined reference to `h_errno'
ftp.o(.text+0x1808):ftp.c: undefined reference to `h_errno'
http.o(.text+0x750):http.c: undefined reference to `h_errno'
collect2: ld returned 1 exit status
make[1]: *** [wget.exe] Error 1
make[1]: Leaving directory
`/cygdrive/v/Cygnus/cygwin-b20/local/src/wget-1.5.3/src'
make: *** [src] Error 2

For some reason the "h_errno' is not defined. Could there be some problems
with my include libraries. I use a standard installation (using the snapshot
cygwin-inst-20000119.tar.gz), with no include variable set.

In the ftp.c file the following is defined:

---<start snip>---
#include <config.h>

#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#include <ctype.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/types.h>
#include <assert.h>
#include <errno.h>

#include "wget.h"
#include "utils.h"
#include "url.h"
#include "rbuf.h"
#include "retr.h"
#include "ftp.h"
#include "html.h"
#include "connect.h"
#include "host.h"
#include "fnmatch.h"
#include "netrc.h"

#ifndef errno
extern int errno;
#endif
#ifndef h_errno
extern int h_errno;
#endif
---<end snip>---



This is my versions:
gcc --version: 2.95.2
uname -a: CYGWIN_NT-4.0 <machine> 1.1.0(0.16/3/2) 2000-01-20 00:22:41 i686
unknown




/Gunnar Norling 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-01-26 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-26 12:31 Making wget David Robinow
  -- strict thread matches above, loose matches on Subject: below --
2000-01-26  8:47 David Robinow
2000-01-26 10:22 ` Chris Faylor
2000-01-26  1:39 Norling, Gunnar
2000-01-26  7:29 ` Chris Faylor
2000-01-26 10:37 ` Glenn Spell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).