Article View: gnu.emacs.bug
Article #99023Patches for SunOS 4.1
From: Dave Yearke
Date: Fri, 23 Nov 1990 16:43
Date: Fri, 23 Nov 1990 16:43
403 lines
12040 bytes
12040 bytes
Sun Microsystems is encouraging everyone with SunOS 4.1 to start
compiling under the System V environment, as they are moving in
that direction. Here are patches to make GNU Emacs use the System V
libraries and include files. get GCC to compile under that
environment. I have tried them on "fresh" Emacs sources and they
seem to work, but I don't make any promises that they'll always
work, or that they're the best patches to accomplish the goal.
*** dist-18.55/etc/loadst.c Tue Apr 18 21:24:59 1989
--- emacs/etc//loadst.c Fri Sep 14 18:27:56 1990
***************
*** 16,21 ****
--- 16,26 ----
with strcpy. Note that config.h may define NLIST_STRUCT
for more modern USG systems. */
+ #ifdef SUNOS41
+ #undef USG
+ #define BSD
+ #define BSD4_3
+ #endif /* SUNOS41 */
#ifdef LOAD_AVE_TYPE
#ifndef NLIST_STRUCT
***************
*** 68,73 ****
--- 73,84 ----
#include <sys/stat.h>
+ #ifdef SUNOS41
+ #define USG
+ #undef BSD
+ #undef BSD4_3
+ #endif /* SUNOS41 */
+
#ifdef BSD
#include <sys/ioctl.h>
#endif /* BSD */
***************
*** 189,195 ****
{
mail = (char *) malloc (strlen (user_name) + 30);
! #if defined (USG) && ! defined (XENIX)
sprintf (mail, "/usr/mail/%s", user_name);
#else /* Xenix, or not USG */
sprintf (mail, "/usr/spool/mail/%s", user_name);
--- 200,206 ----
{
mail = (char *) malloc (strlen (user_name) + 30);
! #if defined (USG) && ! defined (XENIX) && ! defined (SUNOS41)
sprintf (mail, "/usr/mail/%s", user_name);
#else /* Xenix, or not USG */
sprintf (mail, "/usr/spool/mail/%s", user_name);
*** dist-18.55/src/fns.c Thu Apr 6 22:25:38 1989
--- emacs/src//fns.c Fri Sep 14 18:28:41 1990
***************
*** 21,26 ****
--- 21,32 ----
#include "config.h"
+ #ifdef SUNOS41
+ #undef USG
+ #define BSD
+ #define BSD4_3
+ #endif /* SUNOS41 */
+
#ifdef LOAD_AVE_TYPE
#ifdef BSD
/* It appears param.h defines BSD and BSD4_3 in 4.3
***************
*** 51,56 ****
--- 57,68 ----
#endif /* NLIST_STRUCT */
#endif /* not VMS */
#endif /* LOAD_AVE_TYPE */
+
+ #ifdef SUNOS41
+ #define USG
+ #undef BSD
+ #undef BSD4_3
+ #endif /* SUNOS41 */
/* Note on some machines this defines `vector' as a typedef,
so make sure we don't use that name in this file. */
*** dist-18.55/src/keyboard.c Thu Jul 20 01:32:59 1989
--- emacs/src//keyboard.c Fri Sep 14 14:18:39 1990
***************
*** 43,48 ****
--- 43,51 ----
#ifdef USG
#include <termio.h>
#include <fcntl.h>
+ #ifdef SUNOS41
+ #include <sys/filio.h>
+ #endif /* SUNOS41 */
#else /* not USG */
#ifndef VMS
#include <sys/ioctl.h>
*** dist-18.55/src/process.c Sun Aug 6 18:01:31 1989
--- emacs/src//process.c Fri Sep 14 14:09:15 1990
***************
*** 63,69 ****
#else /* not IRIS, not UNIPLUS */
#ifdef HAVE_TIMEVAL
! #if defined(USG) && !defined(IBMRTAIX)
#include <time.h>
#else /* IBMRTAIX or not USG */
#include <sys/time.h>
--- 63,69 ----
#else /* not IRIS, not UNIPLUS */
#ifdef HAVE_TIMEVAL
! #if defined(USG) && !defined(IBMRTAIX) && !defined(SUNOS41)
#include <time.h>
#else /* IBMRTAIX or not USG */
#include <sys/time.h>
*** dist-18.55/src/sysdep.c Mon Aug 7 21:50:43 1989
--- emacs/src//sysdep.c Mon Sep 17 18:51:03 1990
***************
*** 150,159 ****
--- 150,161 ----
/* Some USG systems with TIOCGWINSZ need this file; some don't have it.
We don't know how to distinguish them.
If this #include gets an error, just delete it. */
+ #ifndef SUNOS41
#include <sys/sioctl.h>
#endif
#endif
#endif
+ #endif
#ifdef HAVE_TIMEVAL
#ifdef HPUX
#include <time.h>
***************
*** 339,345 ****
while (1)
{
#ifdef subprocesses
! #if defined(BSD) || (defined(HPUX) && !defined(HPUX_5))
/* Note that kill returns -1 even if the process is just a zombie now.
But inevitably a SIGCHLD interrupt should be generated
and child_sig will do wait3 and make the process go away. */
--- 341,347 ----
while (1)
{
#ifdef subprocesses
! #if defined(BSD) || defined(SUNOS41) || (defined(HPUX) && !defined(HPUX_5))
/* Note that kill returns -1 even if the process is just a zombie now.
But inevitably a SIGCHLD interrupt should be generated
and child_sig will do wait3 and make the process go away. */
*** dist-18.55/src/unexec.c Sat Aug 20 12:22:33 1988
--- emacs/src//unexec.c Fri Sep 14 14:08:00 1990
***************
*** 312,318 ****
#else /* not HPUX */
! #if defined (USG) && !defined (IBMRTAIX) && !defined (IRIS)
static struct bhdr hdr, ohdr;
#define a_magic fmagic
#define a_text tsize
--- 312,318 ----
#else /* not HPUX */
! #if defined (USG) && !defined (IBMRTAIX) && !defined (IRIS) && !defined(SUNOS41)
static struct bhdr hdr, ohdr;
#define a_magic fmagic
#define a_text tsize
*** dist-18.55/src/x11term.c Wed Aug 2 22:56:42 1989
--- emacs/src/x11term.c Mon Sep 17 18:55:59 1990
***************
*** 74,81 ****
--- 74,85 ----
#ifdef IRIS_4D
#include <sys/time.h>
#else
+ #ifdef HAVE_TIMEVAL
+ #include <sys/time.h>
+ #else
#include <time.h>
#endif
+ #endif
#else
#include <sys/time.h>
#endif
***************
*** 609,614 ****
--- 613,620 ----
XTflash ()
{
+ #ifdef HAVE_TIMEVAL
+ #ifdef HAVE_SELECT
XGCValues gcv_temp;
struct timeval to;
BLOCK_INPUT_DECLARE ();
***************
*** 645,650 ****
--- 651,658 ----
XFlush (XXdisplay);
UNBLOCK_INPUT ();
+ #endif /* HAVE_SELECT */
+ #endif /* HAVE_TIMEVAL */
}
XTfeep ()
New files (patch can't create, so diff against null):
*** /dev/null Mon Sep 17 18:13:41 1990
--- emacs/src/s-sunos41-sysv.h Mon Sep 17 07:46:21 1990
***************
*** 0 ****
--- 1,179 ----
+ /* Definitions file for GNU Emacs running on SunOS 4.1 with System V routines
+ Copyright (C) 1987 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. */
+
+
+ /*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+ /* 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 LD_SWITCH_SYSTEM -e __start -Bstatic -L/usr/5lib
+
+ #define SUNOS41
+
+ #define USG /* System III, System V, etc */
+
+ #define USG5
+
+ /* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+ #define SYSTEM_TYPE "sunos41-sysv"
+
+ /* nomultiplejobs should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+ /* #define NOMULTIPLEJOBS */
+
+ /* Do not use interrupt_input = 1 by default, because in 4.3
+ we can make noninterrupt input work properly. */
+
+ #undef INTERRUPT_INPUT
+
+ /* Letter to use in finding device name of first pty,
+ if system supports pty's. 'p' means it is /dev/ptyp0 */
+
+ #define FIRST_PTY_LETTER 'p'
+
+ /*
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ */
+
+ #define HAVE_TERMIO
+
+ /*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+ #define HAVE_TIMEVAL
+
+ /*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+ #define HAVE_SELECT
+
+ /*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+ #define HAVE_PTYS
+
+ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+ #define HAVE_SOCKETS
+
+ /*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+ /* #define NONSYSTEM_DIR_LIBRARY */
+
+ /*
+ * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
+ * library functions. Almost, but not quite the same as
+ * the 4.2 functions
+ */
+ /* #define SYSV_SYSTEM_DIR */
+
+ /* Define this symbol if your system has the functions bcopy, etc. */
+
+ #define BSTRING
+
+ /* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is supposed to work now on system V release 2. */
+
+ #define subprocesses
+
+ /* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+ /* #define COFF */
+
+ /* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+ #define MAIL_USE_FLOCK
+
+ /* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+ #define CLASH_DETECTION
+
+ /* Define SHORTNAMES if the C compiler can distinguish only
+ short names. It means that the stuff in ../shortnames
+ must be run to convert the long names to short ones. */
+
+ /* #define SHORTNAMES */
+
+ /* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+ #define NLIST_STRUCT
+
+ /* The file containing the kernel's symbol table is called /vmunix. */
+
+ #define KERNEL_FILE "/vmunix"
+
+ /* The symbol in the kernel where the load average is found
+ is named _avenrun. */
+
+ #define LDAV_SYMBOL "_avenrun"
+
+ /* Define this if system V IPC is available. */
+
+ #define HAVE_SYSVIPC
+
+ /* Special hacks needed to make Emacs run on this system. */
+
+ /* On USG systems these have different names */
+
+ #define index strchr
+ #define rindex strrchr
+
+ /* Use terminfo instead of termcap. */
+
+ #define TERMINFO
+
+ /* Must use the system's malloc and alloca. */
+
+ #define SYSTEM_MALLOC
+
+ /* Some additional system facilities exist. */
+
+ #define HAVE_VFORK
+ #define HAVE_DUP2
+ #define HAVE_GETTIMEOFDAY
+
+ #define C_DEBUG_SWITCH -O
+ #define LD_SWITCH_MACHINE -s
+
--
Dave Yearke, Calspan Advanced Technology Center
yearke@planck.uucp or yearke%planck.uucp@acsu.buffalo.edu
Technical Details
Message-ID:
<1990Nov23.164300.7019@planck.uucp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!europa.asd.contel.com!umd5!haven!purdue!tut.cis.ohio-state.edu!ACSU.BUFFALO.EDU!planck!yearkeShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,7058c96160faf979,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-11-23 08:43:00 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!europa.asd.contel.com!umd5!haven!purdue!tut.cis.ohio-state.edu!ACSU.BUFFALO.EDU!planck!yearke From: planck!yearke@ACSU.BUFFALO.EDU (Dave Yearke) Newsgroups: gnu.emacs.bug Subject: Patches for SunOS 4.1 Message-ID: <1990Nov23.164300.7019@planck.uucp> Date: 23 Nov 90 16:43:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: Calspan Advanced Technology Center Lines: 403 Approved: bug-gnu-emacs@prep.ai.mit.edu Posted: Fri Nov 23 17:43:00 1990