Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!natinst.com!hrd769.brooks.af.mil!hrd769.brooks.af.mil!not-for-mail
From: burgess@hrd769.brooks.af.mil (Dave Burgess)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Using emacs under NetBSD-current
Date: 5 Aug 1993 14:15:46 -0500
Organization: Armstrong Laboratory, Brooks AFB, TX
Lines: 258
Message-ID: <23rm9g$h3p@hrd769.brooks.af.mil>
References: <23og5a$4jm@hrd769.brooks.af.mil> <BREZAK.93Aug4160207@york.osf.org>
NNTP-Posting-Host: hrd769.brooks.af.mil
In article <BREZAK.93Aug4160207@york.osf.org> brezak@york.osf.org (John Brezak) writes:
>In article <23og5a$4jm@hrd769.brooks.af.mil> burgess@hrd769.brooks.af.mil (Dave Burgess) writes:
>
> I am trying to recompile emacs (either 19.17 or 18.59) so that I can use
> it under NetBSD current.
>
>If you get a working temacs, but the dumped version is trashed, then add this
>to the config.h (or someplace more appropriate).
>
>/* Say that the text segment of a.out includes the header;
> the header actually occupies the first few bytes of the text segment
> and is counted in hdr.a_text. */
>
>#define A_TEXT_OFFSET(HDR) sizeof (HDR)
>
>/* This is the offset of the executable's text, from the start of the file. */
>
>#define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
>
>(I suspect a *real* patch will be posted soon...)
I recevied this set of patches from this same question. Thanks to
everyone that helped get this working. The emacs that I created with
these changes works flawlessly.
Here is the patchfile I got:
- - - - - - - - - - - - - - Cut Here - - - - - - - - - - - - - - -
These are, hopefully, the changes that will be in Emacs 19.18. Note
that until you get the fixed version of `uname' you will have to
explicitly tell configure what sort of machine it is. I recommend
`i386-unknown-netbsd0.9'.
Unfortunately, there is some bizarre signal lossage when Emacs is
started from rc (the shell I use, not /etc/rc) that I haven't yet
tracked down. It works fine from csh or bash or whatever, though.
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
*** ./config.guess.~1~ Sun Jul 18 04:29:04 1993
--- ./config.guess Wed Aug 4 07:46:54 1993
***************
*** 118,123 ****
--- 118,126 ----
CRAY-2:UNICOS:*:*)
echo cray2-cray-unicos
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 4 07:47:22 1993
***************
*** 880,885 ****
--- 880,886 ----
*-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
[
--- 1001,1007 ----
### 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
--- 1146,1153 ----
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|'`
*** ./configure.~1~ Sat Jul 31 13:25:30 1993
--- ./configure Wed Aug 4 07:47:49 1993
***************
*** 872,877 ****
--- 872,878 ----
*-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
--- 1722,1728 ----
### 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
--- 1942,1949 ----
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
*** ./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. */
*** ./dev/null
--- ./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 11:26:16 1993
***************
*** 100,109 ****
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.")
--- 100,113 ----
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.")
--
------
TSgt Dave Burgess
NCOIC AL/Management Information Systems Office
Brooks AFB, TX