Subject: Compiling on DG/UX

From: Dion Vansevenant <[email-masked]>
Date: Sun, 28 Aug 1994 16:18:26 -0400 (EDT)

Could some kind soul please help me? I was compiling pine 3.90 on our 
system and received the following error during c-client compilation:

   tcp_unix.c: In function 'tcp_open':
   In file included from os_d-g.c:58:
   tcp_unix.c:73: incompatible type in assignment
   Fatal error in /usr/lib/gcc/cc1
   Exit status 041

I went into tcp_unix and found this at line 73+:

    if ((sin.sin_addr.s_addr = inet_addr (hostname)) != -1) {
      sin.sin_family = AF_INET;	/* family is always Internet */
      strcpy (hostname,host);	/* hostname is user's argument */

I seem to remember something about the sin.sin_addr.s_addr from before 
when I first tried to get pine. Does anyone know what the problem might 
be? It looks like this failure caused a complete installation failure as 
well. Any help would be greatly apprciated. TIA

Dion

*----------------------------------------------*
| Dion Vansevenant        [email-masked]        |
| Systems Administrator                        |
| Faxon/SMS Canada Ltd.   (519) 472-1006 voice |
| P.O. Box 2382           (519) 472-1072 fax   |
| London, ON                                   | 
| Canada N6A 5A7                               |
*----------------------------------------------*

If you don't change your direction - you're bound to end up where you're headed.
                                                               - Chinese Proverb

---

From: Ken Weaverling <[email-masked]>
Date: Sun, 28 Aug 1994 21:25:00 -0400 (EDT)

> system and received the following error during c-client compilation:
[snip]
>       strcpy (hostname,host);	/* hostname is user's argument */

You are NOT yet upgraded to DG/UX 5.4R3.00, are you?  The prototype for
that function was not "standard" in earlier releases. They fixed it in R3.00.
You'll have to correct the prototype in the header file, or kludge on
into the os header file just to get you by until you upgrade.

BTW, I have DG/UX 5.4R3.00 and just did a "build d-g" and it complied 
perfectly. In fact, am using it now to post!

---

From: Mark Crispin <[email-masked]>
Date: Sun, 28 Aug 1994 18:40:27 -0700 (PDT)

Hi -

Could you check your system include files, specifically, arpa/inet.h and
netinet/in.h, to see the prototype of inet_addr() and the definition
of the s_addr member of the in_addr struct?

On every Unix system that I've seen, they are both unsigned long.  One or
the other may be u_long which is the same thing.

-- Mark --

---

From: Mat Waugh - MMTSI - RTP x1342 <[email-masked]>
Date: Mon, 29 Aug 1994 13:42:41 -0400 (EDT)

For those interested in the fix for DG/UX versions prior to 5.4.3 change 
the line
    if ((sin.sin_addr.s_addr = inet_addr (hostname)) != -1) {
to be
    if ((sin.sin_addr.s_addr = (inet_addr (hostname)).s_addr) != -1) {
this takes care of DGUX's strange but endearing handling of inet_addr.

On DG/UX 5.4.3 it all compiles with no problems of course.

Mat

--
Mat Waugh                                [email-masked]
Martin Marietta Technical Services  
In Support of U.S. EPA                   Voice 919.541.1342 Fax 919.541.1948
Unix and GIS Technical Services (UGTS)

---

From: Dion Vansevenant <[email-masked]>
Date: Mon, 29 Aug 1994 15:29:00 -0400 (EDT)

> On DG/UX 5.4.3 it all compiles with no problems of course.

Thanks Mat, will try this. Once we upgrade to 5.4.3 then I guess I'll 
have to rebuild Pine the way it came, won't I? This is good to know in 
advance.

Dion