[comp.mail.elm] Tried to e-mail this to syd, but it bounced

prc@erbe.se (Robert Claeson) (05/10/89)

When I tried to compile ELM 2.2 PL5 on an Encore Multimax running UMAX V,
the compile failed tue to some #ifdef SV_INTERRUPT's. UMAX V 2.1 includes a
lot of BSD in the kernel, but some things (like sigvec()) aren't available
for the user. Still, some #defines for them are in the include files.

ELM 2.2 uses the #define SV_INTERRUPT as an indication that the sigvec()
call is there, which fails on our system. The following patch correct this
in the following way:

	o An extra check is added to Configure to see if the sigvec() call
	  is defined in /usr/incldue/signal.h. I also changed some defaults
	  to reflect a system with smart routers and reliable adresses.

	o A few lines are added to config.h.SH to #define or #undef a new
	  constant, SIGVEC, which is used instead of SV_INTERRUPT to see
	  if sigvec() is available.

	o Two #ifdef SV_INTERRUPT's in src/init.c are changed to
	  #ifdef SIGVEC.

This patch is compiled from three non-context diffs and should be sent to
the patch command by using "patch -p < Patch" in the elm 2.2 source 
root directory.

THIS IS AN UNOFFICIAL PATCH that I hope syd@dsi.com will include in a
future official patch.

---- Cut Here and unpack ----
#!/bin/sh
# shar:	Shell Archiver  (v1.22)
#
#	Run the following text with /bin/sh to create:
#	  Patch
#
sed 's/^X//' << 'SHAR_EOF' > Patch &&
XIndex: Configure
X
X53a54
X> d_sigvec=''
X1088,1089c1089,1090
X< "$define") dflt=y;;
X< *)	dflt=n;;
X---
X> "$undef")	dflt=n;;
X> *)		dflt=y;;
X1608c1609
X< *)	   dflt=y;;
X---
X> *)	   dflt=n;;
X2421c2422
X< *)		dflt=n;;
X---
X> *)		dflt=y;;
X2501a2503,2512
X> fi
X> 
X> : see if the sigvec call is available
X> echo " "
X> if $contains 'void.*sigvec' /usr/include/signal.h >/dev/null 2>&1 ; then
X>     echo "You have the sigvec call."
X>     d_sigvec="$define"
X> else
X>     echo "You don't have sigvec's."
X>     d_sigvec="$undef"
X
X
XIndex: config.h.SH
X
X97a98,101
X> /* SIGVEC:
X>  *	This symbol is defined if the sigvec() call is availale. Otherwise
X>  *	the signal() call will be used.
X>  */
X98a103
X> #$d_sigvec	SIGVEC		/**/
X
X
X
XIndex: src/init.c
X
X111c111
X< #ifdef SV_INTERRUPT
X---
X> #ifdef SIGVEC
X214c214
X< #ifdef SV_INTERRUPT
X---
X> #ifdef SIGVEC
SHAR_EOF
chmod 0640 Patch || echo "restore of Patch fails"
exit 0

-- 
          Robert Claeson      E-mail: rclaeson@erbe.se
	  ERBE DATA AB