🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Russ Roff Thu, 11 Jun 1998 00:00
INN 2.0 compile problem
#29099
Author: Russ Roff
Date: Thu, 11 Jun 1998 00:00
59 lines
2675 bytes
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?

The output below illustrates the problem -- I'm not sure if the endian is a
big deal (someone with an answer please speak up).  What I'm really stuck on
is the fatal exit at the bottom in waitnb.c.

I have WAITPID included, so the IF statement at the bottom of waitnb.c
processes the IF instead of the ELSE.  If I exclude WAITPID, it bombs on the
ELSE with the same type of Incompatible Pointer Type.  In my futile attempt
at troubleshooting, I changed the w to an &w in the *statusp = WAITVAL(w);
line, and it compiled almost all of the other libs (bombed out later
complaining about a wait call in iosys or something - I think it's
related..)

Any replies would be appreciated, and if you could CC me in e-mail I'd be
happy - I'm installing this because news here blows.

gcc -I../include  -g -O2   -o endian endian.c
endian.c: In function `main':
endian.c:51: warning: return type of `main' is not `int'
./endian >../include/autoconfig.h
gcc -I../include  -g -O2    -c md5.c -o md5.o
gcc -I../include  -g -O2    -c over.c -o over.o
gcc -I../include  -g -O2    -c nonblocking.c -o nonblocking.o
Expect 6 shift/reduce conflicts
bison -y parsedate.y
conflicts:  6 shift/reduce
gcc -I../include  -g -O2    -c parsedate.c -o parsedate.o
parsedate.y:676: warning: `date_lex' was declared implicitly `extern' and
later `static'
/opt/local/share/bison.simple:387: warning: previous declaration of
`date_lex'
parsedate.y:676: warning: `date_lex' was declared implicitly `extern' and
later `static'
..
{snip successfully compiled libs}
..
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

Stop.

Thanks!


Russ Roff
Systems Administrator - Road Runner



Re: INN 2.0 compile problem
#29090
Author: 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   | 

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads