🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #29090

Re: INN 2.0 compile problem

#29090
From: Heath Kehoe
Date: Thu, 11 Jun 1998 00:00
81 lines
3112 bytes
In news.software.nntp, you wrote:
>I think I'm very close to having INN compiled on my HP9000(HPUX 10.20) but
>I'm having a compile problem that I can't figure out (most likely because I
>have very little C experience).  Can anyone help?

[snip]

>gcc -I../include  -g -O2    -c waitnb.c -o waitnb.o
>waitnb.c: In function `waitnb':
>waitnb.c:33: warning: passing arg 2 of `waitpid' from incompatible pointer
>type
>waitnb.c:39: aggregate value used where an integer was expected
>make: *** [waitnb.o] Error 1
>*** Error exit code 1
>


The problem here is that the HP/UX headers define a 'union wait' (for
BSD compatibility), but the WIFEXITED macro is written to work on an
int (the 'aggregate value' the error message refers to is the union).

The easiest way to deal with this is to turn off HAVE_UNION_WAIT.
The enclosed patch does this, and has a couple of other fixes to
make inn build under HP/UX.  After applying the patch, you'll need
to re-run configure to build a new clibrary.h.


*** ../inn-2.0-dist/include/clibrary.h.in	Mon Jun  8 10:06:15 1998
--- ./include/clibrary.h.in	Thu Jun 11 14:23:19 1998
***************
*** 212,217 ****
--- 212,223 ----
  
  #endif
  
+ #if (defined(__hpux) || defined(hpux)) && defined(HAVE_UNION_WAIT)
+ /* Even though hpux defines a union wait, it's better not to use it.
+  */
+ #undef HAVE_UNION_WAIT
+ #endif
+ 
  #if ! defined(INADDR_NONE) && ! defined(_AIX41)
  #define		INADDR_NONE 	(unsigned long)0xffffffff
  #endif
*** ../inn-2.0-dist/innfeed/misc.c	Mon Jun  8 10:06:15 1998
--- ./innfeed/misc.c	Thu Jun 11 14:42:23 1998
***************
*** 220,225 ****
--- 220,229 ----
  
  static int pvt_h_nerr = (sizeof pvt_h_errlist / sizeof pvt_h_errlist[0]);
  
+ #if defined(hpux) || defined(__hpux)
+ extern int h_errno;
+ #endif
+ 
  /* return a friendly string for the current value of h_errno. Pinched from
     Stevens */
  const char *host_err_str (void)
*** ../inn-2.0-dist/nnrpd/nnrpd.c	Mon Jun  8 10:06:15 1998
--- ./nnrpd/nnrpd.c	Wed Jun 10 12:28:30 1998
***************
*** 283,288 ****
--- 283,289 ----
      union pstun un;
      
      (void)sprintf(buff, "(nnrpd) %s %s", ClientHost, what);
+     un.pst_command = buff;
      (void)pstat(PSTAT_SETCMD, un, strlen(buff), 0, 0);
  #endif	/* defined(HPUX) */
  #endif	/* defined(HAVE_SETPROCTITLE) */



-- 
    Heath A. Kehoe     | "Education is the true foundation of civil liberty."
 System/Network Admin  |                --James Madison
  hakehoe@norand.com   | 

Technical Details
Message-ID: <slrn6o0f2u.nel.hakehoe@darkside.norand.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <6lp1ir$rjd$1@m5.stny.lrun.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6o0f2u.nel.hakehoe@darkside.norand.com>
Subject: Re: INN 2.0 compile problem
Date: Thu, 11 Jun 1998 00:00:00 +0000
From: hakehoe@darkside.norand.com (Heath Kehoe)
References: <6lp1ir$rjd$1@m5.stny.lrun.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 361806637
Organization: Norand Corporation
Newsgroups: news.software.nntp