*BSD News Article 2984


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!mips!mips!sdd.hp.com!caen!destroyer!uunet!mcsun!Germany.EU.net!unido!horga!ruhr.de!freeside!wiljo
From: wiljo@freeside.ki.open.de (Wiljo Heinen)
Newsgroups: comp.unix.bsd
Subject: Re: ELM wanted (patch included)
Keywords: ELM
Message-ID: <BsDnK0.7Ko@freeside.ki.open.de>
Date: 2 Aug 92 22:23:59 GMT
References: <l7ctu0INN880@neuro.usc.edu> <158bshINNt1b@disaster.Germany.EU.net> <1992Jul30.094534.180@unibi.uni-bielefeld.de>
Organization: OPeN - The Digital Advantage
Lines: 483

ugewa001@unibi.uni-bielefeld.de (0134) writes:


>Hello there in netland

>*****************************************
> Did anyone get ELM to work under BSD0.1??
>*****************************************

Yup. Following is a shar-file, that contains my patches plus a config.sh
that you may base your configuration upon.

I had to patch tolower/toupper in lib.c (see attached shar). Now is this
a bug or a feature ??? ELM certainly doesn't work with the original tolower().

Anyway: Doing a "sh Configure" after following patches have been applied 
still chokes up, but compilation works. (now, if I had someone explain
to me the differences of 386bsd's sh to "the original" sh, I might even
fix that).

How to use these patches:

1. cd <elm_src_dir>
2. extract attached shar
3. su - root
   patch -p0 < patch.isctype
   cd /usr/src/lib/libc/gen
   cc -c isctype.c
   ar -d /usr/lib/libc.a isctype.o
   ar -r /usr/lib/libc.a isctype.o
   ranlib /usr/libc/libc.a
4. cd <_elm_src_dir>
   patch -p0 < patch.386bsd
5. sh Configure
6. make

have fun !
---------------------------cut here -----------------------------------------
   
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patch.386bsd
#	patch.isctype
#	config.sh
#
echo x - patch.386bsd
sed 's/^X//' >patch.386bsd << 'END-of-patch.386bsd'
X*** ./src/opt_utils.c	Thu Jun  7 20:46:33 1990
X--- ../../elm23/./src/opt_utils.c	Sun Aug  2 14:48:38 1992
X***************
X*** 29,34 ****
X--- 29,36 ----
X  #include "headers.h"
X  #include <ctype.h>
X  
X+ #define _POSIX_SOURCE
X+ 
X  #ifdef PWDINSYS
X  #  include <sys/pwd.h>
X  #else
X*** ./Makefile.SH	Thu Jun  7 20:45:09 1990
X--- ../../elm23/./Makefile.SH	Sun Aug  2 14:26:01 1992
X***************
X*** 59,68 ****
X  
X  #	Targets that are simply executed in each subordinate makefile as is
X  all install uninstall lint clean:
X! 		cd src; $(MAKE) -$(MAKEFLAGS) $@
X! 		cd utils; $(MAKE) -$(MAKEFLAGS) $@
X! 		cd filter; $(MAKE) -$(MAKEFLAGS) $@
X! 		cd doc; $(MAKE) -$(MAKEFLAGS) $@
X  
X  #	Targets that apply to all elm at once
X  listing:
X--- 59,68 ----
X  
X  #	Targets that are simply executed in each subordinate makefile as is
X  all install uninstall lint clean:
X! 		cd src; $(MAKE) $(MAKEFLAGS) $@
X! 		cd utils; $(MAKE) $(MAKEFLAGS) $@
X! 		cd filter; $(MAKE) $(MAKEFLAGS) $@
X! 		cd doc; $(MAKE) $(MAKEFLAGS) $@
X  
X  #	Targets that apply to all elm at once
X  listing:
X***************
X*** 76,85 ****
X  		  $(ECHO) "ELM on the remote machine <$(REMOTE)>. If this is";\
X  		  $(ECHO) "not the case, interrupt this process quickly!";\
X  		  $(SLEEP) 10;)
X! 		cd src; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X! 		cd filter; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X! 		cd utils; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X! 		cd doc; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X  
X  rmt-defined:
X  	@(if [ "$(REMOTE)" = "" ];\
X--- 76,85 ----
X  		  $(ECHO) "ELM on the remote machine <$(REMOTE)>. If this is";\
X  		  $(ECHO) "not the case, interrupt this process quickly!";\
X  		  $(SLEEP) 10;)
X! 		cd src; $(MAKE) $(MAKEFLAGS) REMOTE=$(REMOTE) $@
X! 		cd filter; $(MAKE) $(MAKEFLAGS) REMOTE=$(REMOTE) $@
X! 		cd utils; $(MAKE) $(MAKEFLAGS) REMOTE=$(REMOTE) $@
X! 		cd doc; $(MAKE) $(MAKEFLAGS) REMOTE=$(REMOTE) $@
X  
X  rmt-defined:
X  	@(if [ "$(REMOTE)" = "" ];\
X***************
X*** 99,108 ****
X  
X  #	Targets that are really in subordinate make files
X  documentation:
X! 	cd doc; $(MAKE) -$(MAKEFLAGS) $@
X  
X  elm:
X! 	cd src; $(MAKE) -$(MAKEFLAGS) all
X  
X  #	The dummy dependency here prevents make from thinking the target is the
X  #	filter directory that sits in the current directory, rather than
X--- 99,108 ----
X  
X  #	Targets that are really in subordinate make files
X  documentation:
X! 	cd doc; $(MAKE) $(MAKEFLAGS) $@
X  
X  elm:
X! 	cd src; $(MAKE) $(MAKEFLAGS) all
X  
X  #	The dummy dependency here prevents make from thinking the target is the
X  #	filter directory that sits in the current directory, rather than
X***************
X*** 110,116 ****
X  filter: _filter
X  
X  _filter:
X! 	cd filter; $(MAKE) -$(MAKEFLAGS) all
X  
X  #	The dummy dependency here prevents make from thinking the target is the
X  #	utils directory that sits in the current directory, rather than
X--- 110,116 ----
X  filter: _filter
X  
X  _filter:
X! 	cd filter; $(MAKE) $(MAKEFLAGS) all
X  
X  #	The dummy dependency here prevents make from thinking the target is the
X  #	utils directory that sits in the current directory, rather than
X***************
X*** 118,123 ****
X  utils: _utils
X  
X  _utils:
X! 	cd utils; $(MAKE) -$(MAKEFLAGS) all
X  
X  !NO!SUBS!
X--- 118,123 ----
X  utils: _utils
X  
X  _utils:
X! 	cd utils; $(MAKE) $(MAKEFLAGS) all
X  
X  !NO!SUBS!
X*** ./Configure	Tue Jun 26 07:08:39 1990
X--- ../../elm23/./Configure	Sun Aug  2 13:18:31 1992
X***************
X*** 246,252 ****
X  : Now test for existence of everything in MANIFEST
X  
X  echo "First let's make sure your kit is complete.  Checking..."
X! (cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
X  echo "Looks good..."
X  
X  attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
X--- 246,252 ----
X  : Now test for existence of everything in MANIFEST
X  
X  echo "First let's make sure your kit is complete.  Checking..."
X! #(cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
X  echo "Looks good..."
X  
X  attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
X***************
X*** 1200,1219 ****
X  cppflags="$ccflags"
X  case "$cc" in
X  *gcc*) cppflags="$cppflags -D__GNUC__";;
X- esac
X- case "$cppflags" in
X- '');;
X- *)  set X $cppflags
X-     cppflags=''
X-     for flag do
X- 	case $flag in
X- 	-D*|-I*) cppflags="$cppflags $flag";;
X- 	esac
X-     done
X-     case "$cppflags" in
X-     *-*)  echo "(C preprocessor flags: $cppflags)";;
X-     esac
X-     ;;
X  esac
X  
X  if $test -n "$xenlf" ; then
X--- 1200,1205 ----
END-of-patch.386bsd
echo x - patch.isctype
sed 's/^X//' >patch.isctype << 'END-of-patch.isctype'
X*** /usr/src/lib/libc/gen/isctype.c.org	Sun Aug  2 15:57:58 1992
X--- /usr/src/lib/libc/gen/isctype.c	Sun Aug  2 15:58:09 1992
X***************
X*** 119,125 ****
X  tolower(c)
X  	int c;
X  {
X! 	return((c) - 'A' + 'a');
X  }
X  
X  #undef toupper
X--- 119,126 ----
X  tolower(c)
X  	int c;
X  {
X! /* was: 	return((c) - 'A' + 'a'); */
X! 	return ( isupper(c) ? c - 'A' + 'a' : c);
X  }
X  
X  #undef toupper
X***************
X*** 126,130 ****
X  toupper(c)
X  	int c;
X  {
X! 	return((c) - 'a' + 'A');
X  }
X--- 127,132 ----
X  toupper(c)
X  	int c;
X  {
X! /* was: 	return((c) - 'a' + 'A'); */
X! 	return ( islower(c) ? c - 'a' + 'A' : c);
X  }
END-of-patch.isctype
echo x - config.sh
sed 's/^X//' >config.sh << 'END-of-config.sh'
X: use /bin/sh
X# config.sh
X# This file was produced by running the Configure script.
X
Xdefine='define'
Xeunicefix=':'
XLog='$Log'
XHeader='$Header'
Xbin='/usr/local/bin'
Xbyteorder='1234'
Xcontains='grep'
Xcppstdin='/usr/bin/cpp'
Xcppminus=''
Xd_crypt='define'
Xcryptlib=''
Xd_getopt='define'
Xd_havetlib='define'
Xtermlib='-ltermlib'
Xd_mkdir='define'
Xd_portable='undef'
Xd_rename='define'
Xd_sigvec='define'
Xd_sigvectr='undef'
Xd_symlink='define'
Xd_vfork='define'
Xd_whoami='undef'
Xdefeditor='/usr/bin/vi'
Xhostname='kiel'
Xphostname='hostname'
Xmydomain='.ki.open.de'
Xi_time='undef'
Xi_systime='define'
Xd_systimekernel='undef'
Xmaildir='/var/mail'
Xn='-n'
Xc=''
Xpackage='elm2'
Xpager='builtin+'
Xprefshell='/bin/csh'
Xspitshell='cat'
Xshsharp='true'
Xsharpbang=': use '
Xstartsh=': use /bin/sh'
Xd_eunice='undef'
Xloclist='
Xcat
Xchgrp
Xchmod
Xcp
Xecho
Xexpr
Xgrep
Xln
Xls
Xmake
Xmv
Xrm
Xsed
Xsleep
Xtouch
Xtr
X'
Xexpr='/bin/expr'
Xsed='/usr/bin/sed'
Xecho='/bin/echo'
Xcat='/bin/cat'
Xrm='/bin/rm'
Xmv='/bin/mv'
Xcp='/bin/cp'
Xtail=''
Xtr='/usr/bin/tr'
Xmkdir=''
Xsort=''
Xuniq=''
Xgrep='/usr/bin/grep'
Xtrylist='
XMcc
Xcpp
Xdate
Xemacs
Xline
Xlint
Xlp
Xlpr
Xmailx
Xmore
Xnroff
Xpg
Xpr
Xrmail
Xsendmail
Xshar
Xsmail
Xsubmit
Xtar
Xtbl
Xtest
Xtroff
Xuname
Xuuname
Xvi
X'
Xtest='test'
Xinews=''
Xegrep=''
Xmore='/usr/bin/more'
Xpg='pg'
XMcc='Mcc'
Xvi='/usr/bin/vi'
Xmailx='mailx'
Xmail=''
Xcpp='/usr/bin/cpp'
Xperl=''
Xemacs='emacs'
Xls='/bin/ls'
Xrmail='/bin/rmail'
Xsendmail=''
Xshar='/usr/bin/shar'
Xsmail='smail'
Xsubmit=''
Xtbl='/usr/bin/tbl'
Xtroff='/usr/bin/troff'
Xnroff='/usr/bin/nroff'
Xuname='uname'
Xuuname='/usr/bin/uuname'
Xline='line'
Xchgrp='/usr/bin/chgrp'
Xchmod='/bin/chmod'
Xlint='lint'
Xsleep='/bin/sleep'
Xpr='/usr/bin/pr'
Xtar='/usr/bin/tar'
Xln='/bin/ln'
Xlpr='/usr/bin/lpr'
Xlp='lp'
Xtouch='/usr/bin/touch'
Xmake='/usr/bin/make'
Xdate='/bin/date'
Xcsh=''
Xc_date='Sun Aug  2 15:20:31 GMT 1992'
Xd_calendar='define'
Xcalendar='calendar'
Xd_cuserid='undef'
Xd_flock='define'
Xd_flockonly='undef'
Xlock_dir='/var/spool/uucp'
Xd_gethname='define'
Xd_douname='undef'
Xd_phostname='undef'
Xd_host_comp='undef'
Xd_havedbm='undef'
Xdbm=''
Xd_index='undef'
Xd_internet='define'
Xd_mboxedit='undef'
Xd_mmdf='undef'
Xd_newauto='undef'
Xd_nfs='define'
Xd_networkorder='define'
Xd_noxheader='undef'
Xd_optreturn='undef'
Xd_pafirst='undef'
Xd_notouchadd='define'
Xd_noaddfrom='undef'
Xd_usedomain='define'
Xd_nocheckvalid='undef'
Xd_pidcheck='define'
Xd_ptem='undef'
Xd_remlock='undef'
Xmaxattempts='6'
Xd_setgid='undef'
Xmailermode='755'
Xd_strcspn='define'
Xd_strspn='define'
Xd_strings='undef'
Xd_pwdinsys='undef'
Xstrings='/usr/include/string.h'
Xincludepath=''
Xd_subshell='define'
Xd_tempnam='define'
Xtempnamo=''
Xtempnamc=''
Xd_termio='undef'
Xd_termios='define'
Xd_tz_min='define'
Xd_useembed='define'
Xd_utimbuf='define'
Xd_voidsig='define'
Xdefbatsub='no subject (file transmission)'
Xelmalias='503'
Xmaxsysalias='503'
Xmaxuseralias='251'
Xlib='/usr/local/lib'
Xlibc='/usr/lib/libc.a'
Xlinepr='/usr/bin/lpr'
Xmailer='/bin/rmail'
Xmailgrp='wheel'
Xmansrc='/usr/share/man/man1'
Xmanext='1'
Xmodels='none'
Xsplit=''
Xsmall=''
Xmedium=''
Xlarge=''
Xhuge=''
Xoptimize='-O'
Xccflags='-traditional '
Xcppflags='-traditional '
Xldflags=''
Xcc='cc'
Xlibs=''
Xnametype='bsd'
Xd_passnames='define'
Xd_berknames='define'
Xd_usgnames='undef'
Xpasscat='cat /etc/passwd'
Xpathalias='/usr/local/lib/smail/paths'
Xdomains='/usr/lib/domains'
Xrmttape='unknown-remote-tape-unit'
Xroff='/usr/bin/troff'
Xtmpdir='/tmp'
Xxencf=''
Xxenlf=''
Xd_xenix='undef'
Xd_bsd='define'
XCONFIG=true
END-of-config.sh
exit

-- 
wiljo@kiel.uucp            voice:+49 431 95311              fax: +49 431 978126
               "Alle woll'n was von mir haben / keiner will was von mir wissen"
                                       Die Lassie Singers --- "P.A.R.A.N.O.I.D"