*BSD News Article 20943


Return to BSD News archive

Xref: sserve comp.os.386bsd.apps:441 gnu.emacs.help:12176
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!aardvark.ucs.uoknor.edu!ns1.nodak.edu!netnews.nwnet.net!ogicse!emory!nigel.msen.com!yale.edu!yale!gumby!wupost!howland.reston.ans.net!vixen.cso.uiuc.edu!usenet.ucs.indiana.edu!depaul!falcon.depaul.edu!acsdcn
Newsgroups: comp.os.386bsd.apps,gnu.emacs.help
Subject: Porting emacs to NetBSD 0.9
Message-ID: <1993Sep14.132045.22947@hal.depaul.edu>
From: acsdcn@falcon.depaul.edu (Dave Nelson)
Date: 14 Sep 93 13:20:45 GMT
Sender: news@hal.depaul.edu (News Admin)
Organization: DePaul University, Chicago
Article-I.D.: hal.1993Sep14.132045.22947
Nntp-Posting-Host: falcon.depaul.edu
Lines: 47


	There have been a number of postings about how to get emacs to
dump correctly under NetBSD 0.9.  Most of these have been about how to
set various flags for the linker.

	It is possible (and very easy) to make emacs dump properly without
having to do anything with the linker and without having to butcher any
emacs source files.

	You need to make sure that the following lines are in your s/386bsd.h
file:

#undef KERNEL_FILE
#define KERNEL_FILE "/netbsd"

#define A_TEXT_OFFSET(x)    (sizeof (struct exec))
#define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))

	That's it.  The A_TEXT_* stuff comes straight from the s/bsd386.h
file.  You might recall that one of the purposes of going to the new
exec format was, among other things, to have the same exec format as
bsd386 and thus have binary compatability.

	I built emacs 19.18 using this method and it has been working fine
for me -- no linker magic needed.

dcn@ignatz$ file /usr/gnu/bin/emacs
/usr/gnu/bin/emacs: sticky netbsd/i386 demand paged executable
dcn@ignatz$ 

	Hope this helps someone.

/dcn
Dave Nelson
/* For mem-limits.h.  */
#define BSD4_2

/* This affects a declaration in xrdb.c.  */
#define DECLARE_GETPWUID_WITH_UID_T

/* Reread the time zone on startup.  */
#define LOCALTIME_CACHE

/* rich@lamprey.utmb.edu says needed for job control in subshells.  */
#define HAVE_SETSID

#define HAVE_XFREE386