[comp.emacs] GNU Emacs on Tektronics 4300 workstations

trinkle@PURDUE.EDU (Dan Trinkle) (04/07/88)

     A professor here made the necessary modifications for Tek 4300
workstations.  The major problem was that their exec struct is called
zexec.  Because of this, it is necessary to modify unexec.c slightly.

----------------------------- unexec.c diffs -----------------------------
*** /usr/src/local/bin/gnumacs/dist/src/unexec.c.orig	Thu Feb 11 19:52:58 1988
--- /usr/src/local/bin/gnumacs/dist/src/unexec.c	Thu Mar 31 15:50:13 1988
***************
*** 304,310 ****
--- 304,314 ----
  static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC};
  #define N_TXTOFF(x) TEXT_OFFSET(x)
  #define N_SYMOFF(x) LESYM_OFFSET(x)
+ #ifdef EXEC_STRUCT
+ static struct EXEC_STRUCT hdr, ohdr;
+ #else
  static struct exec hdr, ohdr;
+ #endif /* no EXEC_STRUCT */
  
  #else /* not HPUX */
  
***************
*** 323,329 ****
--- 327,337 ----
       ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
  #define NEWMAGIC FMAGIC
  #else /* IRIS or not USG */
+ #ifdef EXEC_STRUCT
+ static struct EXEC_STRUCT hdr, ohdr;
+ #else
  static struct exec hdr, ohdr;
+ #endif /* no EXEC_STRUCT */
  #define NEWMAGIC ZMAGIC
  #endif /* IRIS or not USG */
  #endif /* not HPUX */
***************
*** 963,969 ****
      struct scnhdr bss_section;
  };
  
! #ifdef IRIS_4D
  #define DEFAULT_ENTRY_ADDRESS start
  #else
  #define DEFAULT_ENTRY_ADDRESS __start
--- 971,977 ----
      struct scnhdr bss_section;
  };
  
! #ifdef IRIS_4D || tek4300
  #define DEFAULT_ENTRY_ADDRESS start
  #else
  #define DEFAULT_ENTRY_ADDRESS __start
----------------------------- m-tek4300.h -----------------------------
/* m- file for tek4300.
   Copyright (C) 1985 Free Software Foundation, Inc.

This file is part of GNU Emacs.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.  No author or distributor
accepts responsibility to anyone for the consequences of using it
or for whether it serves any particular purpose or works at all,
unless he says so in writing.  Refer to the GNU Emacs General Public
License for full details.

Everyone is granted permission to copy, modify and redistribute
GNU Emacs, but only under the conditions described in the
GNU Emacs General Public License.   A copy of this license is
supposed to have been given to you along with GNU Emacs so you
can know your rights and responsibilities.  It should be in a
file named COPYING.  Among other things, the copyright notice
and this notice must be preserved on all copies.  */


/* The following three symbols give information on
 the size of various data types.  */

#define SHORTBITS 16		/* Number of bits in a short */

#define INTBITS 32		/* Number of bits in an int */

#define LONGBITS 32		/* Number of bits in a long */

/* 68000 has lowest-numbered byte as most significant */

#define BIG_ENDIAN


/* Define how to take a char and sign-extend into an int.
   On machines where char is signed, this is a no-op.  */

#define SIGN_EXTEND_CHAR(c) (c)

/* Use type int rather than a union, to represent Lisp_Object */

#define NO_UNION_TYPE

/* Data type of load average, as read out of kmem.  */

#define LOAD_AVE_TYPE long

/* Convert that into an integer that is 100 for a load average of 1.0  */

#define LOAD_AVE_CVT(x) (x)

/* Define NO_REMAP if memory segmentation makes it not work well
   to change the boundary between the text section and data section
   when Emacs is dumped.  If you define this, the preloaded Lisp
   code will not be sharable; but that's better than failing completely.  */

#define NO_REMAP

/* Define C_ALLOCA if this machine does not support a true alloca
   and the one written in C should be used instead. */

#define C_ALLOCA

/* setjmp and longjmp can safely replace _setjmp and _longjmp, */

#define _longjmp longjmp
#define _setjmp setjmp

/* The text segment always starts at a fixed address.
   This way we don't need to have a label _start defined.  */

#define TEXT_START 0

/* The Tektronix exec struct for ZMAGIC files is struct zexec */

#define EXEC_STRUCT zexec

#define tek4300
----------------------------------------------------------------------

Daniel Trinkle			trinkle@cs.purdue.edu			ARPA
Department of Computer Sciences	trinkle%purdue.edu@relay.cs.net		CSNET
Purdue University		{ucbvax,decvax,ihnp4}!purdue!trinkle	UUCP
West Lafayette, IN 47907	(317) 494-7844				PHONE