summaryrefslogtreecommitdiff
path: root/editors/emacs/patches
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>1999-12-28 14:08:53 +0000
committertron <tron@pkgsrc.org>1999-12-28 14:08:53 +0000
commitc87e9c01d2fa4c8418bff5139b8573cb3f9bf1ff (patch)
tree0abfc792d8372b46e1b6ff7823d5c1774f244940 /editors/emacs/patches
parentd4cb36531f998bcc791c44a2cc08339658f93373 (diff)
downloadpkgsrc-c87e9c01d2fa4c8418bff5139b8573cb3f9bf1ff.tar.gz
Update "emacs" package to version 20.5a based on patches supplied by
Minoura Makoto in PR pkg/9014. This version fixes several bugs discovered since version 20.3 and support a precompiled user startup file (".emacs.el" and ".emacs.elc").
Diffstat (limited to 'editors/emacs/patches')
-rw-r--r--editors/emacs/patches/patch-aa10
-rw-r--r--editors/emacs/patches/patch-ab28
-rw-r--r--editors/emacs/patches/patch-ae18
-rw-r--r--editors/emacs/patches/patch-ag24
-rw-r--r--editors/emacs/patches/patch-ah8
-rw-r--r--editors/emacs/patches/patch-ai31
-rw-r--r--editors/emacs/patches/patch-aj1024
-rw-r--r--editors/emacs/patches/patch-al17
-rw-r--r--editors/emacs/patches/patch-am17
-rw-r--r--editors/emacs/patches/patch-an15
-rw-r--r--editors/emacs/patches/patch-ao16
-rw-r--r--editors/emacs/patches/patch-ap16
-rw-r--r--editors/emacs/patches/patch-aq16
-rw-r--r--editors/emacs/patches/patch-ar15
-rw-r--r--editors/emacs/patches/patch-as17
-rw-r--r--editors/emacs/patches/patch-at15
-rw-r--r--editors/emacs/patches/patch-au15
-rw-r--r--editors/emacs/patches/patch-av15
-rw-r--r--editors/emacs/patches/patch-aw8
-rw-r--r--editors/emacs/patches/patch-az189
-rw-r--r--editors/emacs/patches/patch-ba91
-rw-r--r--editors/emacs/patches/patch-bb146
-rw-r--r--editors/emacs/patches/patch-bf3
23 files changed, 1119 insertions, 635 deletions
diff --git a/editors/emacs/patches/patch-aa b/editors/emacs/patches/patch-aa
index 61fd2a7f5ae..520efcb47a7 100644
--- a/editors/emacs/patches/patch-aa
+++ b/editors/emacs/patches/patch-aa
@@ -1,15 +1,15 @@
-$NetBSD: patch-aa,v 1.7 1998/09/04 02:28:53 tron Exp $
+$NetBSD: patch-aa,v 1.8 1999/12/28 14:08:55 tron Exp $
---- man/Makefile.in.orig Sat May 16 21:00:22 1998
-+++ man/Makefile.in Mon Aug 31 00:53:10 1998
+--- man/Makefile.in.orig Sat Dec 5 08:33:16 1998
++++ man/Makefile.in Fri Aug 6 08:34:06 1999
@@ -14,7 +14,7 @@
MAKEINFO = makeinfo
- INFO_TARGETS = ../info/emacs ../info/ccmode ../info/cl ../info/customize \
+ INFO_TARGETS = ../info/emacs ../info/ccmode ../info/cl \
../info/dired-x ../info/ediff ../info/forms ../info/gnus \
- ../info/info ../info/message ../info/mh-e ../info/reftex \
+ ../info/message ../info/mh-e ../info/reftex \
../info/sc ../info/vip ../info/viper ../info/widget
- DVI_TARGETS = emacs.dvi cc-mode.dvi cl.dvi customize.dvi dired-x.dvi \
+ DVI_TARGETS = emacs.dvi cc-mode.dvi cl.dvi dired-x.dvi \
ediff.dvi forms.dvi gnus.dvi message.dvi mh-e.dvi \
@@ -70,6 +70,7 @@
${srcdir}/glossary.texi \
diff --git a/editors/emacs/patches/patch-ab b/editors/emacs/patches/patch-ab
index 2d02a1e76b1..692f266d431 100644
--- a/editors/emacs/patches/patch-ab
+++ b/editors/emacs/patches/patch-ab
@@ -1,20 +1,26 @@
-$NetBSD: patch-ab,v 1.8 1999/06/15 13:59:15 bad Exp $
+$NetBSD: patch-ab,v 1.9 1999/12/28 14:08:56 tron Exp $
---- configure.orig Mon Jul 27 04:17:07 1998
-+++ configure Thu Jun 3 22:49:02 1999
-@@ -751,12 +751,15 @@
- opsys=netbsd
- case "${canonical}" in
- alpha*-*-netbsd*) machine=alpha ;;
-+ arm*-*-netbsd*) machine=arm ;;
- i[3456]86-*-netbsd*) machine=intel386 ;;
- m68k-*-netbsd*)
- # This is somewhat bogus.
+--- configure.orig Fri Dec 3 16:41:15 1999
++++ configure Fri Dec 17 15:23:49 1999
+@@ -715,9 +715,12 @@
machine=hp9000s300 ;;
+ powerpc-apple-netbsd*) machine=macppc ;;
mips-*-netbsd*) machine=pmax ;;
+ mipsel-*-netbsd*) machine=pmax ;;
ns32k-*-netbsd*) machine=ns32000 ;;
+ powerpc-*-netbsd*) machine=powerpc ;;
sparc-*-netbsd*) machine=sparc ;;
vax-*-netbsd*) machine=vax ;;
++ arm*-*-netbsd*) machine=arm ;;
esac
+ ;;
+
+@@ -4277,7 +4280,7 @@
+ rename closedir mkdir rmdir sysinfo \
+ random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
+ strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
+-utimes setrlimit setpgid getcwd shutdown strftime
++utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:4284: checking for $ac_func" >&5
diff --git a/editors/emacs/patches/patch-ae b/editors/emacs/patches/patch-ae
index b0128619bca..4dec7878893 100644
--- a/editors/emacs/patches/patch-ae
+++ b/editors/emacs/patches/patch-ae
@@ -1,13 +1,13 @@
-$NetBSD: patch-ae,v 1.5 1998/09/04 02:28:54 tron Exp $
+$NetBSD: patch-ae,v 1.6 1999/12/28 14:08:56 tron Exp $
---- Makefile.in.orig Sun Aug 2 02:21:22 1998
-+++ Makefile.in Fri Sep 4 03:46:00 1998
-@@ -383,27 +383,23 @@
+--- Makefile.in.orig Sat Apr 10 04:16:24 1999
++++ Makefile.in Sat Aug 7 15:24:03 1999
+@@ -386,27 +386,23 @@
chmod a+r ${infodir}/dir); \
fi; \
cd ${srcdir}/info ; \
-- for f in ccmode* cl* customize* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* reftex* sc* vip* widget*; do \
-+ for f in ccmode* cl* customize* dired-x* ediff* emacs* forms* gnus* message* mh-e* reftex* sc* vip* widget*; do \
+- for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* reftex* sc* vip* widget*; do \
++ for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* message* mh-e* reftex* sc* vip* widget*; do \
(cd $${thisdir}; \
- ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \
- chmod a+r ${infodir}/$$f); \
@@ -17,12 +17,12 @@ $NetBSD: patch-ae,v 1.5 1998/09/04 02:28:54 tron Exp $
- -thisdir=`/bin/pwd`; \
- if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
- then \
-- for f in ccmode cl customize dired-x ediff emacs forms gnus info message mh-e reftex sc vip widget; do \
+- for f in ccmode cl dired-x ediff emacs forms gnus info message mh-e reftex sc vip viper widget; do \
- (cd $${thisdir}; \
- ${INSTALL_INFO} --dir-file=${infodir}/dir --info-file=${infodir}/$$f); \
- done; \
- else true; fi
- -chmod -R a+r ${COPYDESTS} ${infodir}
+ -chmod -R a+r ${datadir}/emacs ${COPYDESTS} ${infodir}
thisdir=`/bin/pwd`; \
cd ${srcdir}/etc; \
for page in emacs etags ctags ; do \
@@ -39,7 +39,7 @@ $NetBSD: patch-ae,v 1.5 1998/09/04 02:28:54 tron Exp $
done
### Install LEIM files. Although they are machine-independent, we
-@@ -451,7 +447,7 @@
+@@ -458,7 +454,7 @@
esac ; \
fi ; \
done
diff --git a/editors/emacs/patches/patch-ag b/editors/emacs/patches/patch-ag
index c6926e51ef3..324631b0101 100644
--- a/editors/emacs/patches/patch-ag
+++ b/editors/emacs/patches/patch-ag
@@ -1,16 +1,12 @@
-$NetBSD: patch-ag,v 1.5 1998/09/04 02:28:54 tron Exp $
+$NetBSD: patch-ag,v 1.6 1999/12/28 14:08:56 tron Exp $
---- info/customize~ Mon Sep 15 03:56:06 1997
-+++ info/customize Fri Aug 28 22:11:30 1998
-@@ -1,6 +1,11 @@
- This is Info file ../info/customize, produced by Makeinfo version 1.68
- from the input file customize.texi.
-
-+INFO-DIR-SECTION Editors
-+START-INFO-DIR-ENTRY
-+* Customize: (customize). The GNU Emacs customization tool.
-+END-INFO-DIR-ENTRY
-+
- Distribution
- ************
+--- src/config.in.orig Mon Apr 26 14:19:44 1999
++++ src/config.in Fri Dec 17 14:32:45 1999
+@@ -234,6 +234,7 @@
+ #undef HAVE_GETCWD
+ #undef HAVE_SHUTDOWN
+ #undef HAVE_STRFTIME
++#undef HAVE_GETADDRINFO
+ #undef LOCALTIME_CACHE
+ #undef HAVE_INET_SOCKETS
diff --git a/editors/emacs/patches/patch-ah b/editors/emacs/patches/patch-ah
index 71cd76c8f06..9e2a050fc99 100644
--- a/editors/emacs/patches/patch-ah
+++ b/editors/emacs/patches/patch-ah
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.1 1999/01/04 01:16:18 tron Exp $
+$NetBSD: patch-ah,v 1.2 1999/12/28 14:08:57 tron Exp $
---- src/fileio.c.orig Mon Aug 10 08:12:32 1998
-+++ src/fileio.c Mon Jan 4 02:03:29 1999
-@@ -3201,8 +3201,11 @@
+--- src/fileio.c.orig Thu Jul 8 07:36:06 1999
++++ src/fileio.c Fri Aug 6 08:56:39 1999
+@@ -3207,8 +3207,11 @@
return value;
}
diff --git a/editors/emacs/patches/patch-ai b/editors/emacs/patches/patch-ai
index 7863f8ea870..838825bec0d 100644
--- a/editors/emacs/patches/patch-ai
+++ b/editors/emacs/patches/patch-ai
@@ -1,17 +1,20 @@
-$NetBSD: patch-ai,v 1.1 1998/09/04 02:28:54 tron Exp $
+$NetBSD: patch-ai,v 1.2 1999/12/28 14:08:57 tron Exp $
---- info/reftex~ Sun Apr 26 15:19:42 1998
-+++ info/reftex Fri Aug 28 22:13:45 1998
-@@ -1,6 +1,12 @@
- This is Info file ../info/reftex, produced by Makeinfo version 1.68
- from the input file reftex.texi.
+--- src/sysdep.c.orig Wed Nov 4 19:44:59 1998
++++ src/sysdep.c Sat Aug 7 14:00:26 1999
+@@ -2127,6 +2127,7 @@
+ *
+ */
-+INFO-DIR-SECTION Editors
-+START-INFO-DIR-ENTRY
-+* RefTeX: (reftex). Labels, references and citations for LaTeX
-+ documents with Emacs.
-+END-INFO-DIR-ENTRY
-+
- This file documents RefTeX, a package to do labels, references and
- citations for LaTeX documents with Emacs.
++#if !(defined (__NetBSD__) && defined (__ELF__))
+ #ifndef HAVE_TEXT_START
+ char *
+ start_of_text ()
+@@ -2144,6 +2145,7 @@
+ #endif /* TEXT_START */
+ }
+ #endif /* not HAVE_TEXT_START */
++#endif
+ /*
+ * Return the address of the start of the data segment prior to
diff --git a/editors/emacs/patches/patch-aj b/editors/emacs/patches/patch-aj
index 934d789e542..bff6108d545 100644
--- a/editors/emacs/patches/patch-aj
+++ b/editors/emacs/patches/patch-aj
@@ -1,16 +1,1016 @@
-$NetBSD: patch-aj,v 1.1 1998/09/04 02:28:54 tron Exp $
+$NetBSD: patch-aj,v 1.2 1999/12/28 14:08:57 tron Exp $
---- info/widget~ Mon Mar 30 00:12:27 1998
-+++ info/widget Fri Aug 28 22:14:36 1998
-@@ -1,6 +1,11 @@
- This is Info file ../info/widget, produced by Makeinfo version 1.68
- from the input file widget.texi.
+--- src/process.c.orig Thu Jul 8 07:36:24 1999
++++ src/process.c Fri Dec 17 14:39:17 1999
+@@ -1,7 +1,18 @@
++/*
++ * Locally hacked process.c to add ipv6 support. -wsr
++ *
++ * The configure.in file should define "HAVE_GETADDRINFO" if it is found
++ * in libc.
++ *
++ */
++
+ /* Asynchronous subprocess control for GNU Emacs.
+ Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 1998
+ Free Software Foundation, Inc.
+
++ ipv6 changes are
++ Copyright (C) 1999 Wolfgang S. Rupprecht
++
+ This file is part of GNU Emacs.
+
+ GNU Emacs is free software; you can redistribute it and/or modify
+@@ -25,7 +36,7 @@
+ #include <config.h>
+
+ /* This file is split into two parts by the following preprocessor
+- conditional. The 'then' clause contains all of the support for
++ conditional. The 'then' clause contains all of the support for
+ asynchronous subprocesses. The 'else' clause contains stub
+ versions of some of the asynchronous subprocess routines that are
+ often called elsewhere in Emacs, so we don't have to #ifdef the
+@@ -114,7 +125,7 @@
+ Lisp_Object Qprocessp;
+ Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed;
+ Lisp_Object Qlast_nonmenu_event;
+-/* Qexit is declared and initialized in eval.c. */
++/* Qexit is declared and initialized in eval.c. */
+
+ /* a process object is a network connection when its childp field is neither
+ Qt nor Qnil but is instead a cons cell (HOSTNAME PORTNUM). */
+@@ -196,7 +207,7 @@
+ #endif /* ! SYS_SIGLIST_DECLARED */
+
+ /* t means use pty, nil means use a pipe,
+- maybe other values to come. */
++ maybe other values to come. */
+ static Lisp_Object Vprocess_connection_type;
+
+ #ifdef SKTPAIR
+@@ -235,7 +246,7 @@
+ /* The largest descriptor currently in use for a process object. */
+ static int max_process_desc;
+
+-/* The largest descriptor currently in use for keyboard input. */
++/* The largest descriptor currently in use for keyboard input. */
+ static int max_keyboard_desc;
+
+ /* Nonzero means delete a process right away if it exits. */
+@@ -251,7 +262,7 @@
+ -1 means empty (no char is buffered).
+ Used on sys V where the only way to tell if there is any
+ output from the process is to read at least one char.
+- Always -1 on systems that support FIONREAD. */
++ Always -1 on systems that support FIONREAD. */
+
+ /* Don't make static; need to access externally. */
+ int proc_buffered_char[MAXDESC];
+@@ -422,9 +433,9 @@
+ #else /* no PTY_OPEN */
+ #ifdef IRIS
+ /* Unusual IRIS code */
+- *ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0);
+- if (fd < 0)
+- return -1;
++ *ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0);
++ if (fd < 0)
++ return -1;
+ if (fstat (fd, &stb) < 0)
+ return -1;
+ #else /* not IRIS */
+@@ -451,7 +462,7 @@
+ #ifdef PTY_TTY_NAME_SPRINTF
+ PTY_TTY_NAME_SPRINTF
+ #else
+- sprintf (pty_name, "/dev/tty%c%x", c, i);
++ sprintf (pty_name, "/dev/tty%c%x", c, i);
+ #endif /* no PTY_TTY_NAME_SPRINTF */
+ #ifndef UNIPLUS
+ if (access (pty_name, 6) != 0)
+@@ -567,7 +578,7 @@
+ return Qnil;
+ }
+
+-/* This is how commands for the user decode process arguments. It
++/* This is how commands for the user decode process arguments. It
+ accepts a process, a process name, a buffer, a buffer name, or nil.
+ Buffers denote the first process in the buffer, and nil denotes the
+ current buffer. */
+@@ -945,8 +956,8 @@
+ current_buffer->truncate_lines = Qt;
+
+ write_string ("\
+-Proc Status Buffer Tty Command\n\
+----- ------ ------ --- -------\n", -1);
++Proc Status Buffer Tty Command\n\
++---- ------ ------ --- -------\n", -1);
+
+ for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail))
+ {
+@@ -1022,11 +1033,11 @@
+ Findent_to (make_number (49), minspace);
+
+ if (NETCONN_P (proc))
+- {
++ {
+ sprintf (tembuf, "(network stream connection to %s)\n",
+ XSTRING (XCONS (p->childp)->car)->data);
+ insert_string (tembuf);
+- }
++ }
+ else
+ {
+ tem = p->command;
+@@ -1076,7 +1087,7 @@
+ an output stream or filter function to handle the output.\n\
+ BUFFER may be also nil, meaning that this process is not associated\n\
+ with any buffer.\n\
+-Third arg is program file name. It is searched for in PATH.\n\
++Third arg is program file name. It is searched for in PATH.\n\
+ Remaining arguments are strings to give program as arguments.")
+ (nargs, args)
+ int nargs;
+@@ -1103,7 +1114,7 @@
+
+ We have to GCPRO around this because Fexpand_file_name and
+ Funhandled_file_name_directory might call a file name handling
+- function. The argument list is protected by the caller, so all
++ function. The argument list is protected by the caller, so all
+ we really have to worry about is buffer. */
+ {
+ struct gcpro gcpro1, gcpro2;
+@@ -1209,9 +1220,9 @@
+ {
+ /* Decide coding systems for communicating with the process. Here
+ we don't setup the structure coding_system nor pay attention to
+- unibyte mode. They are done in create_process. */
++ unibyte mode. They are done in create_process. */
+
+- /* Qt denotes we have not yet called Ffind_operation_coding_system. */
++ /* Qt denotes we have not yet called Ffind_operation_coding_system. */
+ Lisp_Object coding_systems = Qt;
+ Lisp_Object val, *args2;
+ struct gcpro gcpro1;
+@@ -1266,7 +1277,7 @@
+ return unbind_to (count, proc);
+ }
+
+-/* This function is the unwind_protect form for Fstart_process. If
++/* This function is the unwind_protect form for Fstart_process. If
+ PROC doesn't have its pid set, then we know someone has signaled
+ an error and the process wasn't started successfully, so we should
+ remove it from the process list. */
+@@ -1299,7 +1310,7 @@
+ #if 0 /* This doesn't work; see the note before sigchld_handler. */
+ #ifdef USG
+ #ifdef SIGCHLD
+-/* Mimic blocking of signals on system V, which doesn't really have it. */
++/* Mimic blocking of signals on system V, which doesn't really have it. */
+
+ /* Nonzero means we got a SIGCHLD when it was supposed to be blocked. */
+ int sigchld_deferred;
+@@ -1337,7 +1348,7 @@
+ SIGTYPE (*sigchld)();
+ #endif
+ #endif /* !POSIX_SIGNALS */
+- /* Use volatile to protect variables from being clobbered by longjmp. */
++ /* Use volatile to protect variables from being clobbered by longjmp. */
+ volatile int forkin, forkout;
+ volatile int pty_flag = 0;
+ extern char **environ;
+@@ -1418,7 +1429,7 @@
+ chan_process[inchannel] = process;
+ XSETINT (XPROCESS (process)->infd, inchannel);
+ XSETINT (XPROCESS (process)->outfd, outchannel);
+- /* Record the tty descriptor used in the subprocess. */
++ /* Record the tty descriptor used in the subprocess. */
+ if (forkin < 0)
+ XPROCESS (process)->subtty = Qnil;
+ else
+@@ -1469,7 +1480,7 @@
+ encode_coding (coding, (unsigned char *)new_argv[i], buf, len, size);
+ buf[coding->produced] = 0;
+ /* We don't have to free new_argv[i] because it points to a
+- Lisp string given as an argument to `start-process'. */
++ Lisp string given as an argument to `start-process'. */
+ new_argv[i++] = (char *) buf;
+ }
+ UNGCPRO;
+@@ -1550,10 +1561,10 @@
+
+ /* Make the pty be the controlling terminal of the process. */
+ #ifdef HAVE_PTYS
+- /* First, disconnect its current controlling terminal. */
++ /* First, disconnect its current controlling terminal. */
+ #ifdef HAVE_SETSID
+ /* We tried doing setsid only if pty_flag, but it caused
+- process_set_signal to fail on SGI when using a pipe. */
++ process_set_signal to fail on SGI when using a pipe. */
+ setsid ();
+ /* Make the pty's terminal the controlling terminal. */
+ if (pty_flag)
+@@ -1567,7 +1578,7 @@
+ #else /* not HAVE_SETSID */
+ #ifdef USG
+ /* It's very important to call setpgrp here and no time
+- afterwards. Otherwise, we lose our controlling tty which
++ afterwards. Otherwise, we lose our controlling tty which
+ is set when we open the pty. */
+ setpgrp ();
+ #endif /* USG */
+@@ -1585,7 +1596,7 @@
+ #if defined (NTTYDISC) && defined (TIOCSETD)
+ if (pty_flag && xforkin >= 0)
+ {
+- /* Use new line discipline. */
++ /* Use new line discipline. */
+ int ldisc = NTTYDISC;
+ ioctl (xforkin, TIOCSETD, &ldisc);
+ }
+@@ -1597,7 +1608,7 @@
+ if (pty_flag)
+ {
+ /* I wonder: would just ioctl (0, TIOCNOTTY, 0) work here?
+- I can't test it since I don't have 4.3. */
++ I can't test it since I don't have 4.3. */
+ int j = open ("/dev/tty", O_RDWR, 0);
+ ioctl (j, TIOCNOTTY, 0);
+ close (j);
+@@ -1666,7 +1677,7 @@
+ signal (SIGINT, SIG_DFL);
+ signal (SIGQUIT, SIG_DFL);
+
+- /* Stop blocking signals in the child. */
++ /* Stop blocking signals in the child. */
+ #ifdef POSIX_SIGNALS
+ sigprocmask (SIG_SETMASK, &procmask, 0);
+ #else /* !POSIX_SIGNALS */
+@@ -1763,7 +1774,7 @@
+ #if 0
+ signal (SIGCHLD, sigchld);
+ /* Now really handle any of these signals
+- that came in during this function. */
++ that came in during this function. */
+ if (sigchld_deferred)
+ kill (getpid (), SIGCHLD);
+ #endif
+@@ -1783,7 +1794,7 @@
+ /* open a TCP network connection to a given HOST/SERVICE. Treated
+ exactly like a normal process when reading and writing. Only
+ differences are in status display and process deletion. A network
+- connection has no PID; you cannot signal it. All you can do is
++ connection has no PID; you cannot signal it. All you can do is
+ deactivate and close it via delete-process */
+
+ DEFUN ("open-network-stream", Fopen_network_stream, Sopen_network_stream,
+@@ -1806,15 +1817,21 @@
+ {
+ Lisp_Object proc;
+ register int i;
++
++#ifndef HAVE_GETADDRINFO
+ struct sockaddr_in address;
+ struct servent *svc_info;
+ struct hostent *host_info_ptr, host_info;
+ char *(addr_list[2]);
+ IN_ADDR numeric_addr;
+- int s, outch, inch;
+- char errstring[80];
+- int port;
+ struct hostent host_info_fixed;
++ int port;
++#else /* HAVE_GETADDRINFO */
++ struct addrinfo hints, *res, *lres;
++ int ret;
++ char *portstring, portbuf [128];
++#endif /* HAVE_GETADDRINFO */
++ int s, outch, inch;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
+ int retry = 0;
+ int count = specpdl_ptr - specpdl;
+@@ -1827,6 +1844,22 @@
+ GCPRO4 (name, buffer, host, service);
+ CHECK_STRING (name, 0);
+ CHECK_STRING (host, 0);
++
++#ifdef HAVE_GETADDRINFO
++ /*
++ * caution: service can either be a string or int.
++ * Convert to a C string for later use by getaddrinfo.
++ */
++ if (INTEGERP (service)) {
++ snprintf (portbuf, sizeof (portbuf), "%d", XINT (service));
++ portstring = portbuf;
++ }
++ else
++ {
++ CHECK_STRING (service, 0);
++ portstring = XSTRING (service)->data;
++ }
++#else /* HAVE_GETADDRINFO */
+ if (INTEGERP (service))
+ port = htons ((unsigned short) XINT (service));
+ else
+@@ -1837,6 +1870,8 @@
+ error ("Unknown service \"%s\"", XSTRING (service)->data);
+ port = svc_info->s_port;
+ }
++#endif /* HAVE_GETADDRINFO */
++
-+INFO-DIR-SECTION Editors
-+START-INFO-DIR-ENTRY
-+* Widget: (widget). The GNU Emacs text widget package.
-+END-INFO-DIR-ENTRY
+ /* Slow down polling to every ten seconds.
+ Some kernels have a bug which causes retrying connect to fail
+@@ -1846,6 +1881,81 @@
+ #endif
+
+ #ifndef TERM
++#ifdef HAVE_GETADDRINFO /* We have a modern OS. -wsr */
++ {
++ immediate_quit = 1;
++ QUIT;
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_flags = AI_NUMERICHOST;
++ hints.ai_family = AF_UNSPEC;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_protocol = 0;
++ ret = getaddrinfo(XSTRING (host)->data, portstring, &hints, &res);
++ if (!ret) { /* numeric */
++ freeaddrinfo(res);
++ hints.ai_flags = AI_CANONNAME;
++ } else { /* non-numeric */
++ hints.ai_flags = 0;
++ }
++ ret = getaddrinfo(XSTRING (host)->data, portstring, &hints, &res);
++ if (ret){
++ error("%s/%s %s", XSTRING (host)->data, portstring,
++ gai_strerror(ret));
++ }
++ immediate_quit = 0;
++ }
++
++ for (lres = res; lres ; lres = lres->ai_next){ /* address loop */
++ s = socket(lres->ai_family, lres->ai_socktype, lres->ai_protocol);
++ if (s < 0)
++ report_file_error ("error creating socket", Fcons (name, Qnil));
++
++ /* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR)
++ when connect is interrupted. So let's not let it get interrupted.
++ Note we do not turn off polling, because polling is only used
++ when not interrupt_input, and thus not normally used on the systems
++ which have this bug. On systems which use polling, there's no way
++ to quit if polling is turned off. */
++ if (interrupt_input)
++ unrequest_sigio ();
++
++ loop:
++
++ immediate_quit = 1;
++ QUIT;
++
++ if (connect(s, lres->ai_addr, lres->ai_addrlen) == -1
++ && errno != EISCONN)
++ {
++ int xerrno = errno;
++
++ immediate_quit = 0;
+
- 
- File: widget, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
++ if (errno == EINTR)
++ goto loop;
++ if (errno == EADDRINUSE && retry < 20)
++ {
++ /* A delay here is needed on some FreeBSD systems,
++ and it is harmless, since this retrying takes time anyway
++ and should be infrequent. */
++ Fsleep_for (make_number (1), Qnil);
++ retry++;
++ goto loop;
++ }
++
++ close (s);
++
++ if (interrupt_input)
++ request_sigio ();
++
++ errno = xerrno;
++ report_file_error ("connection failed",
++ Fcons (host, Fcons (name, Qnil)));
++ }
++ } /* address loop */
++ freeaddrinfo(res);
++#else /* HAVE_GETADDRINFO */
++
+ while (1)
+ {
+ #ifdef TRY_AGAIN
+@@ -1875,7 +1985,7 @@
+ #ifdef h_addr
+ /* Older machines have only one address slot called h_addr.
+ Newer machines have h_addr_list, but #define h_addr to
+- be its first element. */
++ be its first element. */
+ host_info.h_addr_list = &(addr_list[0]);
+ #endif
+ host_info.h_addr = (char*)(&numeric_addr);
+@@ -1899,7 +2009,7 @@
+ Note we do not turn off polling, because polling is only used
+ when not interrupt_input, and thus not normally used on the systems
+ which have this bug. On systems which use polling, there's no way
+- to quit if polling is turned off. */
++ to quit if polling is turned off. */
+ if (interrupt_input)
+ unrequest_sigio ();
+
+@@ -1921,7 +2031,7 @@
+ {
+ /* A delay here is needed on some FreeBSD systems,
+ and it is harmless, since this retrying takes time anyway
+- and should be infrequent. */
++ and should be infrequent. */
+ Fsleep_for (make_number (1), Qnil);
+ retry++;
+ goto loop;
+@@ -1936,6 +2046,7 @@
+ report_file_error ("connection failed",
+ Fcons (host, Fcons (name, Qnil)));
+ }
++#endif /* HAVE_GETADDRINFO */
+
+ immediate_quit = 0;
+
+@@ -1987,9 +2098,9 @@
+ max_process_desc = inch;
+
+ {
+- /* Setup coding systems for communicating with the network stream. */
++ /* Setup coding systems for communicating with the network stream. */
+ struct gcpro gcpro1;
+- /* Qt denotes we have not yet called Ffind_operation_coding_system. */
++ /* Qt denotes we have not yet called Ffind_operation_coding_system. */
+ Lisp_Object coding_systems = Qt;
+ Lisp_Object args[5], val;
+
+@@ -2000,7 +2111,7 @@
+ /* We dare not decode end-of-line format by setting VAL to
+ Qraw_text, because the existing Emacs Lisp libraries
+ assume that they receive bare code including a sequene of
+- CR LF. */
++ CR LF. */
+ val = Qnil;
+ else
+ {
+@@ -2092,7 +2203,7 @@
+ #else
+ close (inchannel);
+ if (outchannel >= 0 && outchannel != inchannel)
+- close (outchannel);
++ close (outchannel);
+ #endif
+
+ XSETINT (p->infd, -1);
+@@ -2104,7 +2215,7 @@
+ {
+ int i;
+ /* We just closed the highest-numbered process input descriptor,
+- so recompute the highest-numbered one now. */
++ so recompute the highest-numbered one now. */
+ max_process_desc = 0;
+ for (i = 0; i < MAXDESC; i++)
+ if (!NILP (chan_process[i]))
+@@ -2215,7 +2326,7 @@
+ lisp code is being evalled.
+ This is also used in record_asynch_buffer_change.
+ For that purpose, this must be 0
+- when not inside wait_reading_process_input. */
++ when not inside wait_reading_process_input. */
+ static int waiting_for_user_input_p;
+
+ /* This is here so breakpoints can be put on it. */
+@@ -2245,7 +2356,7 @@
+ a cons cell, meaning wait until its car is non-nil
+ (and gobble terminal input into the buffer if any arrives), or
+ a process object, meaning wait until something arrives from that
+- process. The return value is true iff we read some input from
++ process. The return value is true iff we read some input from
+ that process.
+
+ DO_DISPLAY != 0 means redisplay should be done to show subprocess
+@@ -2320,7 +2431,7 @@
+ if (XINT (read_kbd) >= 0)
+ QUIT;
+
+- /* Exit now if the cell we're waiting for became non-nil. */
++ /* Exit now if the cell we're waiting for became non-nil. */
+ if (wait_for_cell && ! NILP (*wait_for_cell))
+ break;
+
+@@ -2401,7 +2512,7 @@
+ /* If status of something has changed, and no input is
+ available, notify the user of the change right away. After
+ this explicit check, we'll let the SIGCHLD handler zap
+- timeout to get our attention. */
++ timeout to get our attention. */
+ if (update_tick != process_tick && do_display)
+ {
+ Atemp = input_wait_mask;
+@@ -2434,11 +2545,11 @@
+ && (nread
+ = read_process_output (proc, XINT (wait_proc->infd))))
+ {
+- if (0 < nread)
+- total_nread += nread;
++ if (0 < nread)
++ total_nread += nread;
+ #ifdef EIO
+ else if (nread == -1 && EIO == errno)
+- break;
++ break;
+ #endif
+ }
+ if (total_nread > 0 && do_display)
+@@ -2512,7 +2623,7 @@
+ else if (xerrno == EBADF)
+ {
+ #ifdef AIX
+- /* AIX doesn't handle PTY closure the same way BSD does. On AIX,
++ /* AIX doesn't handle PTY closure the same way BSD does. On AIX,
+ the child's closure of the pts gives the parent a SIGHUP, and
+ the ptc file descriptor is automatically closed,
+ yielding EBADF here or at select() call above.
+@@ -2534,7 +2645,7 @@
+
+ David J. Mackenzie says that Emacs doesn't compile under
+ Solaris if this code is enabled, thus the USG5_4 in the CPP
+- conditional. "I haven't noticed any ill effects so far.
++ conditional. "I haven't noticed any ill effects so far.
+ If you find a Solaris expert somewhere, they might know
+ better." */
+ kill (getpid (), SIGIO);
+@@ -2542,13 +2653,13 @@
+
+ #if 0 /* When polling is used, interrupt_input is 0,
+ so get_input_pending should read the input.
+- So this should not be needed. */
++ So this should not be needed. */
+ /* If we are using polling for input,
+ and we see input available, make it get read now.
+ Otherwise it might not actually get read for a second.
+ And on hpux, since we turn off polling in wait_reading_process_input,
+ it might never get read at all if we don't spend much time
+- outside of wait_reading_process_input. */
++ outside of wait_reading_process_input. */
+ if (XINT (read_kbd) && interrupt_input
+ && keyboard_bit_set (&Available)
+ && input_polling_used ())
+@@ -2588,7 +2699,7 @@
+ #endif
+ }
+
+- /* Exit now if the cell we're waiting for became non-nil. */
++ /* Exit now if the cell we're waiting for became non-nil. */
+ if (wait_for_cell && ! NILP (*wait_for_cell))
+ break;
+
+@@ -2611,7 +2722,7 @@
+ if (XINT (read_kbd) || wait_for_cell)
+ do_pending_window_change ();
+
+- /* Check for data from a process. */
++ /* Check for data from a process. */
+ /* Really FIRST_PROC_DESC should be 0 on Unix,
+ but this is safer in the short run. */
+ for (channel = 0; channel <= max_process_desc; channel++)
+@@ -2622,7 +2733,7 @@
+ int nread;
+
+ /* If waiting for this channel, arrange to return as
+- soon as no more input to be processed. No more
++ soon as no more input to be processed. No more
+ waiting. */
+ if (wait_channel == channel)
+ {
+@@ -2681,12 +2792,12 @@
+
+ However, it has been known to happen that the SIGCHLD
+ got lost. So raise the signl again just in case.
+- It can't hurt. */
++ It can't hurt. */
+ else if (nread == -1 && errno == EIO)
+ kill (getpid (), SIGCHLD);
+ #endif /* HAVE_PTYS */
+ /* If we can detect process termination, don't consider the process
+- gone just because its pipe is closed. */
++ gone just because its pipe is closed. */
+ #ifdef SIGCHLD
+ else if (nread == 0 && !NETCONN_P (proc))
+ ;
+@@ -2729,7 +2840,7 @@
+ return got_some_input;
+ }
+
+-/* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */
++/* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */
+
+ static Lisp_Object
+ read_process_output_call (fun_and_args)
+@@ -2767,7 +2878,7 @@
+ register int nchars, nbytes;
+ char *chars;
+ #ifdef VMS
+- int chars_allocated = 0; /* If 1, `chars' should be freed later. */
++ int chars_allocated = 0; /* If 1, `chars' should be freed later. */
+ #else
+ char buf[1024];
+ #endif
+@@ -2803,8 +2914,8 @@
+ if (carryover > 0)
+ {
+ /* The data carried over in the previous decoding (which are at
+- the tail of decoding buffer) should be prepended to the new
+- data read to decode all together. */
++ the tail of decoding buffer) should be prepended to the new
++ data read to decode all together. */
+ char *buf = (char *) xmalloc (nbytes + carryover);
+
+ bcopy (XSTRING (p->decoding_buf)->data
+@@ -2882,14 +2993,14 @@
+ XSETINT (p->decoding_carryover, carryover);
+ }
+
+- /* A new coding system might be found by `decode_coding'. */
++ /* A new coding system might be found by `decode_coding'. */
+ if (!EQ (p->decode_coding_system, coding->symbol))
+ {
+ p->decode_coding_system = coding->symbol;
+
+ /* Don't call setup_coding_system for
+- proc_decode_coding_system[channel] here. It is done in
+- detect_coding called via decode_coding above. */
++ proc_decode_coding_system[channel] here. It is done in
++ detect_coding called via decode_coding above. */
+
+ /* If a coding system for encoding is not yet decided, we set
+ it as the same as coding-system for decoding.
+@@ -2961,7 +3072,7 @@
+ {
+ /* We inhibit quit here instead of just catching it so that
+ hitting ^G when a filter happens to be running won't screw
+- it up. */
++ it up. */
+ int count = specpdl_ptr - specpdl;
+ Lisp_Object odeactivate;
+ Lisp_Object obuffer, okeymap;
+@@ -2970,7 +3081,7 @@
+ int waiting = waiting_for_user_input_p;
+
+ /* No need to gcpro these, because all we do with them later
+- is test them for EQness, and none of them should be a string. */
++ is test them for EQness, and none of them should be a string. */
+ odeactivate = Vdeactivate_mark;
+ XSETBUFFER (obuffer, current_buffer);
+ okeymap = current_buffer->keymap;
+@@ -2980,7 +3091,7 @@
+
+ /* In case we get recursively called,
+ and we already saved the match data nonrecursively,
+- save the same match data in safely recursive fashion. */
++ save the same match data in safely recursive fashion. */
+ if (outer_running_asynch_code)
+ {
+ Lisp_Object tem;
+@@ -2992,11 +3103,11 @@
+ }
+
+ /* For speed, if a search happens within this code,
+- save the match data in a special nonrecursive fashion. */
++ save the match data in a special nonrecursive fashion. */
+ running_asynch_code = 1;
+
+ /* The multibyteness of a string given to the filter is decided
+- by which coding system we used for decoding. */
++ by which coding system we used for decoding. */
+ if (coding->type == coding_type_no_conversion
+ || coding->type == coding_type_raw_text)
+ text = make_unibyte_string (chars, nbytes);
+@@ -3017,7 +3128,7 @@
+ Vdeactivate_mark = odeactivate;
+
+ /* Restore waiting_for_user_input_p as it was
+- when we were called, in case the filter clobbered it. */
++ when we were called, in case the filter clobbered it. */
+ waiting_for_user_input_p = waiting;
+
+ #if 0 /* Call record_asynch_buffer_change unconditionally,
+@@ -3039,7 +3150,7 @@
+ return nchars;
+ }
+
+- /* If no filter, write into buffer if it isn't dead. */
++ /* If no filter, write into buffer if it isn't dead. */
+ if (!NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name))
+ {
+ Lisp_Object old_read_only;
+@@ -3064,7 +3175,7 @@
+
+ /* Insert new output into buffer
+ at the current end-of-output marker,
+- thus preserving logical ordering of input and output. */
++ thus preserving logical ordering of input and output. */
+ if (XMARKER (p->mark)->buffer)
+ SET_PT_BOTH (clip_to_bounds (BEGV, marker_position (p->mark), ZV),
+ clip_to_bounds (BEGV_BYTE, marker_byte_position (p->mark),
+@@ -3087,7 +3198,7 @@
+ if (chars_in_decoding_buf)
+ {
+ /* Since multibyteness of p->docoding_buf is corrupted, we
+- can't use insert_from_string_before_markers. */
++ can't use insert_from_string_before_markers. */
+ char *temp_buf;
+
+ temp_buf = (char *) alloca (nbytes);
+@@ -3169,7 +3280,7 @@
+ is sent. But if the data ends at the middle of multi-byte
+ representation, that incomplete sequence of bytes are sent without
+ being encoded. Should we store them in a buffer to prepend them to
+- the data send later? */
++ the data send later? */
+
+ void
+ send_process (proc, buf, len, object)
+@@ -3178,7 +3289,7 @@
+ int len;
+ Lisp_Object object;
+ {
+- /* Use volatile to protect variables from being clobbered by longjmp. */
++ /* Use volatile to protect variables from being clobbered by longjmp. */
+ int rv;
+ volatile unsigned char *procname = XSTRING (XPROCESS (proc)->name)->data;
+ struct coding_system *coding;
+@@ -3209,8 +3320,8 @@
+ unsigned char *temp_buf = NULL;
+
+ /* Remember the offset of data because a string or a buffer may
+- be relocated. Setting OFFSET to -1 means we don't have to
+- care about relocation. */
++ be relocated. Setting OFFSET to -1 means we don't have to
++ care about relocation. */
+ offset = (BUFFERP (object)
+ ? BUF_PTR_BYTE_POS (XBUFFER (object), buf)
+ : (STRINGP (object)
+@@ -3342,7 +3453,7 @@
+ int offset;
+
+ /* Running filters might relocate buffers or strings.
+- Arrange to relocate BUF. */
++ Arrange to relocate BUF. */
+ if (BUFFERP (object))
+ offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf);
+ else if (STRINGP (object))
+@@ -3401,7 +3512,7 @@
+ nil, indicating the current buffer's process.\n\
+ Called from program, takes three arguments, PROCESS, START and END.\n\
+ If the region is more than 500 characters long,\n\
+-it is sent in several bunches. This may happen even for shorter regions.\n\
++it is sent in several bunches. This may happen even for shorter regions.\n\
+ Output from processes can arrive in between bunches.")
+ (process, start, end)
+ Lisp_Object process, start, end;
+@@ -3429,7 +3540,7 @@
+ PROCESS may be a process, a buffer, the name of a process or buffer, or\n\
+ nil, indicating the current buffer's process.\n\
+ If STRING is more than 500 characters long,\n\
+-it is sent in several bunches. This may happen even for shorter strings.\n\
++it is sent in several bunches. This may happen even for shorter strings.\n\
+ Output from processes can arrive in between bunches.")
+ (process, string)
+ Lisp_Object process, string;
+@@ -3525,7 +3636,7 @@
+ by sending an input character to it. */
+
+ /* TERMIOS is the latest and bestest, and seems most likely to
+- work. If the system has it, use it. */
++ work. If the system has it, use it. */
+ #ifdef HAVE_TERMIOS
+ struct termios t;
+
+@@ -3538,17 +3649,17 @@
+
+ case SIGQUIT:
+ tcgetattr (XINT (p->infd), &t);
+- send_process (proc, &t.c_cc[VQUIT], 1, Qnil);
+- return;
++ send_process (proc, &t.c_cc[VQUIT], 1, Qnil);
++ return;
+
+- case SIGTSTP:
++ case SIGTSTP:
+ tcgetattr (XINT (p->infd), &t);
+ #if defined (VSWTCH) && !defined (PREFER_VSUSP)
+- send_process (proc, &t.c_cc[VSWTCH], 1, Qnil);
++ send_process (proc, &t.c_cc[VSWTCH], 1, Qnil);
+ #else
+ send_process (proc, &t.c_cc[VSUSP], 1, Qnil);
+ #endif
+- return;
++ return;
+ }
+
+ #else /* ! HAVE_TERMIOS */
+@@ -3642,7 +3753,7 @@
+ #endif /* ! defined (TIOCGPGRP ) */
+
+ /* If current_group is lambda, and the shell owns the terminal,
+- don't send any signal. */
++ don't send any signal. */
+ if (EQ (current_group, Qlambda) && gid == - XFASTINT (p->pid))
+ return;
+ }
+@@ -3733,7 +3844,7 @@
+ }
+
+ DEFUN ("quit-process", Fquit_process, Squit_process, 0, 2, 0,
+- "Send QUIT signal to process PROCESS. May be process or name of one.\n\
++ "Send QUIT signal to process PROCESS. May be process or name of one.\n\
+ See function `interrupt-process' for more details on usage.")
+ (process, current_group)
+ Lisp_Object process, current_group;
+@@ -3773,7 +3884,7 @@
+ DEFUN ("signal-process", Fsignal_process, Ssignal_process,
+ 2, 2, "nProcess number: \nnSignal code: ",
+ "Send the process with process id PID the signal with code SIGCODE.\n\
+-PID must be an integer. The process need not be a child of this Emacs.\n\
++PID must be an integer. The process need not be a child of this Emacs.\n\
+ SIGCODE may be an integer, or a symbol whose name is a signal name.")
+ (pid, sigcode)
+ Lisp_Object pid, sigcode;
+@@ -3924,7 +4035,7 @@
+ }
+
+ #ifdef VMS
+- send_process (proc, "\032", 1, Qnil); /* ^z */
++ send_process (proc, "\032", 1, Qnil); /* ^z */
+ #else
+ if (!NILP (XPROCESS (proc)->pty_flag))
+ send_process (proc, "\004", 1, Qnil);
+@@ -3965,7 +4076,7 @@
+ }
+
+ /* Kill all processes associated with `buffer'.
+- If `buffer' is nil, kill all processes */
++ If `buffer' is nil, kill all processes */
+
+ void
+ kill_buffer_processes (buffer)
+@@ -3997,7 +4108,7 @@
+
+ /** WARNING: this can be called during garbage collection.
+ Therefore, it must not be fooled by the presence of mark bits in
+- Lisp objects. */
++ Lisp objects. */
+
+ /** USG WARNING: Although it is not obvious from the documentation
+ in signal(2), on a USG system the SIGCLD handler MUST NOT call
+@@ -4032,7 +4143,7 @@
+ #ifndef WUNTRACED
+ #define WUNTRACED 0
+ #endif /* no WUNTRACED */
+- /* Keep trying to get a status until we get a definitive result. */
++ /* Keep trying to get a status until we get a definitive result. */
+ do
+ {
+ errno = 0;
+@@ -4049,7 +4160,7 @@
+ #if defined (USG) && !defined (POSIX_SIGNALS)
+ signal (signo, sigchld_handler); /* WARNING - must come after wait3() */
+ #endif
+-#ifdef BSD4_1
++#ifdef BSD4_1
+ sigheld &= ~sigbit (SIGCHLD);
+ sigrelse (SIGCHLD);
+ #endif
+@@ -4113,7 +4224,7 @@
+ EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
+ }
+
+- /* There was no asynchronous process found for that id. Check
++ /* There was no asynchronous process found for that id. Check
+ if we have a synchronous process. */
+ else
+ {
+@@ -4206,7 +4317,7 @@
+ assure that it gets restored no matter how the sentinel exits. */
+ p->sentinel = Qnil;
+ record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel));
+- /* Inhibit quit so that random quits don't screw up a running filter. */
++ /* Inhibit quit so that random quits don't screw up a running filter. */
+ specbind (Qinhibit_quit, Qt);
+ specbind (Qlast_nonmenu_event, Qt);
+
+@@ -4232,7 +4343,7 @@
+ !NILP (Vdebug_on_error) ? Qnil : Qerror,
+ exec_sentinel_error_handler);
+
+- /* If we saved the match data nonrecursively, restore it now. */
++ /* If we saved the match data nonrecursively, restore it now. */
+ restore_match_data ();
+ running_asynch_code = outer_running_asynch_code;
+
+@@ -4271,7 +4382,7 @@
+ /* We need to gcpro tail; if read_process_output calls a filter
+ which deletes a process and removes the cons to which tail points
+ from Vprocess_alist, and then causes a GC, tail is an unprotected
+- reference. */
++ reference. */
+ GCPRO2 (tail, msg);
+
+ /* Set this now, so that if new processes are created by sentinels
+@@ -4290,7 +4401,7 @@
+ {
+ XSETINT (p->update_tick, XINT (p->tick));
+
+- /* If process is still active, read any output that remains. */
++ /* If process is still active, read any output that remains. */
+ while (! EQ (p->filter, Qt)
+ && XINT (p->infd) >= 0
+ && read_process_output (proc, XINT (p->infd)) > 0);
+@@ -4319,7 +4430,7 @@
+ /* The actions above may have further incremented p->tick.
+ So set p->update_tick again
+ so that an error in the sentinel will not cause
+- this code to be run again. */
++ this code to be run again. */
+ XSETINT (p->update_tick, XINT (p->tick));
+ /* Now output the message suitably. */
+ if (!NILP (p->sentinel))
+@@ -4345,7 +4456,7 @@
+ opoint_byte = PT_BYTE;
+ /* Insert new output into buffer
+ at the current end-of-output marker,
+- thus preserving logical ordering of input and output. */
++ thus preserving logical ordering of input and output. */
+ if (XMARKER (p->mark)->buffer)
+ Fgoto_char (p->mark);
+ else
+@@ -4374,7 +4485,7 @@
+ }
+ } /* end for */
+
+- update_mode_lines++; /* in case buffers use %s in mode-line-format */
++ update_mode_lines++; /* in case buffers use %s in mode-line-format */
+ redisplay_preserve_echo_area ();
+
+ UNGCPRO;
+@@ -4422,7 +4533,7 @@
+ /* The first time this is called, assume keyboard input comes from DESC
+ instead of from where we used to expect it.
+ Subsequent calls mean assume input keyboard can come from DESC
+- in addition to other places. */
++ in addition to other places. */
+
+ static int add_keyboard_wait_descriptor_called_flag;
+
+@@ -4636,7 +4747,7 @@
+ do_display != 0 means redisplay should be done to show subprocess
+ output that arrives.
+
+- Return true iff we received input from any process. */
++ Return true iff we received input from any process. */
+
+ int
+ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
+@@ -4657,7 +4768,7 @@
+ XSETFASTINT (read_kbd, 0);
+ }
+
+- /* What does time_limit really mean? */
++ /* What does time_limit really mean? */
+ if (time_limit || microsecs)
+ {
+ EMACS_GET_TIME (end_time);
+@@ -4679,7 +4790,7 @@
+ if (XINT (read_kbd) >= 0)
+ QUIT;
+
+- /* Exit now if the cell we're waiting for became non-nil. */
++ /* Exit now if the cell we're waiting for became non-nil. */
+ if (wait_for_cell && ! NILP (*wait_for_cell))
+ break;
+
+@@ -4743,7 +4854,7 @@
+ }
+
+ /* Cause C-g and alarm signals to take immediate action,
+- and cause input available signals to zero out timeout. */
++ and cause input available signals to zero out timeout. */
+ if (XINT (read_kbd) < 0)
+ set_waiting_for_input (&timeout);
+
+@@ -4833,7 +4944,7 @@
+ break;
+ }
+- /* Exit now if the cell we're waiting for became non-nil. */
++ /* Exit now if the cell we're waiting for became non-nil. */
+ if (wait_for_cell && ! NILP (*wait_for_cell))
+ break;
+ }
diff --git a/editors/emacs/patches/patch-al b/editors/emacs/patches/patch-al
deleted file mode 100644
index 48a5fe971ea..00000000000
--- a/editors/emacs/patches/patch-al
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-al,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/cc-mode.texi.orig Sat May 16 20:55:23 1998
-+++ man/cc-mode.texi Fri Sep 4 01:56:10 1998
-@@ -14,6 +14,12 @@
- and Java code.
- @end direntry
-
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* CC mode: (ccmode). The GNU Emacs mode for editing C, C++,
-+ Objective-C and Java code.
-+@end direntry
-+
- @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- @comment @setchapternewpage odd !! we don't want blank pages !!
- @comment %**end of header (This is for running Texinfo on a region)
diff --git a/editors/emacs/patches/patch-am b/editors/emacs/patches/patch-am
deleted file mode 100644
index 827e2b0cb2a..00000000000
--- a/editors/emacs/patches/patch-am
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-am,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/cl.texi.orig Sat May 16 20:51:46 1998
-+++ man/cl.texi Fri Sep 4 01:56:10 1998
-@@ -7,6 +7,12 @@
- * CL: (cl). Partial Common Lisp support for Emacs Lisp.
- @end direntry
-
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* CL: (cl). Partial Common Lisp support for Emacs Lisp.
-+@end direntry
-+
-+
- @iftex
- @finalout
- @end iftex
diff --git a/editors/emacs/patches/patch-an b/editors/emacs/patches/patch-an
deleted file mode 100644
index 27ff81895cd..00000000000
--- a/editors/emacs/patches/patch-an
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-an,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/emacs.texi.orig Tue Aug 18 10:45:18 1998
-+++ man/emacs.texi Fri Sep 4 01:56:09 1998
-@@ -4,6 +4,10 @@
- @settitle GNU Emacs Manual
- @setfilename ../info/emacs
- @synindex pg cp
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* Emacs: (emacs). The extensible self-documenting text editor.
-+@end direntry
-
- @ifinfo
- @c The edition number appears in several places in this file
diff --git a/editors/emacs/patches/patch-ao b/editors/emacs/patches/patch-ao
deleted file mode 100644
index 0c40a79f2e5..00000000000
--- a/editors/emacs/patches/patch-ao
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ao,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/forms.texi.orig Sat May 16 20:49:28 1998
-+++ man/forms.texi Fri Sep 4 01:56:09 1998
-@@ -8,6 +8,11 @@
- @syncodeindex vr cp
- @syncodeindex fn cp
- @syncodeindex ky cp
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* Forms: (forms). Emacs package for editing data bases
-+ by filling in forms.
-+@end direntry
- @iftex
- @finalout
- @setchapternewpage odd
diff --git a/editors/emacs/patches/patch-ap b/editors/emacs/patches/patch-ap
deleted file mode 100644
index 8664959fe80..00000000000
--- a/editors/emacs/patches/patch-ap
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ap,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/gnus.texi.orig Sat May 16 20:50:27 1998
-+++ man/gnus.texi Fri Sep 4 01:56:10 1998
-@@ -5,6 +5,11 @@
- @synindex fn cp
- @synindex vr cp
- @synindex pg cp
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* GNUS: (gnus). The news reader GNUS.
-+@end direntry
-+
- @iftex
- @finalout
- @end iftex
diff --git a/editors/emacs/patches/patch-aq b/editors/emacs/patches/patch-aq
deleted file mode 100644
index 366a70980fd..00000000000
--- a/editors/emacs/patches/patch-aq
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-aq,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/message.texi.orig Sat May 16 20:50:48 1998
-+++ man/message.texi Fri Sep 4 01:56:09 1998
-@@ -2,6 +2,11 @@
-
- @setfilename ../info/message
- @settitle Message 5.5 Manual
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* Message: (message). Emacs message composition mode.
-+@end direntry
-+
- @synindex fn cp
- @synindex vr cp
- @synindex pg cp
diff --git a/editors/emacs/patches/patch-ar b/editors/emacs/patches/patch-ar
deleted file mode 100644
index 98fdcd0a58b..00000000000
--- a/editors/emacs/patches/patch-ar
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ar,v 1.1 1998/09/04 02:28:54 tron Exp $
-
---- man/mh-e.texi.orig Sat May 16 20:51:15 1998
-+++ man/mh-e.texi Fri Sep 4 01:56:10 1998
-@@ -4,6 +4,10 @@
- @setfilename ../info/mh-e
- @settitle mh-e
- @c %**end of header
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* MH-E: (mh-e). Emacs interface to the MH mail system.
-+@end direntry
-
- @setchapternewpage odd
-
diff --git a/editors/emacs/patches/patch-as b/editors/emacs/patches/patch-as
deleted file mode 100644
index eb24b5a3d58..00000000000
--- a/editors/emacs/patches/patch-as
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-as,v 1.1 1998/09/04 02:28:55 tron Exp $
-
---- man/sc.texi.orig Thu Jul 2 20:48:27 1998
-+++ man/sc.texi Fri Sep 4 01:56:10 1998
-@@ -3,6 +3,12 @@
- @comment %**start of header (This is for running Texinfo on a region.)
- @setfilename ../info/sc
- @settitle Supercite Version 3.1 User's Manual
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* SC: (sc). Supercite lets you cite parts of messages
-+ you're replying to, in flexible ways.
-+@end direntry
-+
- @iftex
- @finalout
- @end iftex
diff --git a/editors/emacs/patches/patch-at b/editors/emacs/patches/patch-at
deleted file mode 100644
index 2389605be2c..00000000000
--- a/editors/emacs/patches/patch-at
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-at,v 1.1 1998/09/04 02:28:55 tron Exp $
-
---- man/vip.texi.orig Sat May 16 20:48:50 1998
-+++ man/vip.texi Fri Sep 4 01:56:09 1998
-@@ -2,6 +2,10 @@
-
- @setfilename ../info/vip
- @settitle VIP
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* VIP: (vip). A VI-emulation for Emacs.
-+@end direntry
-
- @dircategory Editors
- @direntry
diff --git a/editors/emacs/patches/patch-au b/editors/emacs/patches/patch-au
deleted file mode 100644
index 1e093ad1cac..00000000000
--- a/editors/emacs/patches/patch-au
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-au,v 1.1 1998/09/04 02:28:55 tron Exp $
-
---- man/viper.texi.orig Tue Jun 9 05:19:18 1998
-+++ man/viper.texi Fri Sep 4 01:56:09 1998
-@@ -5,6 +5,10 @@
- @comment @setfilename viper
- @comment @setfilename viper.info
- @setfilename ../info/viper
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* VIPER: (viper). The new VI-emulation mode in Emacs-19.29.
-+@end direntry
-
- @dircategory Editors
- @direntry
diff --git a/editors/emacs/patches/patch-av b/editors/emacs/patches/patch-av
deleted file mode 100644
index 29cac11a07d..00000000000
--- a/editors/emacs/patches/patch-av
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-av,v 1.1 1998/09/04 02:28:55 tron Exp $
-
---- man/widget.texi.orig Thu Jul 10 03:42:38 1997
-+++ man/widget.texi Fri Sep 4 01:56:09 1998
-@@ -3,6 +3,10 @@
- @c %**start of header
- @setfilename ../info/widget
- @settitle The Emacs Widget Library
-+@dircategory The Emacs editor and associated tools
-+@direntry
-+* Widget: (Widget). Emacs Widget Library
-+@end direntry
- @iftex
- @afourpaper
- @headings double
diff --git a/editors/emacs/patches/patch-aw b/editors/emacs/patches/patch-aw
index 3dcf7cf2c37..326dfef5689 100644
--- a/editors/emacs/patches/patch-aw
+++ b/editors/emacs/patches/patch-aw
@@ -1,8 +1,8 @@
-$NetBSD: patch-aw,v 1.1 1999/01/31 17:29:33 frueauf Exp $
+$NetBSD: patch-aw,v 1.2 1999/12/28 14:09:14 tron Exp $
---- src/emacs.c-orig Tue Jul 21 03:39:52 1998
-+++ src/emacs.c Sat Jan 30 14:29:44 1999
-@@ -1004,7 +1004,7 @@
+--- src/emacs.c.orig Wed Jun 30 02:11:06 1999
++++ src/emacs.c Fri Aug 6 08:59:59 1999
+@@ -1048,7 +1048,7 @@
}
no_loadup
diff --git a/editors/emacs/patches/patch-az b/editors/emacs/patches/patch-az
index 350b548a854..7c4ca88fa92 100644
--- a/editors/emacs/patches/patch-az
+++ b/editors/emacs/patches/patch-az
@@ -1,21 +1,22 @@
-$NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
+$NetBSD: patch-az,v 1.6 1999/12/28 14:09:14 tron Exp $
---- src/unexelf.c.orig Mon Aug 10 12:33:12 1998
-+++ src/unexelf.c Fri Nov 5 21:35:39 1999
-@@ -473,6 +473,12 @@
- # else
- # define ELFSIZE 32
+--- src/unexelf.c.orig Fri Dec 17 15:48:53 1999
++++ src/unexelf.c Fri Dec 17 15:55:21 1999
+@@ -478,6 +478,13 @@
# endif
-+
+ # include <sys/exec_elf.h>
+
+#include <sys/param.h>
+
+/* NetBSD 1.4M has sane <elf.h> */
+
+#if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 104130000
- # include <sys/exec_elf.h>
-
++# include <sys/exec_elf.h>
++
# define PT_LOAD Elf_pt_load
-@@ -487,6 +493,10 @@
+ # define SHT_SYMTAB Elf_sht_symtab
+ # define SHT_DYNSYM Elf_sht_dynsym
+@@ -490,6 +497,10 @@
# define SHN_ABS Elf_eshn_absolute
# define SHN_COMMON Elf_eshn_common
@@ -26,25 +27,23 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
/*
* The magic of picking the right size types is handled by the ELFSIZE
* definition above.
-@@ -501,9 +511,16 @@
+@@ -504,9 +515,14 @@
# include <sys/exec_ecoff.h>
# define HDRR struct ecoff_symhdr
# define pHDRR HDRR *
-# endif
-+# endif /* __alpha__*/
-+
++# endif /* __alpha__ */
+ #endif /* __NetBSD__ */
+
+# ifdef __mips__
+# define SHT_MIPS_DEBUG DT_MIPS_FLAGS
+# define HDRR struct Elf_Shdr
+# endif /* __mips__ */
+
- #endif /* __NetBSD__ */
-
-+
#ifdef __OpenBSD__
# include <sys/exec_elf.h>
#endif
-@@ -527,6 +544,14 @@
+@@ -530,6 +546,14 @@
extern void fatal (char *, ...);
#endif
@@ -52,14 +51,14 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
+# define HAVE_MIPS_SBSS
+#endif
+
-+#if (defined (__mips__) || defined (__powerpc__)) && (defined(__NetBSD__) || defined(__OpenBSD__))
++#if defined (__mips__) && (defined(__NetBSD__) || defined(__OpenBSD__))
+# define HAVE_MIPS_SBSS
+#endif
+
#ifndef ELF_BSS_SECTION_NAME
#define ELF_BSS_SECTION_NAME ".bss"
#endif
-@@ -585,6 +610,47 @@
+@@ -588,6 +612,47 @@
return x - rem + y;
}
@@ -89,7 +88,7 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
+void
+relocate_elf_proghdr(p, diff)
+ HDRR *symhdr;
-+ ElfW(Word) diff;
++ Elfw(Word) diff;
+{
+ phdr->sh_name += diff;
+ phdr->sh_type += diff;
@@ -107,72 +106,7 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
/* ****************************************************************
* unexec
*
-@@ -620,9 +686,10 @@
- ElfW(Addr) new_data2_addr;
-
- int n, nn, old_bss_index, old_data_index, new_data2_index;
--#if defined ( __sony_news) && defined (_SYSTYPE_SYSV)
-+#ifdef HAVE_MIPS_SBSS
- int old_sbss_index, old_mdebug_index;
--#endif /* __sony_news && _SYSTYPE_SYSV */
-+ int bss_phdr_index;
-+#endif /* HAVE_MIPS_SBSS */
- struct stat stat_buf;
-
- /* Open the old file & map it into the address space. */
-@@ -672,7 +739,7 @@
- if (old_bss_index == old_file_h->e_shnum)
- fatal ("Can't find .bss in %s.\n", old_name, 0);
-
--#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
-+#ifdef HAVE_MIPS_SBSS
- for (old_sbss_index = 1; old_sbss_index < (int) old_file_h->e_shnum;
- old_sbss_index++)
- {
-@@ -713,10 +780,10 @@
- }
- if (old_mdebug_index == old_file_h->e_shnum)
- old_mdebug_index = 0;
--#else /* not (__sony_news && _SYSTYPE_SYSV) */
-+#else /* not HAVE_MIPS_SBSS */
- old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr;
- old_bss_size = OLD_SECTION_H (old_bss_index).sh_size;
--#endif /* not (__sony_news && _SYSTYPE_SYSV) */
-+#endif /* not HAVE_MIPS_SBSS */
- #if defined (emacs) || !defined (DEBUG)
- new_bss_addr = (ElfW(Addr)) sbrk (0);
- #else
-@@ -724,9 +791,9 @@
- #endif
- new_data2_addr = old_bss_addr;
- new_data2_size = new_bss_addr - old_bss_addr;
--#if !defined (__sony_news) || !defined (_SYSTYPE_SYSV)
-+#ifndef HAVE_MIPS_SBSS
- new_data2_offset = OLD_SECTION_H (old_bss_index).sh_offset;
--#endif /* not (__sony_news && _SYSTYPE_SYSV) */
-+#endif /* not HAVE_MIPS_SBSS */
-
- #ifdef DEBUG
- fprintf (stderr, "old_bss_index %d\n", old_bss_index);
-@@ -811,14 +878,14 @@
- if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
- alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
-
--#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
-+#ifdef HAVE_MIPS_SBSS
- if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz
- > round_up (old_bss_addr, alignment))
- fatal ("Program segment above .bss in %s\n", old_name, 0);
--#else /* not (__sony_news && _SYSTYPE_SYSV) */
-+#else /* not HAVE_MIPS_SBSS */
- if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > old_bss_addr)
- fatal ("Program segment above .bss in %s\n", old_name, 0);
--#endif /* not (__sony_news && _SYSTYPE_SYSV) */
-+#endif /* not HAVE_MIPS_SBSS */
-
- if (NEW_PROGRAM_H (n).p_type == PT_LOAD
- && (round_up ((NEW_PROGRAM_H (n)).p_vaddr
-@@ -830,11 +897,16 @@
+@@ -829,6 +894,10 @@
if (n < 0)
fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0);
@@ -183,46 +117,7 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
/* Make sure that the size includes any padding before the old .bss
section. */
NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr;
- NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz;
-
-+
- #if 0 /* Maybe allow section after data2 - does this ever happen? */
- for (n = new_file_h->e_phnum - 1; n >= 0; n--)
- {
-@@ -867,15 +939,15 @@
- {
- caddr_t src;
- int temp_index;
--#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
-+#ifdef HAVE_MIPS_SBSS
- /* If it is (s)bss section, insert the new data2 section before it. */
- /* new_data2_index is the index of either old_sbss or old_bss, that was
- chosen as a section for new_data2. */
- temp_index = new_data2_index;
--#else /* not (__sony_news && _SYSTYPE_SYSV) */
-+#else /* not HAVE_MIPS_SBSS */
- /* If it is bss section, insert the new data2 section before it. */
- temp_index = old_bss_index;
--#endif /* not (__sony_news && _SYSTYPE_SYSV) */
-+#endif /* not HAVE_MIPS_SBSS */
- if (n == temp_index)
- {
- /* Steal the data section header for this data2 section. */
-@@ -901,11 +973,11 @@
- old_file_h->e_shentsize);
-
- if (n == old_bss_index
--#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
-+#ifdef HAVE_MIPS_SBSS
- /* The new bss and sbss section's size is zero, and its file offset
- and virtual address should be off by NEW_DATA2_SIZE. */
- || n == old_sbss_index
--#endif /* __sony_news and _SYSTYPE_SYSV */
-+#endif /* HAVE_MIPS_SBSS */
- )
- {
- /* NN should be `old_bss_index + 1' at this point. */
-@@ -916,6 +988,28 @@
+@@ -908,6 +977,28 @@
this section will be placed in exactly the same place. */
NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (nn).sh_addralign;
NEW_SECTION_H (nn).sh_size = 0;
@@ -251,24 +146,7 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
}
else
{
-@@ -970,14 +1064,14 @@
- || !strcmp ((old_section_names + NEW_SECTION_H(n).sh_name),
- ".sdata")
- #endif
--#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
-+#ifdef HAVE_MIPS_SBSS
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
- ".sdata")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
- ".lit4")
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
- ".lit8")
--#endif /* __sony_news && _SYSTYPE_SYSV */
-+#endif /* HAVE_MIPS_SBSS */
- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
- ".data1"))
- src = (caddr_t) OLD_SECTION_H (n).sh_addr;
-@@ -993,18 +1087,7 @@
+@@ -983,22 +1074,11 @@
== 0)
{
pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base);
@@ -288,7 +166,12 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
}
#endif /* __alpha__ */
-@@ -1017,20 +1100,11 @@
+-#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
++#ifdef HAVE_MIPS_SBSS
+ if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG && old_mdebug_index)
+ {
+ int diff = NEW_SECTION_H(nn).sh_offset
+@@ -1007,20 +1087,17 @@
if (diff)
{
@@ -303,12 +186,18 @@ $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $
- phdr->cbFdOffset += diff;
- phdr->cbRfdOffset += diff;
- phdr->cbExtOffset += diff;
++#if defined ( __sony_news) && defined (_SYSTYPE_SYSV)
+ relocate_ecoff_symhdr(phdr, diff);
++#else
++ /* xxxBSD with GNU binutils has .mdebug, but not ecoff(???) */
++#ifdef DEBUG
++ printf("Dont know how to relocate mdebug syms by %0x\n", diff);
++#endif
++#endif
}
}
-#endif /* __sony_news && _SYSTYPE_SYSV */
-+#endif /* __sony_news and systype_sysv */
-+
- /* If it is the symbol table, its st_shndx field needs to be patched. */
- if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB
- || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM)
++#endif /* HAVE_MIPS_SBSS */
+
+ #if __sgi
+ /* Adjust the HDRR offsets in .mdebug and copy the
diff --git a/editors/emacs/patches/patch-ba b/editors/emacs/patches/patch-ba
deleted file mode 100644
index 4c02a8a827c..00000000000
--- a/editors/emacs/patches/patch-ba
+++ /dev/null
@@ -1,91 +0,0 @@
-$NetBSD: patch-ba,v 1.2 1999/02/25 18:00:29 sommerfe Exp $
-
---- lisp/mail/mh-comp.el- Wed Jun 24 05:38:00 1998
-+++ lisp/mail/mh-comp.el Thu Feb 25 12:53:40 1999
-@@ -147,6 +147,13 @@
- is searched for first in the user's MH directory, then in the
- system MH lib directory.")
-
-+(defvar mh-repl-group-formfile "replgroupcomps"
-+ "Name of file to be used as a skeleton for replying to the sender
-+and all recipients of a messages. Only used if mh-nmh-p is non-nil.
-+Default is \"replgroupcomps\". If not an absolute file name, the file
-+is searched for first in the user's MH directory, then in the system
-+MH lib directory.")
-+
- ;;; Hooks:
-
- (defcustom mh-letter-mode-hook nil
-@@ -217,7 +224,7 @@
-
-
- ;;;###autoload
--(defun mh-smail-batch (&rest ignored)
-+(defun mh-smail-batch (&optional to subject other-headers &rest ignored)
- "Set up a mail composition draft with the MH mail system.
- This function is an entry point to mh-e, the Emacs front end
- to the MH mail system. This function does not prompt the user
-@@ -226,7 +233,7 @@
- Users should use `\\[mh-smail]' to compose mail."
- (mh-find-path)
- (let ((mh-error-if-no-draft t))
-- (mh-send "" "" "")))
-+ (mh-send to "" subject)))
-
-
- (defun mh-edit-again (msg)
-@@ -407,27 +414,35 @@
- (interactive (list (mh-get-msg-num t) current-prefix-arg))
- (let ((minibuffer-help-form
- "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients"))
-- (let ((reply-to (or mh-reply-default-reply-to
-- (completing-read "Reply to whom: "
-- '(("from") ("to") ("cc") ("all"))
-- nil
-- t)))
-- (folder mh-current-folder)
-- (show-buffer mh-show-buffer)
-- (config (current-window-configuration)))
-+ (let* ((reply-to (or mh-reply-default-reply-to
-+ (completing-read "Reply to whom: "
-+ '(("from") ("to") ("cc") ("all"))
-+ nil
-+ t)))
-+ (folder mh-current-folder)
-+ (show-buffer mh-show-buffer)
-+ (config (current-window-configuration))
-+ (group-reply (or (equal reply-to "cc") (equal reply-to "all")))
-+ ;; mh-repl*formfile must be strings, but we're paranoid
-+ (form-file (cond ((and mh-nmh-p group-reply
-+ (stringp mh-repl-group-formfile))
-+ mh-repl-group-formfile)
-+ ((stringp mh-repl-formfile) mh-repl-formfile)
-+ (t nil))))
- (message "Composing a reply...")
- (mh-exec-cmd "repl" "-build" "-noquery" "-nodraftfolder"
-- (if (stringp mh-repl-formfile) ;must be string, but we're paranoid
-- (list "-form" mh-repl-formfile))
-- mh-current-folder message
-- (cond ((or (equal reply-to "from") (equal reply-to ""))
-- '("-nocc" "all"))
-- ((equal reply-to "to")
-- '("-cc" "to"))
-- ((or (equal reply-to "cc") (equal reply-to "all"))
-- '("-cc" "all" "-nocc" "me")))
-- (if includep
-- '("-filter" "mhl.reply")))
-+ (if form-file
-+ (list "-form" form-file))
-+ mh-current-folder message
-+ (cond ((or (equal reply-to "from") (equal reply-to ""))
-+ '("-nocc" "all"))
-+ ((equal reply-to "to")
-+ '("-cc" "to"))
-+ (group-reply (if mh-nmh-p
-+ '("-group" "-nocc" "me")
-+ '("-cc" "all" "-nocc" "me"))))
-+ (if includep
-+ '("-filter" "mhl.reply")))
- (let ((draft (mh-read-draft "reply"
- (expand-file-name "reply" mh-user-path)
- t)))
diff --git a/editors/emacs/patches/patch-bb b/editors/emacs/patches/patch-bb
deleted file mode 100644
index 9d30e9195dd..00000000000
--- a/editors/emacs/patches/patch-bb
+++ /dev/null
@@ -1,146 +0,0 @@
-$NetBSD: patch-bb,v 1.2 1999/02/25 18:00:29 sommerfe Exp $
-
---- lisp/mail/mh-utils.el.~1~ Thu Feb 25 01:31:26 1999
-+++ lisp/mail/mh-utils.el Thu Feb 25 11:21:45 1999
-@@ -38,12 +38,24 @@
- (defvar mh-lib nil
- "Directory containing the MH library.
- This directory contains, among other things,
--the mhl program and the components file.")
-+the components file.")
-+
-+(defvar mh-lib-progs nil
-+ "Directory containing MH helper programs.
-+This directory contains, among other things,
-+the mhl program.")
-+
-+(defvar mh-nmh-p nil
-+ "Non-nil if nmh is installed on this system instead of MH")
-
- ;;;###autoload
- (put 'mh-progs 'risky-local-variable t)
- ;;;###autoload
- (put 'mh-lib 'risky-local-variable t)
-+;;;###autoload
-+(put 'mh-lib-progs 'risky-local-variable t)
-+;;;###autoload
-+(put 'mh-nmh-p 'risky-local-variable t)
-
- ;;; User preferences:
-
-@@ -532,7 +544,7 @@
- (defvar mail-user-agent 'mh-e-user-agent) ;from reporter.el 3.2
-
- (defun mh-find-path ()
-- ;; Set mh-progs and mh-lib.
-+ ;; Set mh-progs, mh-lib, and mh-libs-progs
- ;; (This step is necessary if MH was installed after this Emacs was dumped.)
- ;; From profile file, set mh-user-path, mh-draft-folder,
- ;; mh-unseen-seq, mh-previous-seq, mh-inbox.
-@@ -587,7 +599,8 @@
-
- (defun mh-find-progs ()
- "Find the `inc' and `mhl' programs of MH.
--Set the `mh-progs' and `mh-lib' variables to the file names."
-+Set the `mh-progs' and `mh-lib', and `mh-lib-progs' variables to the
-+directory names."
- (or (and mh-progs (mh-file-command-p (expand-file-name "inc" mh-progs)))
- (setq mh-progs
- (or (mh-path-search exec-path "inc")
-@@ -596,38 +609,53 @@
- "/usr/bin/mh/" ;Ultrix 4.2
- "/usr/new/mh/" ;Ultrix <4.2
- "/usr/contrib/mh/bin/" ;BSDI
-+ "/usr/pkg/bin/" ; NetBSD
- "/usr/local/bin/"
- )
- "inc"))))
-+ (or (null mh-progs)
-+ (let ((mh-base mh-progs))
-+ (while (let ((dir-name (file-name-nondirectory
-+ (directory-file-name mh-base))))
-+ (or (string= "mh" dir-name)
-+ (string= "bin" dir-name)))
-+ (setq mh-base
-+ (file-name-directory (directory-file-name mh-base))))
-+ (or (and mh-lib
-+ (file-exists-p (expand-file-name "components" mh-lib)))
-+ (setq mh-lib
-+ ;; Look for a lib directory roughly parallel to the bin
-+ ;; directory: Strip any trailing `mh' or `bin' path
-+ ;; components, then look for lib/mh or mh/lib.
-+ (or (mh-path-search
-+ (list (expand-file-name "lib/mh" mh-base)
-+ (expand-file-name "etc/nmh" mh-base) ; NetBSD
-+ (expand-file-name "mh/lib" mh-base))
-+ "components"
-+ 'file-exists-p))))
-+ (or (and mh-lib-progs
-+ (mh-file-command-p (expand-file-name "mhl" mh-lib-progs)))
-+ (setq mh-lib-progs
-+ (or (mh-path-search
-+ (list (expand-file-name "lib/mh" mh-base)
-+ (expand-file-name "libexec/nmh" mh-base) ; NetBSD
-+ (expand-file-name "mh/lib" mh-base))
-+ "mhl")
-+ (mh-path-search '("/usr/local/bin/mh/") "mhl")
-+ (mh-path-search exec-path "mhl") ;unlikely
-+ )))))
-+ (unless (and mh-progs mh-lib mh-lib-progs)
-+ (error "Cannot find the commands `inc' and `mhl' and the file `components'"))
-+ (setq mh-nmh-p (not (null
-+ (or (string-match "nmh" mh-lib-progs)
-+ (string-match "nmh" mh-lib))))))
-
-- (or (and mh-lib (mh-file-command-p (expand-file-name "mhl" mh-lib)))
-- (null mh-progs)
-- (setq mh-lib
-- ;; Look for a lib directory roughly parallel to the bin
-- ;; directory: Strip any trailing `mh' or `bin' path
-- ;; components, then look for lib/mh or mh/lib.
-- (or (let ((mh-base mh-progs))
-- (while (let ((dir-name (file-name-nondirectory
-- (directory-file-name mh-base))))
-- (or (string= "mh" dir-name)
-- (string= "bin" dir-name)))
-- (setq mh-base
-- (file-name-directory (directory-file-name mh-base))))
-- (mh-path-search
-- (list (expand-file-name "lib/mh/" mh-base)
-- (expand-file-name "mh/lib/" mh-base))
-- "mhl"))
-- (mh-path-search '("/usr/local/bin/mh/") "mhl")
-- (mh-path-search exec-path "mhl") ;unlikely
-- )))
-- (unless (and mh-progs mh-lib)
-- (error "Cannot find the commands `inc' and `mhl'")))
--
--(defun mh-path-search (path file)
-+(defun mh-path-search (path file &optional func-p)
- ;; Search PATH, a list of directory names, for FILE.
- ;; Returns the element of PATH that contains FILE, or nil if not found.
- (while (and path
-- (not (mh-file-command-p (expand-file-name file (car path)))))
-+ (not (funcall (or func-p 'mh-file-command-p)
-+ (expand-file-name file (car path)))))
- (setq path (cdr path)))
- (car path))
-
-@@ -646,7 +674,7 @@
- ;; mh-exec-cmd will display to the user.
- ;; The MH 5 version of install-mh might try prompt the user
- ;; for information, which would fail here.
-- (mh-exec-cmd (expand-file-name "install-mh" mh-lib) "-auto")
-+ (mh-exec-cmd (expand-file-name "install-mh" mh-lib-progs) "-auto")
- ;; now try again to read the profile file
- (erase-buffer)
- (condition-case err
-@@ -918,7 +946,7 @@
- (defun mh-exec-lib-cmd-output (command &rest args)
- ;; Execute MH library command COMMAND with ARGS.
- ;; Put the output into buffer after point. Set mark after inserted text.
-- (apply 'mh-exec-cmd-output (expand-file-name command mh-lib) nil args))
-+ (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args))
-
-
- (defun mh-handle-process-error (command status)
diff --git a/editors/emacs/patches/patch-bf b/editors/emacs/patches/patch-bf
index 16a925d49d5..e5cd3390365 100644
--- a/editors/emacs/patches/patch-bf
+++ b/editors/emacs/patches/patch-bf
@@ -1,4 +1,5 @@
-$NetBSD: patch-bf,v 1.3 1999/12/28 05:35:05 wiz Exp $
+$NetBSD: patch-bf,v 1.4 1999/12/28 14:09:17 tron Exp $
+
--- src/s/netbsd.h.orig Sat Apr 11 11:15:19 1998
+++ src/s/netbsd.h Fri Jun 4 09:41:33 1999
@@ -57,7 +57,7 @@