Return to BSD News archive
Newsgroups: comp.os.386bsd.apps Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!uunet!mcsun!ieunet!dec4ie.ieunet.ie!jkh From: jkh@whisker.lotus.ie (Jordan K. Hubbard) Subject: Here are some diffs for lemacs 19.4 Message-ID: <JKH.93Mar29131631@whisker.lotus.ie> Sender: usenet@ieunet.ie (USENET News System) Nntp-Posting-Host: whisker.lotus.ie Organization: Lotus Development Ireland Date: Mon, 29 Mar 1993 13:16:31 GMT Lines: 638 Here are some diffs that should help in getting my port of lemacs 19.4 to compile under 386bsd. I did this port in isolation to the 19.3 port (I didn't know about it until I finished mine!), so any problems that exist with this one are purely my fault. Unpack the lemacs distribtion and cd to the top level directory (lemacs-19.4), where you should unshar this file. It will unpack the m- and s- files I put together. Apply the diffs and you should be in business. Note that I just diff'd my working sources, which means you get all my preferences as well. If you strongly dislike having things in /usr/gnu then you should edit the Makefile as well. Finally, I didn't include diffs for etc/ because no changes there were necessary, you may however wish to edit etc/Makefile to use gcc2 if you're a gcc 2.3.3 fan. I did. Let me know if this gives you any grief. Jordan # 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: # # lemacs.diffs # src/m/m-486.h # src/s/s-386bsd.h # echo x - lemacs.diffs sed 's/^X//' >lemacs.diffs << 'END-of-lemacs.diffs' Xdiff +recursive +context lemacs-19.4.orig/Makefile lemacs-19.4/Makefile X*** lemacs-19.4.orig/Makefile Wed Jan 13 22:08:59 1993 X--- lemacs-19.4/Makefile Mon Mar 8 19:27:05 1993 X*************** X*** 15,23 **** X X # Where to install things X # Note that on system V you must change MANDIR to /use/local/man/man1. X! LIBDIR= /usr/local/emacs X! BINDIR= /usr/local/bin X! MANDIR= /usr/man/man1 X X # Flags passed down to subdirectory makefiles. X MFLAGS= X--- 15,23 ---- X X # Where to install things X # Note that on system V you must change MANDIR to /use/local/man/man1. X! LIBDIR= /usr/gnu/lib/emacs X! BINDIR= /usr/gnu/bin X! MANDIR= /usr/gnu/man/man1 X X # Flags passed down to subdirectory makefiles. X MFLAGS= Xdiff +recursive +context lemacs-19.4.orig/src/callproc.c lemacs-19.4/src/callproc.c X*** lemacs-19.4.orig/src/callproc.c Wed Jan 20 17:17:45 1993 X--- lemacs-19.4/src/callproc.c Sun Mar 7 03:09:06 1993 X*************** X*** 406,412 **** X--- 406,414 ---- X extern void close_process_descs (void); X extern void setpgrp_of_tty (int); X X+ #ifndef __386BSD__ X extern pid_t setpgrp (); X+ #endif X X void X child_setup (in, out, err, new_argv, env) Xdiff +recursive +context lemacs-19.4.orig/src/config.h lemacs-19.4/src/config.h X*** lemacs-19.4.orig/src/config.h Mon Jan 18 00:24:53 1993 X--- lemacs-19.4/src/config.h Mon Mar 8 02:50:07 1993 X*************** X*** 42,48 **** X the s- files to use for them. See s-template.h for documentation on X writing s- files. X */ X! #include "s/s-sunos4shr.h" X X /* Include here a m- file that describes the machine and system you use. X See the file ../etc/MACHINES for a list of machines and the names of X--- 42,48 ---- X the s- files to use for them. See s-template.h for documentation on X writing s- files. X */ X! #include "s/s-386bsd.h" X X /* Include here a m- file that describes the machine and system you use. X See the file ../etc/MACHINES for a list of machines and the names of X*************** X*** 49,55 **** X the m- files to use for them. See m-template.h for info on what m- X files should define. X */ X! #include "m/m-sparc.h" X X /* Load in the conversion definitions if this system X needs them and the source file being compiled has not X--- 49,55 ---- X the m- files to use for them. See m-template.h for info on what m- X files should define. X */ X! #include "m/m-486.h" X X /* Load in the conversion definitions if this system X needs them and the source file being compiled has not X*************** X*** 120,126 **** X /* Define LISP_FLOAT_TYPE if you want emacs to support floating-point X numbers. */ X X! #define LISP_FLOAT_TYPE X X /* Define this for new syntax parsing code that works with C++ mode. */ X #define NEW_SYNTAX X--- 120,126 ---- X /* Define LISP_FLOAT_TYPE if you want emacs to support floating-point X numbers. */ X X! /* #define LISP_FLOAT_TYPE */ X X /* Define this for new syntax parsing code that works with C++ mode. */ X #define NEW_SYNTAX X*************** X*** 150,156 **** X to do this, let us know and we'll put them there in the next release. X */ X /* #define NEED_STRDUP */ X! /* #define NEED_REALPATH */ X X X /* Define REL_ALLOC if you want to use the relocating allocator for X--- 150,156 ---- X to do this, let us know and we'll put them there in the next release. X */ X /* #define NEED_STRDUP */ X! #define NEED_REALPATH X X X /* Define REL_ALLOC if you want to use the relocating allocator for Xdiff +recursive +context lemacs-19.4.orig/src/emacs.c lemacs-19.4/src/emacs.c X*** lemacs-19.4.orig/src/emacs.c Wed Jan 20 01:41:34 1993 X--- lemacs-19.4/src/emacs.c Sat Mar 6 22:46:24 1993 X*************** X*** 141,147 **** X--- 141,151 ---- X /* If we are controlling the terminal, reset terminal modes */ X #ifdef BSD X if (ioctl(0, TIOCGPGRP, &tpgrp) == 0 X+ #ifdef __386BSD__ X+ && tpgrp == getpgrp ()) X+ #else X && tpgrp == getpgrp (0)) X+ #endif X #endif /* BSD */ X { X reset_sys_modes (); X*************** X*** 552,559 **** X--- 556,565 ---- X X extern void malloc_warning (); X X+ #ifndef __386BSD__ X #ifdef BSD X extern pid_t setpgrp (); X+ #endif X #endif X X #ifdef RUN_TIME_REMAP Xdiff +recursive +context lemacs-19.4.orig/src/fileio.c lemacs-19.4/src/fileio.c X*** lemacs-19.4.orig/src/fileio.c Wed Jan 20 01:42:13 1993 X--- lemacs-19.4/src/fileio.c Sun Mar 7 00:08:14 1993 X*************** X*** 1089,1095 **** X static int retrying_write (int, char *, int); X X #if defined(HAVE_TIMEVAL) && !defined(USE_UTIME) X! #if !defined(IRIX) && !defined(NeXT) X extern int utimes (char *, struct timeval *); X #endif X #endif X--- 1089,1095 ---- X static int retrying_write (int, char *, int); X X #if defined(HAVE_TIMEVAL) && !defined(USE_UTIME) X! #if !defined(IRIX) && !defined(NeXT) && !defined(__386BSD__) X extern int utimes (char *, struct timeval *); X #endif X #endif Xdiff +recursive +context lemacs-19.4.orig/src/fns.c lemacs-19.4/src/fns.c X*** lemacs-19.4.orig/src/fns.c Sun Jan 17 18:58:04 1993 X--- lemacs-19.4/src/fns.c Sun Mar 7 01:09:02 1993 X*************** X*** 119,126 **** X--- 119,128 ---- X return arg; X } X X+ #ifndef __386BSD__ X extern int random (); X extern void srandom (); X+ #endif X X DEFUN ("random", Frandom, Srandom, 0, 1, 0, X "Return a pseudo-random number.\n\ Xdiff +recursive +context lemacs-19.4.orig/src/lisp.h lemacs-19.4/src/lisp.h X*** lemacs-19.4.orig/src/lisp.h Wed Jan 20 17:18:14 1993 X--- lemacs-19.4/src/lisp.h Mon Mar 8 02:50:14 1993 X*************** X*** 36,43 **** X--- 36,45 ---- X # include <sysent.h> X # endif X X+ #ifndef __386BSD__ X #ifndef index X extern char *index (const char *, char); X+ #endif X #endif X X #ifdef NeXT Xdiff +recursive +context lemacs-19.4.orig/src/lwlib/Imakefile lemacs-19.4/src/lwlib/Imakefile X*** lemacs-19.4.orig/src/lwlib/Imakefile Wed Jan 20 17:31:37 1993 X--- lemacs-19.4/src/lwlib/Imakefile Sun Mar 7 14:04:48 1993 X*************** X*** 84,91 **** X # define DoNormalLib YES X #endif X #include <Library.tmpl> X! EXT_DEFINES = -DTHIS_IS_X11R5 -DINCLUDE_ALLOCA_H X! WHICH_X = x11r5 X #else /* !5 */ X EXT_DEFINES = "ERROR! Imakefile was unable to determine whether this is X11r4 or X11r5." X #endif /* !5 */ X--- 84,91 ---- X # define DoNormalLib YES X #endif X #include <Library.tmpl> X! EXT_DEFINES = -DTHIS_IS_X11R5 X! WHICH_X = usr1/X11.5 X #else /* !5 */ X EXT_DEFINES = "ERROR! Imakefile was unable to determine whether this is X11r4 or X11r5." X #endif /* !5 */ Xdiff +recursive +context lemacs-19.4.orig/src/mem_limits.h lemacs-19.4/src/mem_limits.h X*** lemacs-19.4.orig/src/mem_limits.h Mon Jun 29 15:26:48 1992 X--- lemacs-19.4/src/mem_limits.h Mon Mar 8 02:22:14 1993 X*************** X*** 26,31 **** X--- 26,37 ---- X #include <sys/resource.h> X #endif /* BSD4_2 */ X X+ #ifdef __386BSD__ X+ #include <sys/types.h> X+ #include <sys/time.h> X+ #include <sys/resource.h> X+ #endif X+ X #ifdef __STDC__ X typedef void *POINTER; X #else X*************** X*** 57,63 **** X X X X! #ifdef USG X X get_lim_data () X { X--- 63,69 ---- X X X X! #if defined(USG) X X get_lim_data () X { X*************** X*** 73,79 **** X } X X #else /* not USG */ X! #ifndef BSD4_2 X X get_lim_data () X { X--- 79,85 ---- X } X X #else /* not USG */ X! #if !defined(BSD4_2) && !defined(__386BSD__) X X get_lim_data () X { Xdiff +recursive +context lemacs-19.4.orig/src/process.c lemacs-19.4/src/process.c X*** lemacs-19.4.orig/src/process.c Wed Jan 13 22:17:51 1993 X--- lemacs-19.4/src/process.c Sun Mar 7 02:18:55 1993 X*************** X*** 1097,1103 **** X--- 1097,1105 ---- X extern void start_polling (void); X extern void stop_polling (void); X X+ #ifndef __386BSD__ X extern pid_t setpgrp(); X+ #endif X X static void X create_process (process, new_argv) Xdiff +recursive +context lemacs-19.4.orig/src/sysdep.c lemacs-19.4/src/sysdep.c X*** lemacs-19.4.orig/src/sysdep.c Wed Jan 20 01:43:09 1993 X--- lemacs-19.4/src/sysdep.c Sat Mar 6 23:26:28 1993 X*************** X*** 697,703 **** X--- 697,707 ---- X #ifdef SIGTSTP X X #ifdef BSD X+ #ifdef __386BSD__ X+ killpg (getpgrp (), SIGTSTP); X+ #else X killpg (getpgrp (0), SIGTSTP); X+ #endif X #else X kill (-getpgrp (), SIGTSTP); X #endif Xdiff +recursive +context lemacs-19.4.orig/src/unexec.c lemacs-19.4/src/unexec.c X*** lemacs-19.4.orig/src/unexec.c Thu Dec 10 18:30:39 1992 X--- lemacs-19.4/src/unexec.c Sun Mar 7 02:17:01 1993 X*************** X*** 230,236 **** X--- 230,238 ---- X typedef long ptrdiff_t; X #endif X #endif X+ #ifndef __386BSD__ X extern void *sbrk (ptrdiff_t); X+ #endif X #else X extern void *sbrk (); X #endif Xdiff +recursive +context lemacs-19.4.orig/src/vm-limit.c lemacs-19.4/src/vm-limit.c X*** lemacs-19.4.orig/src/vm-limit.c Tue Dec 29 01:47:30 1992 X--- lemacs-19.4/src/vm-limit.c Sun Mar 7 03:14:07 1993 X*************** X*** 42,48 **** X--- 42,50 ---- X 0 means don't issue them. */ X static void (*warnfunction) (); X X+ #ifndef __386BSD__ X extern POINTER sbrk (); X+ #endif X X /* Get more memory space, complaining if we're near the end. */ X Xdiff +recursive +context lemacs-19.4.orig/src/ymakefile lemacs-19.4/src/ymakefile X*** lemacs-19.4.orig/src/ymakefile Wed Jan 20 17:19:13 1993 X--- lemacs-19.4/src/ymakefile Mon Mar 8 19:26:26 1993 X*************** X*** 49,55 **** X X /* Some machines don't find the standard C libraries in the usual place. */ X #ifndef LIB_STANDARD X! #define LIB_STANDARD -lc X #endif X X /* Unless inhibited or changed, use -lg to link for debugging. */ X--- 49,55 ---- X X /* Some machines don't find the standard C libraries in the usual place. */ X #ifndef LIB_STANDARD X! #define LIB_STANDARD -lc '-L/usr/gnu/lib/gcc-lib/i386--bsd/2.3.3/' -lgcc -lc X #endif X X /* Unless inhibited or changed, use -lg to link for debugging. */ X*************** X*** 125,131 **** X X /* If user wants to optimize, this is how. */ X #ifndef C_OPTIMIZE_SWITCH X! #define C_OPTIMIZE_SWITCH -O X #endif X X /* cc switches needed to make `asm' keyword work. X--- 125,131 ---- X X /* If user wants to optimize, this is how. */ X #ifndef C_OPTIMIZE_SWITCH X! #define C_OPTIMIZE_SWITCH -O2 X #endif X X /* cc switches needed to make `asm' keyword work. X*************** X*** 229,235 **** X #endif /* !ENERGIZE */ X X X! CFLAGS= C_DEBUG_SWITCH C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE \ X -Demacs $(MYCPPFLAG) $(LIBX11_INCLUDES) ENERGIZE_INCLUDES X X LDFLAGS= LD_SWITCH_SYSTEM LD_SWITCH_MACHINE LD_SWITCH_SITE \ X--- 229,235 ---- X #endif /* !ENERGIZE */ X X X! CFLAGS= C_OPTIMIZE_SWITCH C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE \ X -Demacs $(MYCPPFLAG) $(LIBX11_INCLUDES) ENERGIZE_INCLUDES X X LDFLAGS= LD_SWITCH_SYSTEM LD_SWITCH_MACHINE LD_SWITCH_SITE \ END-of-lemacs.diffs echo x - src/m/m-486.h sed 's/^X//' >src/m/m-486.h << 'END-of-src/m/m-486.h' X/* m- file for intel 386. X Copyright (C) 1987 Free Software Foundation, Inc. X XThis file is part of GNU Emacs. X XGNU Emacs is free software; you can redistribute it and/or modify Xit under the terms of the GNU General Public License as published by Xthe Free Software Foundation; either version 1, or (at your option) Xany later version. X XGNU Emacs is distributed in the hope that it will be useful, Xbut WITHOUT ANY WARRANTY; without even the implied warranty of XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the XGNU General Public License for more details. X XYou should have received a copy of the GNU General Public License Xalong with GNU Emacs; see the file COPYING. If not, write to Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ X X X/* The following three symbols give information on X the size of various data types. */ X X#define SHORTBITS 16 /* Number of bits in a short */ X X#define INTBITS 32 /* Number of bits in an int */ X X#define LONGBITS 32 /* Number of bits in a long */ X X#define SIGN_EXTEND_CHAR(c) (c) X X#define NO_UNION_TYPE X X/* crt0.c should define a symbol `start' and do .globl with a dot. */ X#define DOT_GLOBAL_START X X#define CRT0_DUMMIES bogus_fp, X X/* CPU symbol */ X#define INTEL386 X X/* Of course we have alloca! */ X#define HAVE_ALLOCA END-of-src/m/m-486.h echo x - src/s/s-386bsd.h sed 's/^X//' >src/s/s-386bsd.h << 'END-of-src/s/s-386bsd.h' X/* Definitions file for GNU Emacs running on bsd 4.3 X Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. X XThis file is part of GNU Emacs. X XGNU Emacs is free software; you can redistribute it and/or modify Xit under the terms of the GNU General Public License as published by Xthe Free Software Foundation; either version 2, or (at your option) Xany later version. X XGNU Emacs is distributed in the hope that it will be useful, Xbut WITHOUT ANY WARRANTY; without even the implied warranty of XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the XGNU General Public License for more details. X XYou should have received a copy of the GNU General Public License Xalong with GNU Emacs; see the file COPYING. If not, write to Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ X X X/* X * Define symbols to identify the version of Unix this is. X * Define all the symbols that apply correctly. X */ X X#ifndef BSD4_3 X#define BSD4_3 X#endif /* BSD4_3 */ X X#ifndef BSD X#define BSD X#endif /* BSD */ X X#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) X X X/* SYSTEM_TYPE should indicate the kind of system you are using. X It sets the Lisp variable system-type. */ X X#define SYSTEM_TYPE "berkeley-unix" X X/* nomultiplejobs should be defined if your system's shell X does not have "job control" (the ability to stop a program, X run some other program, then continue the first one). */ X X/* #define NOMULTIPLEJOBS */ X X/* Do not use interrupt_input = 1 by default, because in 4.3 X we can make noninterrupt input work properly. */ X X#undef INTERRUPT_INPUT X X/* First pty name is /dev/ptyp0. */ X X#define FIRST_PTY_LETTER 'p' X X/* X * Define HAVE_TIMEVAL if the system supports the BSD style clock values. X * Look in <sys/time.h> for a timeval structure. X */ X X#define HAVE_TIMEVAL X X/* X * Define HAVE_SELECT if the system supports the `select' system call. X */ X X#define HAVE_SELECT X X/* X * Define HAVE_PTYS if the system supports pty devices. X */ X X#define HAVE_PTYS X X/* Define this macro if system defines a type `union wait'. */ X X#define HAVE_UNION_WAIT X X/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ X X#define HAVE_SOCKETS X X/* X * Define NEED_STRDUP if your C library doesn't have strdup(). X */ X/* #define NEED_STRDUP */ X X/* Define HAVE_INVERSE_HYPERBOLIC if you math library contains definitions X * of acosh, asinh, and atanh. Define HAVE_CBRT and HAVE_RINT if your X * math library contains cbrt and rint. Otherwise, they will be X * simulated. X */ X#define HAVE_INVERSE_HYPERBOLIC X#define HAVE_CBRT X#define HAVE_RINT X X/* Define FLOAT_CATCH_SIGILL if your floating point library routines X * can generate SIGILL conditions. X */ X#define FLOAT_CATCH_SIGILL X X/* Define FLOAT_CHECK_ERRNO if the float library routines set errno, as X * the ANSI C spec requires. (This has no effect on machines which use X * the SysV `matherr' mechanism.) X */ X#define FLOAT_CHECK_ERRNO X X/* Define FLOAT_CHECK_DOMAIN if the float library doesn't handle errors by X * either setting errno, or signalling SIGFPE/SIGILL (for example, some X * systems write a message to stderr.) Otherwise, domain and range X * checking will happen before calling the float routines. This has no X * effect on machines which use the SysV `matherr' mechanism. X */ X#define FLOAT_CHECK_DOMAIN X X/* X * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate X * The 4.2 opendir, etc., library functions. X */ X X/* #define NONSYSTEM_DIR_LIBRARY */ X X/* Define this symbol if your system has the functions bcopy, etc. */ X X#define BSTRING X X/* subprocesses should be defined if you want to X have code for asynchronous subprocesses X (as used in M-x compile and M-x shell). X This is generally OS dependent, and not supported X under most USG systems. */ X X#define subprocesses X X/* If your system uses COFF (Common Object File Format) then define the X preprocessor symbol "COFF". */ X X/* #define COFF */ X X/* define MAIL_USE_FLOCK if the mailer uses flock X to interlock access to /usr/spool/mail/$USER. X The alternative is that a lock file named X /usr/spool/mail/$USER.lock. */ X X#define MAIL_USE_FLOCK X X/* Define CLASH_DETECTION if you want lock files to be written X so that Emacs can tell instantly when you try to modify X a file that someone else has modified in his Emacs. */ X X#define CLASH_DETECTION X X/* We use the Berkeley (and usg5.2.2) interface to nlist. */ X X#define NLIST_STRUCT X X/* The file containing the kernel's symbol table is called /vmunix. */ X X#define KERNEL_FILE "/vmunix" X X/* The symbol in the kernel where the load average is found X is named _avenrun. */ X X#define LDAV_SYMBOL "_avenrun" X X#define FLOAT_CATCH_SIGILL END-of-src/s/s-386bsd.h exit -- Jordan Hubbard Lotus Development Ireland jkh@whisker.lotus.ie 386bsd Patchkit Coordinator All-around nice dude. I do not speak for Lotus as that's not in my job description.