*BSD News Article 21061


Return to BSD News archive

Xref: sserve comp.unix.bsd:12651 comp.os.386bsd.questions:5177
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!news.kei.com!bloom-beacon.mit.edu!mcrcim.mcgill.edu!sifon!homer.cs.mcgill.ca!storm
From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER)
Newsgroups: comp.unix.bsd,comp.os.386bsd.questions
Subject: Re: NetBSD com port & Emacs questions
Date: 17 Sep 1993 14:53:26 GMT
Organization: SOCS, McGill University, Montreal, Canada
Lines: 352
Message-ID: <27cj16$h78@homer.cs.mcgill.ca>
References: <fenCDHME5.K2z@netcom.com>
NNTP-Posting-Host: mnementh.cs.mcgill.ca

In article <fenCDHME5.K2z@netcom.com>, Fen Labalme <fen@netcom.com> wrote:
>
>Hello.  A few questions w.r.t. NetBSD running on a 486 box.  The first
>two involve device communications, and the last is an emacs question.
>
>( I apologize if these questions have been asked before elsewhere; )
>( I'm new to this news group as well as being new to NetBSD, so... )

	You'll get far more replies if you post to comp.os.386bsd.*,
	the 'official' home of the BSD-du-jour free ports...


>1) I can't change the speed of tty00 (or tty01 for that matter),
>   e.g., this has no effect  (I have commented out associated lines
>   in /etc/ttys):
>
># stty 19200 < /dev/tty00
># stty < /dev/tty00
>speed 9600 baud;
>lflags: echoe echoke echoctl
>iflags: istrip
>cflags: cs7 parenb

	This is the expected behaviour of the serial driver/ports (I
	just asked this same question two weeks ago)

	Basically, any setting changes last as long as the port is
	open.  Thus, when you execute 'stty 19200 < /dev/tty00' you get

	command opens port
	change settings on port
	exit command, resetting port.

	THe way around this is to start whatever comand you want to
	run, such as tip or cu, and then pause it and change the
	settings...  Since the ports are still open, the changes remain
	in effect....

>
>2) When I attempt a TIP anyway (at the unchangable speed of 9600)
>   I get the following error message (what does it mean and how
>   do I fix the problem?):
>
>crw-------    1 root   wheel  8,  0 Sep 17 00:15 /dev/tty00

	Unfortunately, I  got around this problem by executing

	chmod 666 /dev/tty00

	It's ugly, but I have yet to see a better solution....
	I'm currently running everything as root, so there' isn't
	too large a problem...

	The other problem you're going to have is with tip and cu
	bitching about /var/log/aculog not working.  Here's how to fix
	that.

	cd /var/log
	touch aculog
	chown uucp.dialer aculog
	chmod 640 aculog

	Make sure that the entry in newsyslog.conf is happy..

>3) I am trying to compile Emacs 18.59.  I'm using m-intel386.h and
>   s-bsd4-3.h (modified to use the kernel name "netbsd", not "vmunix").
>   
>3a) are these the right files to use (for a 486)?
>
>3b) when I compile, I don't get very far.  Any help will be appreciated!

	There are a lot of problems getting emacs to work under NetBSD 0.9
	because of the new a.out format under the latter.

	One of the core developers of 0.9 posted the following which is
	a patch for emacs 19.17 (which should work under 19.19 I suppose)


						Toodlepi!
						Marc 'em.


A more complete set of diffs for Emacs 19.17 follows.  I have not
updated my Emacs since then.

-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
*** ./config.guess.~1~	Sun Jul 18 04:29:04 1993
--- ./config.guess	Wed Aug 18 21:34:39 1993
***************
*** 118,123 ****
--- 118,129 ----
      CRAY-2:UNICOS:*:*)
  	echo cray2-cray-unicos
          exit 0 ;;
+     hp3[0-9][05]:NetBSD:*:*)
+ 	echo m68k-hp-netbsd${UNAME_RELEASE}
+ 	exit 0 ;;
+     i[34]86:NetBSD:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-netbsd${UNAME_RELEASE}
+ 	exit 0 ;;
      i[34]86:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux
  	exit 0 ;;
*** ./configure.in.~1~	Sun Jul 18 02:02:46 1993
--- ./configure.in	Wed Aug 18 23:14:08 1993
***************
*** 560,565 ****
--- 560,568 ----
    m68*-hp-bsd* )
      machine=hp9000s300 opsys=bsd4-3
    ;;
+   m68*-hp-netbsd* )
+     machine=hp9000s300 opsys=netbsd
+   ;;
    ## HP/UX 7, 8 and 9 are supported on these machines.
    m68*-hp-hpux* )
      case "`uname -r`" in
***************
*** 880,885 ****
--- 883,889 ----
        *-sco3.2v4* )		opsys=sco4 ;;
        *-bsd386* )		opsys=bsd386 ;;
        *-386bsd )	        opsys=386bsd ;;
+       *-netbsd* )	        opsys=netbsd ;;
        ## Otherwise, we'll fall through to the generic opsys code at the bottom.
      esac
    ;;
***************
*** 1000,1006 ****
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" == 0 ] && [ "0${x_libraries}" == 0 ]; then
    ]
      AC_FIND_X
    [
--- 1004,1010 ----
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" = 0 ] && [ "0${x_libraries}" = 0 ]; then
    ]
      AC_FIND_X
    [
***************
*** 1145,1152 ****
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}" in
!   x11:*-lXbsd* )
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
--- 1149,1156 ----
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}:${opsys}" in
!   x11:*-lXbsd*:* | x11:*:386bsd | x11:*:netbsd* )
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
*** ./config.sub.~1~	Sun Jul 18 04:29:03 1993
--- ./config.sub	Sat Jul 31 14:05:50 1993
***************
*** 515,521 ****
  	      | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
! 	      | -386bsd*)
  		;;
  	-sunos5*)
  		os=`echo $os | sed -e 's|sunos5|solaris2|'`
--- 515,521 ----
  	      | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
! 	      | -386bsd* | -netbsd*)
  		;;
  	-sunos5*)
  		os=`echo $os | sed -e 's|sunos5|solaris2|'`
*** ./src/ymakefile.~1~	Sun Jul 18 02:08:49 1993
--- ./src/ymakefile	Sat Jul 31 13:49:27 1993
***************
*** 483,489 ****
     Note that SunOS needs -lm to come before -lc; otherwise, you get
     duplicated symbols.  */
  LIBES = $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
!    LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD
  
  /* Enable recompilation of certain other files depending on system type.  */
  
--- 483,489 ----
     Note that SunOS needs -lm to come before -lc; otherwise, you get
     duplicated symbols.  */
  LIBES = $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
!    LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
  
  /* Enable recompilation of certain other files depending on system type.  */
  
*** ./src/s/netbsd.h.~1~	Sat Jul 31 14:04:08 1993
--- ./src/s/netbsd.h	Wed Aug  4 11:56:58 1993
***************
*** 0 ****
--- 1,30 ----
+ /* s/ file for netbsd system.  */
+ 
+ /* Get most of the stuff from bsd4.3 */
+ #include "bsd4-3.h"
+ 
+ #undef SYSTEM_TYPE
+ #define SYSTEM_TYPE "netbsd"
+ 
+ #undef KERNEL_FILE
+ #define KERNEL_FILE "/netbsd"
+ 
+ #undef LDAV_SYMBOL
+ #define LDAV_SYMBOL "_averunnable"
+ 
+ #define SIGNALS_VIA_CHARACTERS
+ 
+ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
+ 
+ #define A_TEXT_OFFSET(x) (sizeof (struct exec))
+ #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
+ 
+ #define HAVE_SETSID
+ 
+ #define LIBS_DEBUG
+ #define LIBS_SYSTEM -lutil
+ 
+ #define HAVE_GETLOADAVG
+ 
+ /* For mem-limits.h.  */
+ #define BSD4_2
*** ./lisp/paths.el.~1~	Sat May 29 12:05:37 1993
--- ./lisp/paths.el	Wed Aug  4 15:16:31 1993
***************
*** 100,118 ****
  Will use `gnus-startup-file'-SERVER instead if exists.")
  
  (defconst rmail-spool-directory
!   (if (memq system-type '(dgux-unix hpux usg-unix-v unisoft-unix rtu
! 			  irix silicon-graphics-unix))
!       "/usr/mail/"
!     "/usr/spool/mail/")
    "Name of directory used by system mailer for delivering new mail.
  Its name should end with a slash.")
  
  (defconst sendmail-program
!   (if (file-exists-p "/usr/lib/sendmail")
!       "/usr/lib/sendmail"
!     (if (file-exists-p "/usr/ucblib/sendmail")
! 	"/usr/ucblib/sendmail"
!       "fakemail"))			;In ../etc, to interface to /bin/mail.
    "Program used to send messages.")
  
  (defconst term-file-prefix (if (eq system-type 'vax-vms) "[.term]" "term/")
--- 100,122 ----
  Will use `gnus-startup-file'-SERVER instead if exists.")
  
  (defconst rmail-spool-directory
!   (cond
!     ((memq system-type '(dgux-unix hpux usg-unix-v unisoft-unix rtu
! 			 irix silicon-graphics-unix))
!      "/usr/mail/")
!     ((memq system-type '(netbsd))
!      "/var/mail/")
!     (t
!      "/usr/spool/mail/"))
    "Name of directory used by system mailer for delivering new mail.
  Its name should end with a slash.")
  
  (defconst sendmail-program
!   (cond
!     ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
!     ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
!     ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
!     (t "fakemail"))			;In ../etc, to interface to /bin/mail.
    "Program used to send messages.")
  
  (defconst term-file-prefix (if (eq system-type 'vax-vms) "[.term]" "term/")
*** ./configure.~1~	Sat Jul 31 13:25:30 1993
--- ./configure	Wed Aug 18 21:32:06 1993
***************
*** 552,557 ****
--- 552,560 ----
    m68*-hp-bsd* )
      machine=hp9000s300 opsys=bsd4-3
    ;;
+   m68*-hp-netbsd* )
+     machine=hp9000s300 opsys=netbsd
+   ;;
    ## HP/UX 7, 8 and 9 are supported on these machines.
    m68*-hp-hpux* )
      case "`uname -r`" in
***************
*** 872,877 ****
--- 875,881 ----
        *-sco3.2v4* )		opsys=sco4 ;;
        *-bsd386* )		opsys=bsd386 ;;
        *-386bsd )	        opsys=386bsd ;;
+       *-netbsd* )	        opsys=netbsd ;;
        ## Otherwise, we'll fall through to the generic opsys code at the bottom.
      esac
    ;;
***************
*** 1721,1727 ****
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" == 0 ] && [ "0${x_libraries}" == 0 ]; then
    
      # If we find X, set shell vars x_includes and x_libraries to the paths.
  echo checking for X include and library files with xmkmf
--- 1725,1731 ----
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" = 0 ] && [ "0${x_libraries}" = 0 ]; then
    
      # If we find X, set shell vars x_includes and x_libraries to the paths.
  echo checking for X include and library files with xmkmf
***************
*** 1941,1948 ****
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}" in
!   x11:*-lXbsd* )
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
--- 1945,1952 ----
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}:${opsys}" in
!   x11:*-lXbsd*:* | x11:*:386bsd | x11:*:netbsd*)
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----



-- 
----------------------------------------------------------------------------
Marc Wandschneider					    Seattle, WA
	"Satan has a stranglehold on my toilet and he won't let go!"
			   - frm the Weekly World News