From: takagi@isr.recruit.co.jp (Shigeyuki Takagi)
Subject: Solution: "Cnews install: redeclaration of umask" + MORE BUG INFO
Organization: Media Design Center, Recruit Co. Ltd., Tokyo, JAPAN
Distribution: fj
Date: Wed, 13 Jan 1993 03:50:16 GMT

In article <KIUCHI.93Jan12162027@yagi.sys.meitec.co.jp> kiuchi@sys.meitec.co.jp (Hirohiko KIUCHI) writes:

>Cnews-9205-JP $B$N%$%s%9%H!<%k$r$7$F$$$k$N$G$9$,!"(Bdoit.bin$B$NESCf$G!"(B

>cc -g -I../include -I../relay  -target sun4 -c  active.fast.c
>"../include/libc.h", line 33: redeclaration of umask
>*** Error code 1
>make: Fatal error: Command failed for target `active.fast.o'

>$B$H$$$&%(%i!<$G;_$^$C$F$7$^$$$^$9!#D4$Y$F$_$k$H!"(Bactive.fast.c $B$,!"(B
>include $B$7$F$$$k!"(B

>#include <sys/stat.h>
>#include "libc.h"

>$B$NN>J}$G!"(Bumask() $B$r@k8@$7$F$$$^$9!#(B

$B$H$j$"$($:$=$N@k8@$@$1$r$O$:$;$PNI$$$H$$$&?@8M$5$s$N%U%)%m!<$,$"$j$^$7$?$,!"(B
$B$3$l$O(B PATCHES/known.problems $B$N?7$7$$$b$N$K$O=q$$$F$"$j$^$9!#(B

WIDE $B$J$I$GF|K\8l2=$7$?%Q%C%1!<%8$N(B anonymous ftp $B$,$G$-$k$h$&$K$J$C$?(B
$B8e$GDI2C$5$l$?$b$N$N$h$&$G$9!#(B

$B$*$*$C$T$i$K$O%"%J%&%s%9$5$l$F$$$J$$$i$7$$$N$G$9$,!"(B
uunet $B$N%"!<%+%$%V$J$I$G$O99?7$5$l$F$$$k$=$&$G$9!#(B
 
$B$3$N?7$7$$%U%!%$%k$r:rG/Kv$K(B WIDE $B$N?92<7/$+$i$b$i$C$?$N$G!"(B
$B$3$3$K$D$1$F$*$-$^$9!#(B

$BA0H>$O(B WIDE $B$J$I$G9qFb$+$i(B ftp $B$7$F$-$?$b$N$HF1$8$G$9$,!"DI2C$,$"$j$^$9!#(B

$B$=$l$+$i!"$b$C$HA{$.$K$J$kLdBj$,$"$C$F!"(B
$B!V(BSUN OS 4.1 $B0J9_$G$O(B faster stdio $B$r;H$C$F$O$$$1$J$$!W(B
$B$H=q$$$F$"$j$^$9!#(B

<< known.problems >>
--- cut ------ cut ------ cut ------ cut ------ cut ------ cut ---
This one-line change to relay/control.c will avoid creating $NEWSARTS/fake:
113c113
< 	art->a_status |= synccaches();
---
> 	art->a_status |= actsync();


Failure of the exploder regression test is a known problem (some tars
don't make empty directories).  The fix should be as follows:

#! /bin/sh
cd explode/regress
mkdir master/out.going master/out.going/bar master/out.going/baz 2>/dev/null
mkdir master/out.going/foo out/out.going out/out.going/bar 2>/dev/null
mkdir out/out.going/baz out/out.going/foo 2>/dev/null
>>master/out.going/bar/togo
>>master/out.going/baz/togo
>>master/out.going/foo/togo
>>out/out.going/bar/togo
>>out/out.going/baz/togo
>>out/out.going/foo/togo


Empty Expires: headers (such as produced by Pnews) are not just quietly
deleted by inews.  The fix is to misc/canonhdr.c:

122c122,123
< 		    STREQN(nhdr, expiresnm, STRLEN(expiresnm))) {
---
> 		    STREQN(nhdr, expiresnm, STRLEN(expiresnm)) &&
> 		    nonnull(nhdr+STRLEN(expiresnm))) {
139a141,149
> }
> 
> int
> nonnull(s)
> char *s;
> {
> 	register char *nwp = skipsp(s);
> 
> 	return *nwp != '\n' && *nwp != '\0';


Sites with the SysV tr need to execute this before building C News:

rm inject/stripinvis


The UCB passwd file GCOS field "&" hack in inject/fullname.c contains a
bug; here's the fix:

50c50
< 		(void) strcat(newgcos, cap);
---
> 		(void) strcpy(newgcos + (delim - gcos), cap);


inject/pnews refers to a command named "ersh", which we didn't ship.
Change "ersh" to "rsh" for now.


relay/ctl/alternate is obsolete and interferes with installation; the fix is

rm -rf relay/ctl/alternate


The clever dicks on the POSIX committees gratuitously changed the return
types of a bunch of "standard" functions, in the grand ANSI C tradition
("preserve existing correct code"?  just say no).  A particularly
annoying one is that umask now returns a mode_t, not an int.  If you
can't compile C News because your system has been posixiated, the quick
fix is:

(echo 'g/umask/d'; echo w) | ed h/libc.h


inject/actflag quits early if it encounters a group that is not known
locally.  This diff to inject/actflag.c fixes it:

77,79c77
< 		if (actent == NULL)		/* group not known locally? */
< 			continue;		/* keep trying */
< 
---
> 		if (actent != NULL) {		/* group known locally? */
113c111
< 
---
> 		}


Don't use our faster stdio on SunOS 4.1 and later releases.  stdiock has
been updated to catch this latest incompatibility.

======================================================================

$B0J>e$G$9!#(B
-- 
 $B9bLZ(J $BLP9T(J	($B3t(J)$B%j%/%k!<%H!!%a%G%#%"%G%6%$%s%;%s%?!<(J
 takagi@isr.recruit.co.jp
 03-3536-7770($BBeI=(J)