lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev 2.8.2dev.15 patch 1 - LYGetHostByname


From: Bela Lubkin
Subject: Re: lynx-dev 2.8.2dev.15 patch 1 - LYGetHostByname
Date: Wed, 3 Feb 1999 18:03:10 -0800

Klaus Weide wrote:

> Now to potential problems - In order to ship a (struct hostent)
> lookup result from the NSL_FORK child process to its parent so
> that it's still valid in the parent, all the struct hostent
> elements have to be shuffled into a new buffer.  This requires
> some knowledge about what the elements are.  I have:
> in /usr/include/netdb.h:
> 
>   struct hostent
>   {
>     char *h_name;                     /* Official name of host.  */
>     char **h_aliases;         /* Alias list.  */
>     int h_addrtype;           /* Host address type.  */
>     int h_length;                     /* Length of address.  */
>     char **h_addr_list;               /* List of addresses from name server.  
> */
>   #define     h_addr  h_addr_list[0]  /* Address, for backward compatibility. 
>  */
>   };
> 
> As far as I know that looks the same nearly everywhere, but are
> there some systems (that Lynx has to care about) where the header
> declaration is different?  Specifically, where some of the fields
> are missing, or h_addr is not #defined the same way?
> 
> The code below currently assumes that all the elements are there
> and that h_addr is h_addr_list[0], but (I hope) doesn't require
> a specific order.

We'll soon learn about compatibility...

On SCO OpenServer Release 5.0.5, the patch builds fine except you need
to declare extern int h_errno; -- or #include <resolv.h>.  Some
configure stanzas would solve that (Tom?).

> +         /*
> +         **  This allows us to abort immediately, not after 1-second
> +         **  timeout, when user hits abort key.  Can't do this when
> +         **  using SLANG (or at least I don't know how), so SLANG
> +         **  users must live with up-to-1s timeout.  -BL
> +         **
> +         **  Whoops -- we need to make sure stdin is actually
> +         **  selectable!  /dev/null isn't, on some systems, which
> +         **  makes some useful Lynx invocations fail.  -BL
> +         */
> +         {
> +             int kbd_fd = LYConsoleInputFD(TRUE);

I had sent you (private mail) a version of this comment which was more
in line with current reality...  The bit about SLang is no longer true,
and the stuff about selectable is now meaningless (similar commentary
should be in LYConsoleInputFD(), if anywhere).

>Bela<

reply via email to

[Prev in Thread] Current Thread [Next in Thread]