Subject: Re: pine 3.91 compile on DGUX

From: [email-masked] (Ken Weaverling)
Date: 27 Oct 1994 01:07:48 -0400

In article <[email-masked]>, Joe Cygan <[email-masked]> wrote:
>I just downloaded the latest pine.  I tried to build it on my Aviion.  I also
>followed the suggestion from the post here a few days ago.  I get the following
>error in the compile
>
>tcp_unix.c: In function `tcp_open':
>In file included from os_d-g.c:59:
>ucp_unix.c:114: incompatible types in assignment

This is fast becoming a FAQ!

Quick answer, upgrade to DG/UX 5.4.3! :-)

... else you need to change the prototype for inet_addr yourself or 
override it.

>From the release notes for 5.4.3R3.00...

        /usr/include/arpa/inet.h has a revised prototype for
        inet_addr(3N), which converts dot notation Internet addresses
        into internal form.  The return type changed from a struct
        in_addr to an unsigned long to comply with prevailing practice
        and standards such as OCS Net.  There is no object or binary
        impact because both return types are returned the same way by the
        compiler, as required by OCS.

        The types of source code changes required include:
        (struct in_addr) = inet_addr; becomes
        (struct in_addr).s_addr = inet_addr;
        and
        (unsigned long) = inet_addr.s_addr; becomes
        (unsigned long) = inet_addr;

So the *correct* prototype should look like...

       unsigned long inet_addr(char *cp);

-- 
Ken Weaverling          [email-masked] |*|  Wilmington: +1 302 573-5460
    Manager of Computer Services       |*|     Stanton: +1 302 454-3978
   Stanton/Wilmington Campuses of      |*|       WHOIS: KJW
Delaware Technical & Community College |*|