aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu2008-07-16 08:06:18 +0000
committerDan Nicolaescu2008-07-16 08:06:18 +0000
commit132d04752a194336e0ea965245294af64f27226f (patch)
tree1431f9f0381484382c74033ac993f2bfa5fa8c33 /src
parent316460cf4825107087fed9a93694d3520b90d91f (diff)
downloademacs-132d04752a194336e0ea965245294af64f27226f.tar.gz
emacs-132d04752a194336e0ea965245294af64f27226f.zip
* systty.h: Remove code for Aix on 386, unsupported platform.
* s/ms-w32.h: Remove boilerplate comments. (fcloseall, fgetchar, flushall, fputchar, getw, putw): Remove, unused. * s/gnu-linux.h (TERM): Remove support. (HAVE_SYSVIPC): Remove, unused. (A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Remove, not used for this system. * process.c: Remove support for IRIS, unused. Remove support for TERM, not relevant anymore. * unexalpha.c (DEFAULT_ENTRY_ADDRESS): Remove, replace the only used with the definition. * s/aix4-2.h (static): Do not undef. * m/ibmrs6000.h: Remove code depending on USG5_4, this file is only used on Aix. (HAVE_SYSVIPC): Remove, unused. * m/hp800.h (CANNOT_DUMP): Do not undef. * m/alpha.h: Fix comment. * s/usg5-4.h (HAVE_SYSVIPC): Remove, unused. (USG_SHARED_LIBRARIES): Remove, only used in unexec.c which is not used by this configuration. * emacs.c: Remove code depending on USG_SHARED_LIBRARIES. * unexec.c: Remove code depending on HPUX and USG_SHARED_LIBRARIES, not used with this file. Remove code depending on IRIS, unused. Remove if 0-ed code.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog26
-rw-r--r--src/m/alpha.h4
-rw-r--r--src/m/hp800.h6
-rw-r--r--src/m/ibmrs6000.h29
-rw-r--r--src/process.c59
-rw-r--r--src/s/aix4-2.h18
-rw-r--r--src/s/gnu-linux.h24
-rw-r--r--src/s/ms-w32.h84
-rw-r--r--src/systty.h5
-rw-r--r--src/unexalpha.c11
-rw-r--r--src/unexec.c169
11 files changed, 37 insertions, 398 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d85ed8405b7..091b5b8776c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,31 @@
12008-07-16 Dan Nicolaescu <dann@ics.uci.edu> 12008-07-16 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * systty.h: Remove code for Aix on 386, unsupported platform.
4
5 * s/ms-w32.h: Remove boilerplate comments.
6 (fcloseall, fgetchar, flushall, fputchar, getw, putw): Remove, unused.
7
8 * s/gnu-linux.h (TERM): Remove support.
9 (HAVE_SYSVIPC): Remove, unused.
10 (A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Remove, not used
11 for this system.
12
13 * process.c: Remove support for IRIS, unused.
14 Remove support for TERM, not relevant anymore.
15
16 * unexalpha.c (DEFAULT_ENTRY_ADDRESS): Remove, replace the only
17 used with the definition.
18
19 * s/aix4-2.h (static): Do not undef.
20
21 * m/ibmrs6000.h: Remove code depending on USG5_4, this file is
22 only used on Aix.
23 (HAVE_SYSVIPC): Remove, unused.
24
25 * m/hp800.h (CANNOT_DUMP): Do not undef.
26
27 * m/alpha.h: Fix comment.
28
3 * s/usg5-4.h (HAVE_SYSVIPC): Remove, unused. 29 * s/usg5-4.h (HAVE_SYSVIPC): Remove, unused.
4 (USG_SHARED_LIBRARIES): Remove, only used in unexec.c which is not 30 (USG_SHARED_LIBRARIES): Remove, only used in unexec.c which is not
5 used by this configuration. 31 used by this configuration.
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 2bd42bdf9d2..81863d58b2a 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -44,9 +44,7 @@ NOTE-END
44#define NO_ARG_ARRAY 44#define NO_ARG_ARRAY
45 45
46/* Now define a symbol for the cpu type, if your compiler 46/* Now define a symbol for the cpu type, if your compiler
47 does not define it automatically: 47 does not define it automatically. */
48 Ones defined so far include vax, m68000, ns16000, pyramid,
49 orion, tahoe, APOLLO and many others */
50 48
51/* __alpha defined automatically */ 49/* __alpha defined automatically */
52 50
diff --git a/src/m/hp800.h b/src/m/hp800.h
index 717265d5681..8b3d3f089d3 100644
--- a/src/m/hp800.h
+++ b/src/m/hp800.h
@@ -45,12 +45,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45 45
46#if defined (__hpux) || defined (GNU_LINUX) 46#if defined (__hpux) || defined (GNU_LINUX)
47 47
48/* Define CANNOT_DUMP on machines where unexec does not work.
49 Then the function dump-emacs will not be defined
50 and temacs will do (load "loadup") automatically unless told otherwise. */
51
52#undef CANNOT_DUMP
53
54/* Define NO_REMAP if memory segmentation makes it not work well 48/* Define NO_REMAP if memory segmentation makes it not work well
55 to change the boundary between the text section and data section 49 to change the boundary between the text section and data section
56 when Emacs is dumped. If you define this, the preloaded Lisp 50 when Emacs is dumped. If you define this, the preloaded Lisp
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
index 35f464caa21..7268cf64441 100644
--- a/src/m/ibmrs6000.h
+++ b/src/m/ibmrs6000.h
@@ -41,13 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41 41
42#define IBMR2AIX 42#define IBMR2AIX
43 43
44/* Define CANNOT_DUMP on machines where unexec does not work.
45 Then the function dump-emacs will not be defined
46 and temacs will do (load "loadup") automatically unless told otherwise. */
47#ifdef USG5_4
48#define CANNOT_DUMP
49#endif
50
51#ifndef UNEXEC 44#ifndef UNEXEC
52#define UNEXEC unexaix.o 45#define UNEXEC unexaix.o
53#endif 46#endif
@@ -73,24 +66,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
73#define DATA_SEG_BITS 0 66#define DATA_SEG_BITS 0
74#endif 67#endif
75 68
76#ifdef CANNOT_DUMP
77/* Define shared memory segment symbols */
78
79#define PURE_SEG_BITS 0x30000000
80
81/* Use shared memory. */
82/* This is turned off because it does not always work. See etc/AIX.DUMP. */
83/* #define HAVE_SHM */
84#endif /* CANNOT_DUMP */
85
86#define N_BADMAG(x) BADMAG(x)
87#define N_TXTOFF(x) A_TEXTPOS(x)
88#define N_SYMOFF(x) A_SYMPOS(x)
89#define A_TEXT_OFFSET(HDR) sizeof(HDR)
90/* #define ADJUST_EXEC_HEADER \
91 unexec_text_start += sizeof(hdr); \
92 unexec_data_start = ohdr.a_dbase
93*/
94#undef ADDR_CORRECT 69#undef ADDR_CORRECT
95#define ADDR_CORRECT(x) ((int)(x)) 70#define ADDR_CORRECT(x) ((int)(x))
96 71
@@ -118,7 +93,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
118#endif 93#endif
119 94
120#define START_FILES 95#define START_FILES
121#define HAVE_SYSVIPC
122/*** BUILD 9008 - FIONREAD problem still exists in X-Windows. ***/ 96/*** BUILD 9008 - FIONREAD problem still exists in X-Windows. ***/
123#define BROKEN_FIONREAD 97#define BROKEN_FIONREAD
124/* As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h. 98/* As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h.
@@ -130,9 +104,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
130#define BROKEN_SIGPTY 104#define BROKEN_SIGPTY
131#define BROKEN_SIGPOLL 105#define BROKEN_SIGPOLL
132 106
133/* Don't try to include ptem.h. */
134#undef NEED_PTEM_H
135
136#define ORDINARY_LINK 107#define ORDINARY_LINK
137 108
138#ifndef USG5_4 109#ifndef USG5_4
diff --git a/src/process.c b/src/process.c
index 87772f34f75..0a6e9f302be 100644
--- a/src/process.c
+++ b/src/process.c
@@ -68,11 +68,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
68#endif 68#endif
69#endif /* HAVE_SOCKETS */ 69#endif /* HAVE_SOCKETS */
70 70
71/* TERM is a poor-man's SLIP, used on GNU/Linux. */
72#ifdef TERM
73#include <client.h>
74#endif
75
76#if defined(BSD_SYSTEM) 71#if defined(BSD_SYSTEM)
77#include <sys/ioctl.h> 72#include <sys/ioctl.h>
78#if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) 73#if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5)
@@ -95,10 +90,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
95#endif 90#endif
96#endif 91#endif
97 92
98#ifdef IRIS
99#include <sys/sysmacros.h> /* for "minor" */
100#endif /* not IRIS */
101
102#ifdef HAVE_SYS_WAIT 93#ifdef HAVE_SYS_WAIT
103#include <sys/wait.h> 94#include <sys/wait.h>
104#endif 95#endif
@@ -259,11 +250,6 @@ int update_tick;
259#endif /* DATAGRAM_SOCKETS */ 250#endif /* DATAGRAM_SOCKETS */
260#endif /* BROKEN_DATAGRAM_SOCKETS */ 251#endif /* BROKEN_DATAGRAM_SOCKETS */
261 252
262#ifdef TERM
263#undef NON_BLOCKING_CONNECT
264#undef DATAGRAM_SOCKETS
265#endif
266
267#if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING) 253#if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING)
268#ifdef EMACS_HAS_USECS 254#ifdef EMACS_HAS_USECS
269#define ADAPTIVE_READ_BUFFERING 255#define ADAPTIVE_READ_BUFFERING
@@ -542,14 +528,6 @@ allocate_pty ()
542 PTY_OPEN; 528 PTY_OPEN;
543#else /* no PTY_OPEN */ 529#else /* no PTY_OPEN */
544 { 530 {
545# ifdef IRIS
546 /* Unusual IRIS code */
547 *ptyv = emacs_open ("/dev/ptc", O_RDWR | O_NDELAY, 0);
548 if (fd < 0)
549 return -1;
550 if (fstat (fd, &stb) < 0)
551 return -1;
552# else /* not IRIS */
553 { /* Some systems name their pseudoterminals so that there are gaps in 531 { /* Some systems name their pseudoterminals so that there are gaps in
554 the usual sequence - for example, on HP9000/S700 systems, there 532 the usual sequence - for example, on HP9000/S700 systems, there
555 are no pseudoterminals with names ending in 'f'. So we wait for 533 are no pseudoterminals with names ending in 'f'. So we wait for
@@ -571,7 +549,6 @@ allocate_pty ()
571# else 549# else
572 fd = emacs_open (pty_name, O_RDWR | O_NDELAY, 0); 550 fd = emacs_open (pty_name, O_RDWR | O_NDELAY, 0);
573# endif 551# endif
574# endif /* not IRIS */
575 } 552 }
576#endif /* no PTY_OPEN */ 553#endif /* no PTY_OPEN */
577 554
@@ -587,11 +564,11 @@ allocate_pty ()
587 if (access (pty_name, 6) != 0) 564 if (access (pty_name, 6) != 0)
588 { 565 {
589 emacs_close (fd); 566 emacs_close (fd);
590# if !defined(IRIS) && !defined(__sgi) 567# ifndef __sgi
591 continue; 568 continue;
592# else 569# else
593 return -1; 570 return -1;
594# endif /* IRIS */ 571# endif /* __sgi */
595 } 572 }
596 setup_pty (fd); 573 setup_pty (fd);
597 return fd; 574 return fd;
@@ -3208,7 +3185,7 @@ usage: (make-network-process &rest ARGS) */)
3208 { 3185 {
3209 /* Don't support network sockets when non-blocking mode is 3186 /* Don't support network sockets when non-blocking mode is
3210 not available, since a blocked Emacs is not useful. */ 3187 not available, since a blocked Emacs is not useful. */
3211#if defined(TERM) || (!defined(O_NONBLOCK) && !defined(O_NDELAY)) 3188#if !defined(O_NONBLOCK) && !defined(O_NDELAY)
3212 error ("Network servers not supported"); 3189 error ("Network servers not supported");
3213#else 3190#else
3214 is_server = 1; 3191 is_server = 1;
@@ -3238,32 +3215,6 @@ usage: (make-network-process &rest ARGS) */)
3238 3215
3239 CHECK_STRING (name); 3216 CHECK_STRING (name);
3240 3217
3241#ifdef TERM
3242 /* Let's handle TERM before things get complicated ... */
3243 host = Fplist_get (contact, QChost);
3244 CHECK_STRING (host);
3245
3246 service = Fplist_get (contact, QCservice);
3247 if (INTEGERP (service))
3248 port = htons ((unsigned short) XINT (service));
3249 else
3250 {
3251 struct servent *svc_info;
3252 CHECK_STRING (service);
3253 svc_info = getservbyname (SDATA (service), "tcp");
3254 if (svc_info == 0)
3255 error ("Unknown service: %s", SDATA (service));
3256 port = svc_info->s_port;
3257 }
3258
3259 s = connect_server (0);
3260 if (s < 0)
3261 report_file_error ("error creating socket", Fcons (name, Qnil));
3262 send_command (s, C_PORT, 0, "%s:%d", SDATA (host), ntohs (port));
3263 send_command (s, C_DUMB, 1, 0);
3264
3265#else /* not TERM */
3266
3267 /* Initialize addrinfo structure in case we don't use getaddrinfo. */ 3218 /* Initialize addrinfo structure in case we don't use getaddrinfo. */
3268 ai.ai_socktype = socktype; 3219 ai.ai_socktype = socktype;
3269 ai.ai_protocol = 0; 3220 ai.ai_protocol = 0;
@@ -3674,8 +3625,6 @@ usage: (make-network-process &rest ARGS) */)
3674 report_file_error ("make client process failed", contact); 3625 report_file_error ("make client process failed", contact);
3675 } 3626 }
3676 3627
3677#endif /* not TERM */
3678
3679 inch = s; 3628 inch = s;
3680 outch = s; 3629 outch = s;
3681 3630
@@ -7295,7 +7244,7 @@ init_process ()
7295#ifdef HAVE_GETSOCKNAME 7244#ifdef HAVE_GETSOCKNAME
7296 ADD_SUBFEATURE (QCservice, Qt); 7245 ADD_SUBFEATURE (QCservice, Qt);
7297#endif 7246#endif
7298#if !defined(TERM) && (defined(O_NONBLOCK) || defined(O_NDELAY)) 7247#if defined(O_NONBLOCK) || defined(O_NDELAY)
7299 ADD_SUBFEATURE (QCserver, Qt); 7248 ADD_SUBFEATURE (QCserver, Qt);
7300#endif 7249#endif
7301 7250
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index f3d3c4dd578..e5a8cbdab9a 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -59,12 +59,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
59 59
60#define HAVE_SOCKETS 60#define HAVE_SOCKETS
61 61
62/*
63 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
64 * The 4.2 opendir, etc., library functions.
65 */
66
67/* #define NONSYSTEM_DIR_LIBRARY */
68 62
69/* 63/*
70 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir 64 * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
@@ -96,18 +90,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
96 90
97/* Special itemss needed to make Emacs run on this system. */ 91/* Special itemss needed to make Emacs run on this system. */
98 92
99
100
101/* USG systems tend to put everything declared static
102 into the initialized data area, which becomes pure after dumping Emacs.
103 Foil this. Emacs carefully avoids static vars inside functions. */
104
105#undef static
106
107/* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
108
109/* #define ADDR_CORRECT(x) (x) */
110
111#ifndef __GNUC__ 93#ifndef __GNUC__
112#define LINKER cc 94#define LINKER cc
113#endif 95#endif
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 1904d71b6c8..445694987fd 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -90,7 +90,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
90 90
91#define FIRST_PTY_LETTER 'p' 91#define FIRST_PTY_LETTER 'p'
92 92
93#endif /* not HAVE_GRANDPT */ 93#endif /* not HAVE_GRANTPT */
94 94
95/* Define HAVE_TERMIOS if the system provides POSIX-style 95/* Define HAVE_TERMIOS if the system provides POSIX-style
96 functions and macros for terminal control. */ 96 functions and macros for terminal control. */
@@ -153,12 +153,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
153 your system and must be used only through an encapsulation 153 your system and must be used only through an encapsulation
154 (Which you should place, by convention, in sysdep.c). */ 154 (Which you should place, by convention, in sysdep.c). */
155 155
156/* If you mount the proc file system somewhere other than /proc
157 you will have to uncomment the following and make the proper
158 changes */
159
160/* #define LINUX_LDAV_FILE "/proc/loadavg" */
161
162/* This is needed for dispnew.c:update_frame */ 156/* This is needed for dispnew.c:update_frame */
163 157
164#ifdef emacs 158#ifdef emacs
@@ -220,14 +214,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
220#define C_DEBUG_SWITCH 214#define C_DEBUG_SWITCH
221#endif 215#endif
222 216
223/* Rob Malouf <malouf@csli.stanford.edu> says:
224 SYSV IPC is standard a standard part of Linux since version 0.99pl10,
225 and is a very common addition to previous versions. */
226
227#ifdef TERM
228#define LIBS_SYSTEM -lclient
229#define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term
230#else
231/* alane@wozzle.linet.org says that -lipc is not a separate library, 217/* alane@wozzle.linet.org says that -lipc is not a separate library,
232 since libc-4.4.1. So -lipc was deleted. */ 218 since libc-4.4.1. So -lipc was deleted. */
233#define LIBS_SYSTEM 219#define LIBS_SYSTEM
@@ -235,7 +221,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
235 _GNU_SOURCE. Left in in case it's relevant to libc5 systems and 221 _GNU_SOURCE. Left in in case it's relevant to libc5 systems and
236 anyone's still using Emacs on those. --fx 2002-12-14 */ 222 anyone's still using Emacs on those. --fx 2002-12-14 */
237#define C_SWITCH_SYSTEM -D_BSD_SOURCE 223#define C_SWITCH_SYSTEM -D_BSD_SOURCE
238#endif
239 224
240/* Paul Abrahams <abrahams@equinox.shaysnet.com> says this is needed. */ 225/* Paul Abrahams <abrahams@equinox.shaysnet.com> says this is needed. */
241#define LIB_MOTIF -lXm -lXpm 226#define LIB_MOTIF -lXm -lXpm
@@ -245,15 +230,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
245#define LIBS_TERMCAP -lncurses 230#define LIBS_TERMCAP -lncurses
246#endif 231#endif
247 232
248#define HAVE_SYSVIPC
249
250#define UNEXEC unexelf.o 233#define UNEXEC unexelf.o
251 234
252#define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0)
253#define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
254#define ADJUST_EXEC_HEADER \
255 unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr)
256
257/* This is to work around mysterious gcc failures in some system versions. 235/* This is to work around mysterious gcc failures in some system versions.
258 It is unlikely that Emacs changes will work around this problem; 236 It is unlikely that Emacs changes will work around this problem;
259 therefore, this should remain permanently. */ 237 therefore, this should remain permanently. */
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index 104f55f9037..87ed079bff9 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -46,81 +46,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
46 46
47#define NO_MATHERR 1 47#define NO_MATHERR 1
48 48
49/* NOMULTIPLEJOBS should be defined if your system's shell
50 does not have "job control" (the ability to stop a program,
51 run some other program, then continue the first one). */
52
53/* #define NOMULTIPLEJOBS 1 */
54
55/* Emacs can read input using SIGIO and buffering characters itself,
56 or using CBREAK mode and making C-g cause SIGINT.
57 The choice is controlled by the variable interrupt_input.
58
59 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
60
61 Emacs uses the presence or absence of the SIGIO macro to indicate
62 whether or not signal-driven I/O is possible. It uses
63 INTERRUPT_INPUT to decide whether to use it by default.
64
65 SIGIO can be used only on systems that implement it (4.2 and 4.3).
66 CBREAK mode has two disadvantages
67 1) At least in 4.2, it is impossible to handle the Meta key properly.
68 I hear that in system V this problem does not exist.
69 2) Control-G causes output to be discarded.
70 I do not know whether this can be fixed in system V.
71
72 Another method of doing input is planned but not implemented.
73 It would have Emacs fork off a separate process
74 to read the input and send it to the true Emacs process
75 through a pipe. */
76
77/* #define INTERRUPT_INPUT 1 */
78
79/* Letter to use in finding device name of first pty, 49/* Letter to use in finding device name of first pty,
80 if system supports pty's. 'a' means it is /dev/ptya0 */ 50 if system supports pty's. 'a' means it is /dev/ptya0 */
81 51
82#define FIRST_PTY_LETTER 'a' 52#define FIRST_PTY_LETTER 'a'
83 53
84/* 54/*
85 * Define HAVE_TERMIOS if the system provides POSIX-style
86 * functions and macros for terminal control.
87 *
88 * Define HAVE_TERMIO if the system provides sysV-style ioctls
89 * for terminal control.
90 *
91 * Do not define both. HAVE_TERMIOS is preferred, if it is
92 * supported on your system.
93 */
94
95/* #define HAVE_TERMIOS 1 */
96/* #define HAVE_TERMIO 1 */
97
98/*
99 * Define HAVE_TIMEVAL if the system supports the BSD style clock values. 55 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
100 * Look in <sys/time.h> for a timeval structure. 56 * Look in <sys/time.h> for a timeval structure.
101 */ 57 */
102 58
103#define HAVE_TIMEVAL 1 59#define HAVE_TIMEVAL 1
104 60
105/*
106 * Define HAVE_SELECT if the system supports the `select' system call.
107 */
108
109/* #define HAVE_SELECT 1 */
110
111/*
112 * Define HAVE_PTYS if the system supports pty devices.
113 */
114
115/* #define HAVE_PTYS 1 */
116
117/*
118 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
119 * The 4.2 opendir, etc., library functions.
120 */
121
122/* #define NONSYSTEM_DIR_LIBRARY */
123
124/* NT supports Winsock which is close enough (with some hacks) */ 61/* NT supports Winsock which is close enough (with some hacks) */
125 62
126#define HAVE_SOCKETS 1 63#define HAVE_SOCKETS 1
@@ -169,21 +106,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
169#define MAIL_USE_POP 1 106#define MAIL_USE_POP 1
170#define MAIL_USE_SYSTEM_LOCK 1 107#define MAIL_USE_SYSTEM_LOCK 1
171 108
172/* Define CLASH_DETECTION if you want lock files to be written
173 so that Emacs can tell instantly when you try to modify
174 a file that someone else has modified in his Emacs. */
175
176/* #define CLASH_DETECTION 1 */
177
178/* Define this if your operating system declares signal handlers to
179 have a type other than the usual. `The usual' is `void' for ANSI C
180 systems (i.e. when the __STDC__ macro is defined), and `int' for
181 pre-ANSI systems. If you're using GCC on an older system, __STDC__
182 will be defined, but the system's include files will still say that
183 signal returns int or whatever; in situations like that, define
184 this to be what the system's include files want. */
185/* #define SIGTYPE int */
186
187/* If the character used to separate elements of the executable path 109/* If the character used to separate elements of the executable path
188 is not ':', #define this to be the appropriate character constant. */ 110 is not ':', #define this to be the appropriate character constant. */
189#define SEPCHAR ';' 111#define SEPCHAR ';'
@@ -353,17 +275,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
353/* map to MSVC names */ 275/* map to MSVC names */
354#define execlp _execlp 276#define execlp _execlp
355#define execvp _execvp 277#define execvp _execvp
356#define fcloseall _fcloseall
357#define fdopen _fdopen 278#define fdopen _fdopen
358#define fgetchar _fgetchar
359#ifndef fileno 279#ifndef fileno
360#define fileno _fileno 280#define fileno _fileno
361#endif 281#endif
362#define flushall _flushall
363#define fputchar _fputchar
364#define fsync _commit 282#define fsync _commit
365#define ftruncate _chsize 283#define ftruncate _chsize
366#define getw _getw
367#define getpid _getpid 284#define getpid _getpid
368#ifdef _MSC_VER 285#ifdef _MSC_VER
369typedef int pid_t; 286typedef int pid_t;
@@ -374,7 +291,6 @@ typedef int pid_t;
374#define lseek _lseek 291#define lseek _lseek
375#define popen _popen 292#define popen _popen
376#define pclose _pclose 293#define pclose _pclose
377#define putw _putw
378#define umask _umask 294#define umask _umask
379#define utimbuf _utimbuf 295#define utimbuf _utimbuf
380#define index strchr 296#define index strchr
diff --git a/src/systty.h b/src/systty.h
index 6020951ec76..580513a1080 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -33,15 +33,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
33#endif 33#endif
34#else /* not HAVE_TERMIO */ 34#else /* not HAVE_TERMIO */
35#ifdef HAVE_TERMIOS 35#ifdef HAVE_TERMIOS
36#if defined(_AIX) && defined(_I386)
37#include <termios.h> /* termios.h needs to be before termio.h */
38#include <termio.h>
39#else /* not (_AIX && _I386) */
40#ifndef NO_TERMIO 36#ifndef NO_TERMIO
41#include <termio.h> 37#include <termio.h>
42#endif 38#endif
43#include <termios.h> 39#include <termios.h>
44#endif /* not (_AIX && _I386) */
45#define INCLUDED_FCNTL 40#define INCLUDED_FCNTL
46#include <fcntl.h> 41#include <fcntl.h>
47#else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ 42#else /* neither HAVE_TERMIO nor HAVE_TERMIOS */
diff --git a/src/unexalpha.c b/src/unexalpha.c
index 5f711b6e488..604a70b8e24 100644
--- a/src/unexalpha.c
+++ b/src/unexalpha.c
@@ -134,13 +134,6 @@ struct headers {
134 struct scnhdr section[_MIPS_NSCNS_MAX]; 134 struct scnhdr section[_MIPS_NSCNS_MAX];
135}; 135};
136 136
137
138
139/* Define name of label for entry point for the dumped executable. */
140
141#ifndef DEFAULT_ENTRY_ADDRESS
142#define DEFAULT_ENTRY_ADDRESS __start
143#endif
144 137
145void 138void
146unexec (new_name, a_name, data_start, bss_start, entry_address) 139unexec (new_name, a_name, data_start, bss_start, entry_address)
@@ -271,8 +264,8 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
271 nhdr.aout.bsize = 0; 264 nhdr.aout.bsize = 0;
272 if (entry_address == 0) 265 if (entry_address == 0)
273 { 266 {
274 extern DEFAULT_ENTRY_ADDRESS (); 267 extern __start ();
275 nhdr.aout.entry = (unsigned long)DEFAULT_ENTRY_ADDRESS; 268 nhdr.aout.entry = (unsigned long)__start;
276 } 269 }
277 else 270 else
278 nhdr.aout.entry = entry_address; 271 nhdr.aout.entry = entry_address;
diff --git a/src/unexec.c b/src/unexec.c
index 7116685051b..82d65f85877 100644
--- a/src/unexec.c
+++ b/src/unexec.c
@@ -229,41 +229,11 @@ static long coff_offset;
229 229
230#else /* not COFF */ 230#else /* not COFF */
231 231
232#ifdef HPUX
233extern void *sbrk ();
234#else
235#if 0
236/* Some systems with __STDC__ compilers still declare this `char *' in some
237 header file, and our declaration conflicts. The return value is always
238 cast, so it should be harmless to leave it undefined. Hopefully
239 machines with different size pointers and ints declare sbrk in a header
240 file. */
241#ifdef __STDC__
242extern void *sbrk ();
243#else
244extern char *sbrk (); 232extern char *sbrk ();
245#endif /* __STDC__ */
246#endif
247#endif /* HPUX */
248 233
249#define SYMS_START ((long) N_SYMOFF (ohdr)) 234#define SYMS_START ((long) N_SYMOFF (ohdr))
250 235
251#ifdef HPUX 236#if defined (USG)
252#ifdef HP9000S200_ID
253#define MY_ID HP9000S200_ID
254#else
255#include <model.h>
256#define MY_ID MYSYS
257#endif /* no HP9000S200_ID */
258static MAGIC OLDMAGIC = {MY_ID, SHARE_MAGIC};
259static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC};
260#define N_TXTOFF(x) TEXT_OFFSET(x)
261#define N_SYMOFF(x) LESYM_OFFSET(x)
262static struct exec hdr, ohdr;
263
264#else /* not HPUX */
265
266#if defined (USG) && !defined (IRIS) && !defined (GNU_LINUX)
267static struct bhdr hdr, ohdr; 237static struct bhdr hdr, ohdr;
268#define a_magic fmagic 238#define a_magic fmagic
269#define a_text tsize 239#define a_text tsize
@@ -277,11 +247,10 @@ static struct bhdr hdr, ohdr;
277 (((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\ 247 (((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\
278 ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC) 248 ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
279#define NEWMAGIC FMAGIC 249#define NEWMAGIC FMAGIC
280#else /* IRIS or not USG */ 250#else /* not USG */
281static struct exec hdr, ohdr; 251static struct exec hdr, ohdr;
282#define NEWMAGIC ZMAGIC 252#define NEWMAGIC ZMAGIC
283#endif /* IRIS or not USG */ 253#endif /* not USG */
284#endif /* not HPUX */
285 254
286static int unexec_text_start; 255static int unexec_text_start;
287static int unexec_data_start; 256static int unexec_data_start;
@@ -358,11 +327,7 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
358 auto struct scnhdr scntemp; /* Temporary section header */ 327 auto struct scnhdr scntemp; /* Temporary section header */
359 register int scns; 328 register int scns;
360#endif /* COFF */ 329#endif /* COFF */
361#ifdef USG_SHARED_LIBRARIES
362 extern unsigned int bss_end;
363#else
364 unsigned int bss_end; 330 unsigned int bss_end;
365#endif
366 331
367 pagemask = getpagesize () - 1; 332 pagemask = getpagesize () - 1;
368 333
@@ -479,17 +444,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
479 /* Now we alter the contents of all the f_*hdr variables 444 /* Now we alter the contents of all the f_*hdr variables
480 to correspond to what we want to dump. */ 445 to correspond to what we want to dump. */
481 446
482#ifdef USG_SHARED_LIBRARIES
483
484 /* The amount of data we're adding to the file is distance from the
485 * end of the original .data space to the current end of the .data
486 * space.
487 */
488
489 bias = bss_start - (f_ohdr.data_start + f_dhdr.s_size);
490
491#endif
492
493 f_hdr.f_flags |= (F_RELFLG | F_EXEC); 447 f_hdr.f_flags |= (F_RELFLG | F_EXEC);
494#ifndef NO_REMAP 448#ifndef NO_REMAP
495 f_ohdr.text_start = (long) start_of_text (); 449 f_ohdr.text_start = (long) start_of_text ();
@@ -532,9 +486,7 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
532 f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize; 486 f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize;
533 f_bhdr.s_size = f_ohdr.bsize; 487 f_bhdr.s_size = f_ohdr.bsize;
534 f_bhdr.s_scnptr = 0L; 488 f_bhdr.s_scnptr = 0L;
535#ifndef USG_SHARED_LIBRARIES
536 bias = f_dhdr.s_scnptr + f_dhdr.s_size - block_copy_start; 489 bias = f_dhdr.s_scnptr + f_dhdr.s_size - block_copy_start;
537#endif
538 490
539 if (f_hdr.f_symptr > 0L) 491 if (f_hdr.f_symptr > 0L)
540 { 492 {
@@ -560,8 +512,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
560 PERROR (new_name); 512 PERROR (new_name);
561 } 513 }
562 514
563#ifndef USG_SHARED_LIBRARIES
564
565 if (write (new, &f_thdr, sizeof (f_thdr)) != sizeof (f_thdr)) 515 if (write (new, &f_thdr, sizeof (f_thdr)) != sizeof (f_thdr))
566 { 516 {
567 PERROR (new_name); 517 PERROR (new_name);
@@ -577,55 +527,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
577 PERROR (new_name); 527 PERROR (new_name);
578 } 528 }
579 529
580#else /* USG_SHARED_LIBRARIES */
581
582 /* The purpose of this code is to write out the new file's section
583 * header table.
584 *
585 * Scan through the original file's sections. If the encountered
586 * section is one we know (.text, .data or .bss), write out the
587 * correct header. If it is a section we do not know (such as
588 * .lib), adjust the address of where the section data is in the
589 * file, and write out the header.
590 *
591 * If any section precedes .text or .data in the file, this code
592 * will not adjust the file pointer for that section correctly.
593 */
594
595 /* This used to use sizeof (f_ohdr) instead of .f_opthdr.
596 .f_opthdr is said to be right when there is no optional header. */
597 lseek (a_out, sizeof (f_hdr) + f_hdr.f_opthdr, 0);
598
599 for (scns = f_hdr.f_nscns; scns > 0; scns--)
600 {
601 if (read (a_out, &scntemp, sizeof (scntemp)) != sizeof (scntemp))
602 PERROR (a_name);
603
604 if (!strcmp (scntemp.s_name, f_thdr.s_name)) /* .text */
605 {
606 if (write (new, &f_thdr, sizeof (f_thdr)) != sizeof (f_thdr))
607 PERROR (new_name);
608 }
609 else if (!strcmp (scntemp.s_name, f_dhdr.s_name)) /* .data */
610 {
611 if (write (new, &f_dhdr, sizeof (f_dhdr)) != sizeof (f_dhdr))
612 PERROR (new_name);
613 }
614 else if (!strcmp (scntemp.s_name, f_bhdr.s_name)) /* .bss */
615 {
616 if (write (new, &f_bhdr, sizeof (f_bhdr)) != sizeof (f_bhdr))
617 PERROR (new_name);
618 }
619 else
620 {
621 if (scntemp.s_scnptr)
622 scntemp.s_scnptr += bias;
623 if (write (new, &scntemp, sizeof (scntemp)) != sizeof (scntemp))
624 PERROR (new_name);
625 }
626 }
627#endif /* USG_SHARED_LIBRARIES */
628
629 return (0); 530 return (0);
630 531
631#else /* if not COFF */ 532#else /* if not COFF */
@@ -684,11 +585,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
684 PERROR (new_name); 585 PERROR (new_name);
685 } 586 }
686 587
687#if 0 /* This #ifndef caused a bug on GNU/Linux when using QMAGIC. */
688 /* This adjustment was done above only #ifndef NO_REMAP,
689 so only undo it now #ifndef NO_REMAP. */
690 /* #ifndef NO_REMAP */
691#endif
692#ifdef A_TEXT_OFFSET 588#ifdef A_TEXT_OFFSET
693 hdr.a_text -= A_TEXT_OFFSET (ohdr); 589 hdr.a_text -= A_TEXT_OFFSET (ohdr);
694#endif 590#endif
@@ -767,63 +663,6 @@ copy_text_and_data (new, a_out)
767 663
768#ifdef COFF 664#ifdef COFF
769 665
770#ifdef USG_SHARED_LIBRARIES
771
772 int scns;
773 struct scnhdr scntemp; /* Temporary section header */
774
775 /* The purpose of this code is to write out the new file's section
776 * contents.
777 *
778 * Step through the section table. If we know the section (.text,
779 * .data) do the appropriate thing. Otherwise, if the section has
780 * no allocated space in the file (.bss), do nothing. Otherwise,
781 * the section has space allocated in the file, and is not a section
782 * we know. So just copy it.
783 */
784
785 lseek (a_out, sizeof (struct filehdr) + sizeof (struct aouthdr), 0);
786
787 for (scns = f_hdr.f_nscns; scns > 0; scns--)
788 {
789 if (read (a_out, &scntemp, sizeof (scntemp)) != sizeof (scntemp))
790 PERROR ("temacs");
791
792 if (!strcmp (scntemp.s_name, ".text"))
793 {
794 lseek (new, (long) text_scnptr, 0);
795 ptr = (char *) f_ohdr.text_start;
796 end = ptr + f_ohdr.tsize;
797 write_segment (new, ptr, end);
798 }
799 else if (!strcmp (scntemp.s_name, ".data"))
800 {
801 lseek (new, (long) data_scnptr, 0);
802 ptr = (char *) f_ohdr.data_start;
803 end = ptr + f_ohdr.dsize;
804 write_segment (new, ptr, end);
805 }
806 else if (!scntemp.s_scnptr)
807 ; /* do nothing - no data for this section */
808 else
809 {
810 char page[BUFSIZ];
811 int size, n;
812 long old_a_out_ptr = lseek (a_out, 0, 1);
813
814 lseek (a_out, scntemp.s_scnptr, 0);
815 for (size = scntemp.s_size; size > 0; size -= sizeof (page))
816 {
817 n = size > sizeof (page) ? sizeof (page) : size;
818 if (read (a_out, page, n) != n || write (new, page, n) != n)
819 PERROR ("emacs");
820 }
821 lseek (a_out, old_a_out_ptr, 0);
822 }
823 }
824
825#else /* COFF, but not USG_SHARED_LIBRARIES */
826
827#ifdef MSDOS 666#ifdef MSDOS
828#if __DJGPP__ >= 2 667#if __DJGPP__ >= 2
829 /* Dump the original table of exception handlers, not the one 668 /* Dump the original table of exception handlers, not the one
@@ -857,8 +696,6 @@ copy_text_and_data (new, a_out)
857#endif 696#endif
858#endif 697#endif
859 698
860#endif /* USG_SHARED_LIBRARIES */
861
862#else /* if not COFF */ 699#else /* if not COFF */
863 700
864/* Some machines count the header as part of the text segment. 701/* Some machines count the header as part of the text segment.