[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Re: Lynx-2.8.1dev20 and DJGPP
From: |
T.E.Dickey |
Subject: |
Re: lynx-dev Re: Lynx-2.8.1dev20 and DJGPP |
Date: |
Sat, 15 Aug 1998 07:32:47 -0400 (EDT) |
> Wayne Buttles said:
>
> >> In a few words, what is the main problem with FTP/NEWS in
> >> Lynx/djgpp ?
> >
> > Lynx connects to the server, but lynx never sees a responce. I haven't
> > veryfied that the server sends the responce back to the correct place
> but
> > I have verified that the host sees the client and at least knows the
> > originating address.
>
> One error I found is that HTftp.c uses `getsockname()' which is the
> original non-BSD function. It should use `getsockname_s()' instead.
getsockname is also the most standard name for this function (I assume
you're saying that djgpp has a variant which should be ifdef'd).
> Hence rubbish gets returned in `sockaddr *'. No wonder it never opens a
> ftp data-connection; it listen's to a random sockaddr.
>
> Using `int' for `sock_type*' as the 1st argument apparently works under
> some DPMI host. Under CWSDPMI one should get a page-fault for sockets
> below 4096.
and some want the socket-type to be unsigned (winsock, for example)
> Well, so much for not using `gcc -Wall' and prototypes for everything.
>
> An OTOH patch for <tcp.h> would simply be:
>
> #ifdef DJGPP
> ..
> +#define getsockname getsockname_s
> ..
> #endif
ok
> Gisle V.
--
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey