aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-02-09 18:03:10 +0000
committerDan Nicolaescu2008-02-09 18:03:10 +0000
commit4624371d9a4c1a078bcb7a305adb0520cd8975bc (patch)
tree3e976f55d9448bda9ab36215bd5673c0eab68d45
parent87e391bb24d57ce8c27226542ba11ea5f924689d (diff)
downloademacs-4624371d9a4c1a078bcb7a305adb0520cd8975bc.tar.gz
emacs-4624371d9a4c1a078bcb7a305adb0520cd8975bc.zip
* configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code
dealing with obsolete variables. * fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional. (main): Replace MAIL_PROGRAM_NAME with its value. * src/Makefile.in: * src/emacs.c: * src/gmalloc.c: * src/keyboard.c: * src/lisp.h: * src/m/ibm370aix.h: * src/process.c: * src/regex.c: * src/s/hpux.h: * src/sysdep.c: * src/sysselect.h: * src/systty.h: * src/unexec.c: * src/w32term.c: * src/xsmfns.c: * src/xterm.c: Remove code that deals with obsolete variables. * s/msdos.h (DONT_NEED_ENVIRON): Don't define. * ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test, nothing else needs it anymore.
-rw-r--r--ChangeLog5
-rw-r--r--admin/CPP-DEFINES66
-rw-r--r--configure.in18
-rw-r--r--lib-src/ChangeLog3
-rw-r--r--lib-src/fakemail.c6
-rw-r--r--src/ChangeLog24
-rw-r--r--src/Makefile.in20
-rw-r--r--src/ecrt0.c2
-rw-r--r--src/emacs.c10
-rw-r--r--src/gmalloc.c19
-rw-r--r--src/keyboard.c2
-rw-r--r--src/lisp.h10
-rw-r--r--src/m/ibm370aix.h6
-rw-r--r--src/process.c33
-rw-r--r--src/regex.c4
-rw-r--r--src/s/hpux.h3
-rw-r--r--src/s/msdos.h1
-rw-r--r--src/sysdep.c46
-rw-r--r--src/sysselect.h2
-rw-r--r--src/systty.h2
-rw-r--r--src/unexec.c43
-rw-r--r--src/w32term.c7
-rw-r--r--src/xsmfns.c7
-rw-r--r--src/xterm.c7
24 files changed, 57 insertions, 289 deletions
diff --git a/ChangeLog b/ChangeLog
index de1023d3b0f..30e365af25b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code
4 dealing with obsolete variables.
5
12008-02-08 Glenn Morris <rgm@gnu.org> 62008-02-08 Glenn Morris <rgm@gnu.org>
2 7
3 * Makefile.in (check-info-dir): New target. 8 * Makefile.in (check-info-dir): New target.
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index 4d2d642eb52..f951a4686d4 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -42,23 +42,17 @@ FRAME_WINDOW_P A GUI frame (like X, w32, etc.)
42REL_ALLOC Compile in the relocatable memory allocator ralloc.c. 42REL_ALLOC Compile in the relocatable memory allocator ralloc.c.
43SYSTEM_MALLOC Use the system library's malloc. 43SYSTEM_MALLOC Use the system library's malloc.
44 44
45** All references to these symbols should be removed, all their definitions are gone ** 45** Replace, the definition is trivial: SWITCH_ENUM_CAST
46
47NU
48romp
49 46
50** Temporarily put defines from removed files here, check if these macros need to be documented or removed because they are not used anymore. ** 47** Temporarily put defines from removed files here, check if these macros need to be documented or removed because they are not used anymore. **
51 48
52ABORT_RETURN_TYPE
53ADDR_CORRECT 49ADDR_CORRECT
54ADJUST_EXEC_HEADER
55ADJUST_TEXTBASE 50ADJUST_TEXTBASE
56ADJUST_TEXT_SCNHDR_SIZE 51ADJUST_TEXT_SCNHDR_SIZE
57A_TEXT_OFFSET 52A_TEXT_OFFSET
58A_TEXT_SEEK 53A_TEXT_SEEK
59BAUD_CONVERT 54BAUD_CONVERT
60BROKEN_FIONREAD 55BROKEN_FIONREAD
61BROKEN_SELECT_NON_X
62BROKEN_SIGIO 56BROKEN_SIGIO
63BROKEN_TIOCGETC 57BROKEN_TIOCGETC
64BROKEN_TIOCGWINSZ 58BROKEN_TIOCGWINSZ
@@ -72,11 +66,9 @@ CANNOT_DUMP
72CLASH_DETECTION 66CLASH_DETECTION
73COFF 67COFF
74COFF_BSD_SYMBOLS 68COFF_BSD_SYMBOLS
75CRT0_COMPILE
76CRT0_DUMMIES 69CRT0_DUMMIES
77C_DEBUG_SWITCH 70C_DEBUG_SWITCH
78C_OPTIMIZE_SWITCH 71C_OPTIMIZE_SWITCH
79C_SWITCH_ASM
80C_SWITCH_MACHINE 72C_SWITCH_MACHINE
81C_SWITCH_SYSTEM 73C_SWITCH_SYSTEM
82DATA_END 74DATA_END
@@ -86,27 +78,18 @@ DATA_START
86DEBUG 78DEBUG
87DECLARE_GETPWUID_WITH_UID_T 79DECLARE_GETPWUID_WITH_UID_T
88DEFAULT_ENTRY_ADDRESS 80DEFAULT_ENTRY_ADDRESS
89DONT_NEED_ENVIRON
90DOT_GLOBAL_START 81DOT_GLOBAL_START
91DUMMIES 82DUMMIES
92EEOF
93ELF 83ELF
94EXEC_HDR_TYPE
95EXEC_MAGIC
96EXEC_PAGESIZE 84EXEC_PAGESIZE
97EXPLICIT_SIGN_EXTEND 85EXPLICIT_SIGN_EXTEND
98EXTRA_INITIALIZE
99FIRST_PTY_LETTER 86FIRST_PTY_LETTER
100FREE_RETURN_TYPE
101FSCALE 87FSCALE
102F_SETOWN_BUG
103F_SETOWN_SOCK_NEG
104GC_MARK_STACK 88GC_MARK_STACK
105GC_SETJMP_WORKS 89GC_SETJMP_WORKS
106GETPGRP_NO_ARG 90GETPGRP_NO_ARG
107GNU_MALLOC 91GNU_MALLOC
108HAVE_ALLOCA 92HAVE_ALLOCA
109HAVE_BROKEN_INET_ADDR
110HAVE_CLOSEDIR 93HAVE_CLOSEDIR
111HAVE_CONFIG_H 94HAVE_CONFIG_H
112HAVE_CRTN 95HAVE_CRTN
@@ -131,33 +114,24 @@ HAVE_UNIX_DOMAIN
131HAVE_UTIMES 114HAVE_UTIMES
132HAVE_WAIT_HEADER 115HAVE_WAIT_HEADER
133HAVE_X11R6 116HAVE_X11R6
134HAVE_XFREE386
135HAVE_XSCREENNUMBEROFSCREEN 117HAVE_XSCREENNUMBEROFSCREEN
136HAVE_X_WINDOWS 118HAVE_X_WINDOWS
137HEADER_INCL_IN_TEXT
138IBMAIX
139INHIBIT_X11R6_XIM 119INHIBIT_X11R6_XIM
140INIT_BAUD_RATE
141INTEL386 120INTEL386
142INTERRUPT_INPUT 121INTERRUPT_INPUT
143IN_UNEXEC
144IRIS 122IRIS
145IRIS_4D 123IRIS_4D
146IRIX6_5 124IRIX6_5
147IRIX_FORCE_32_BITS 125IRIX_FORCE_32_BITS
148KEEP_OLD_PADDR
149KEEP_OLD_TEXT_SCNPTR
150KERNEL_FILE 126KERNEL_FILE
151LDAV_SYMBOL 127LDAV_SYMBOL
152LD_SWITCH_MACHINE 128LD_SWITCH_MACHINE
153LD_SWITCH_SYSTEM 129LD_SWITCH_SYSTEM
154LD_SWITCH_SYSTEM_TEMACS 130LD_SWITCH_SYSTEM_TEMACS
155LD_TEXT_START_ADDR
156LIBS_DEBUG 131LIBS_DEBUG
157LIBS_MACHINE 132LIBS_MACHINE
158LIBS_SYSTEM 133LIBS_SYSTEM
159LIBS_TERMCAP 134LIBS_TERMCAP
160LIBX11_MACHINE
161LIBX11_SYSTEM 135LIBX11_SYSTEM
162LIBXMU 136LIBXMU
163LIB_GCC 137LIB_GCC
@@ -167,44 +141,29 @@ LIB_X11_LIB
167LINKER 141LINKER
168LOAD_AVE_CVT 142LOAD_AVE_CVT
169LOAD_AVE_TYPE 143LOAD_AVE_TYPE
170L_SET
171MAIL_PROGRAM_NAME
172MAIL_USE_FLOCK 144MAIL_USE_FLOCK
173MAXNAMLEN
174MEMMOVE_MISSING
175MEMORY_IN_STRING_H
176MKDIR_PROTOTYPE 145MKDIR_PROTOTYPE
177MOTIF 146MOTIF
178NARROWPROTO 147NARROWPROTO
179NEED_ERRNO 148NEED_ERRNO
180NEED_NET_ERRNO_H
181NEED_PTEM_H 149NEED_PTEM_H
182NEED_SIOCTL 150NEED_SIOCTL
183NEW_PROGRAM_H
184NEW_SECTION_H
185NLIST_NAME_UNION
186NLIST_STRUCT 151NLIST_STRUCT
187NOMULTIPLEJOBS 152NOMULTIPLEJOBS
188NONSYSTEM_DIR_LIBRARY 153NONSYSTEM_DIR_LIBRARY
189NOT_C_CODE 154NOT_C_CODE
190NO_ARG_ARRAY 155NO_ARG_ARRAY
191NO_GET_LOAD_AVG
192NO_MODE_T 156NO_MODE_T
193NO_PTY_H
194NO_REMAP 157NO_REMAP
195NO_SIOCTL_H 158NO_SIOCTL_H
196NO_SOCKETS_IN_FILE_SYSTEM
197NO_SOCK_SIGIO 159NO_SOCK_SIGIO
198NO_TERMIO 160NO_TERMIO
199NO_UNION_TYPE 161NO_UNION_TYPE
200NO_UNION_TYPE
201NSIG 162NSIG
202NSIG_MINIMUM 163NSIG_MINIMUM
203OBJECTS_MACHINE 164OBJECTS_MACHINE
204ORDINARY_LINK 165ORDINARY_LINK
205OSF1
206O_NDELAY 166O_NDELAY
207PATCH_INDEX
208PENDING_OUTPUT_COUNT 167PENDING_OUTPUT_COUNT
209PERROR 168PERROR
210PNTR_COMPARISON_TYPE 169PNTR_COMPARISON_TYPE
@@ -224,20 +183,12 @@ SEGMENT_MASK
224SEGSIZ 183SEGSIZ
225SETUP_SLAVE_PTY 184SETUP_SLAVE_PTY
226SHORTNAMES 185SHORTNAMES
227SHORT_CAST_BUG
228SIGMASKTYPE 186SIGMASKTYPE
229SIGNALS_VIA_CHARACTERS 187SIGNALS_VIA_CHARACTERS
230SIGN_EXTEND_CHAR 188SIGN_EXTEND_CHAR
231SIGTYPE 189SIGTYPE
232SIG_BLOCK
233SKTPAIR
234SMAIL
235START_FILES 190START_FILES
236SUNOS4
237SUNOS_LOCALTIME_BUG
238SVR4 191SVR4
239SWITCH_ENUM_BUG
240SYMS_START
241SYSTEM_MALLOC 192SYSTEM_MALLOC
242SYSTEM_TYPE 193SYSTEM_TYPE
243SYSV_PTYS 194SYSV_PTYS
@@ -252,15 +203,10 @@ TERMCAP
252TERMINFO 203TERMINFO
253TEXT_END 204TEXT_END
254TEXT_START 205TEXT_START
255TEXT_START_ADDR
256THIS_IS_MAKEFILE 206THIS_IS_MAKEFILE
257TPIX
258ULIMIT_BREAK_VALUE 207ULIMIT_BREAK_VALUE
259UNEXEC 208UNEXEC
260USE_DL_STUBS
261USE_GETOBAUD
262USE_MMAP_FOR_BUFFERS 209USE_MMAP_FOR_BUFFERS
263USE_NONANSI_DEFUN
264USG 210USG
265USG5 211USG5
266USG5_3 212USG5_3
@@ -270,9 +216,6 @@ USG_SHARED_LIBRARIES
270VIRT_ADDR_VARIES 216VIRT_ADDR_VARIES
271WORDS_BIG_ENDIAN 217WORDS_BIG_ENDIAN
272WORD_MACHINE 218WORD_MACHINE
273WRITE
274X11R4
275XICCC
276XINT 219XINT
277XSET 220XSET
278XUINT 221XUINT
@@ -280,26 +223,19 @@ X_DEFAULT_FONT
280_ABIN32 223_ABIN32
281_MIPS_SZLONG 224_MIPS_SZLONG
282_POSIX_SOURCE 225_POSIX_SOURCE
283__main
284_longjmp 226_longjmp
285_setjmp 227_setjmp
286_sobuf
287aix386
288alloca 228alloca
289aouthdr
290data_start 229data_start
291drem 230drem
292dsize
293emacs 231emacs
294entry 232entry
295etext 233etext
296fatal 234fatal
297fchmod 235fchmod
298getpgrp 236getpgrp
299ghs
300hp9000s800 237hp9000s800
301index 238index
302internal_with_output_to_temp_buffer
303jmp_buf 239jmp_buf
304longjmp 240longjmp
305m68000 241m68000
diff --git a/configure.in b/configure.in
index 57aa340544f..7147952152c 100644
--- a/configure.in
+++ b/configure.in
@@ -1004,14 +1004,10 @@ configure___ c_switch_machine=C_SWITCH_MACHINE
1004#define LIB_X11_LIB -lX11 1004#define LIB_X11_LIB -lX11
1005#endif 1005#endif
1006 1006
1007#ifndef LIBX11_MACHINE
1008#define LIBX11_MACHINE
1009#endif
1010
1011#ifndef LIBX11_SYSTEM 1007#ifndef LIBX11_SYSTEM
1012#define LIBX11_SYSTEM 1008#define LIBX11_SYSTEM
1013#endif 1009#endif
1014configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM 1010configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
1015 1011
1016#ifdef UNEXEC 1012#ifdef UNEXEC
1017configure___ unexec=UNEXEC 1013configure___ unexec=UNEXEC
@@ -1548,15 +1544,6 @@ AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1548 1544
1549AC_CHECK_LIB(pthreads, cma_open) 1545AC_CHECK_LIB(pthreads, cma_open)
1550 1546
1551AC_MSG_CHECKING(for XFree86 in /usr/X386)
1552if test -d /usr/X386/include; then
1553 HAVE_XFREE386=yes
1554 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
1555else
1556 HAVE_XFREE386=no
1557fi
1558AC_MSG_RESULT($HAVE_XFREE386)
1559
1560dnl Check for need for bigtoc support on IBM AIX 1547dnl Check for need for bigtoc support on IBM AIX
1561 1548
1562case ${host_os} in 1549case ${host_os} in
@@ -2702,9 +2689,6 @@ if test "${HAVE_X11}" = "yes" ; then
2702 [Define to 1 if you want to use version 11 of X windows. 2689 [Define to 1 if you want to use version 11 of X windows.
2703 Otherwise, Emacs expects to use version 10.]) 2690 Otherwise, Emacs expects to use version 10.])
2704fi 2691fi
2705if test "${HAVE_XFREE386}" = "yes" ; then
2706 AC_DEFINE(HAVE_XFREE386, 1, [Define to 1 if you're using XFree386.])
2707fi
2708if test "${HAVE_MENUS}" = "yes" ; then 2692if test "${HAVE_MENUS}" = "yes" ; then
2709 AC_DEFINE(HAVE_MENUS, 1, 2693 AC_DEFINE(HAVE_MENUS, 1,
2710 [Define to 1 if you have mouse menus. 2694 [Define to 1 if you have mouse menus.
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 8b669dbdcd3..a9d82de9c7e 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,8 @@
12008-02-09 Dan Nicolaescu <dann@ics.uci.edu> 12008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional.
4 (main): Replace MAIL_PROGRAM_NAME with its value.
5
3 * Makefile.in (REGEXP_IN_LIBC): Remove reference to obsolete 6 * Makefile.in (REGEXP_IN_LIBC): Remove reference to obsolete
4 variable. 7 variable.
5 8
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c
index 10a9cdb20ea..a2d31350fc8 100644
--- a/lib-src/fakemail.c
+++ b/lib-src/fakemail.c
@@ -135,10 +135,6 @@ struct linebuffer lb;
135#define NIL ((line_list) NULL) 135#define NIL ((line_list) NULL)
136#define INITIAL_LINE_SIZE 200 136#define INITIAL_LINE_SIZE 200
137 137
138#ifndef MAIL_PROGRAM_NAME
139#define MAIL_PROGRAM_NAME "/bin/mail"
140#endif
141
142static char *my_name; 138static char *my_name;
143static char *the_date; 139static char *the_date;
144static char *the_user; 140static char *the_user;
@@ -734,7 +730,7 @@ main (argc, argv)
734 730
735 mail_program_name = getenv ("FAKEMAILER"); 731 mail_program_name = getenv ("FAKEMAILER");
736 if (!(mail_program_name && *mail_program_name)) 732 if (!(mail_program_name && *mail_program_name))
737 mail_program_name = MAIL_PROGRAM_NAME; 733 mail_program_name = "/bin/mail";
738 name_length = strlen (mail_program_name); 734 name_length = strlen (mail_program_name);
739 735
740 my_name = MY_NAME; 736 my_name = MY_NAME;
diff --git a/src/ChangeLog b/src/ChangeLog
index 5ee3586885a..9fd2e55b129 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,27 @@
12008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * src/Makefile.in:
4 * src/emacs.c:
5 * src/gmalloc.c:
6 * src/keyboard.c:
7 * src/lisp.h:
8 * src/m/ibm370aix.h:
9 * src/process.c:
10 * src/regex.c:
11 * src/s/hpux.h:
12 * src/sysdep.c:
13 * src/sysselect.h:
14 * src/systty.h:
15 * src/unexec.c:
16 * src/w32term.c:
17 * src/xsmfns.c:
18 * src/xterm.c: Remove code that deals with obsolete variables.
19
20 * s/msdos.h (DONT_NEED_ENVIRON): Don't define.
21
22 * ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test,
23 nothing else needs it anymore.
24
12008-02-09 Eli Zaretskii <eliz@gnu.org> 252008-02-09 Eli Zaretskii <eliz@gnu.org>
2 26
3 * buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table 27 * buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table
diff --git a/src/Makefile.in b/src/Makefile.in
index e6c36e5c7ec..baf41d4af3d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -219,7 +219,7 @@ MAKE = MAKE_COMMAND
219#ifndef ORDINARY_LINK 219#ifndef ORDINARY_LINK
220 220
221#ifndef CRT0_COMPILE 221#ifndef CRT0_COMPILE
222#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM 222#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
223#endif 223#endif
224 224
225#ifndef START_FILES 225#ifndef START_FILES
@@ -241,12 +241,6 @@ STARTFILES = START_FILES
241#endif /* not ORDINARY_LINK */ 241#endif /* not ORDINARY_LINK */
242 242
243 243
244/* cc switches needed to make ``asm'' keyword work.
245 Nothing special needed on most machines. */
246#ifndef C_SWITCH_ASM
247#define C_SWITCH_ASM
248#endif
249
250#if HAVE_GTK 244#if HAVE_GTK
251#define USE_GTK 245#define USE_GTK
252TOOLKIT_DEFINES = -DUSE_GTK 246TOOLKIT_DEFINES = -DUSE_GTK
@@ -284,10 +278,6 @@ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcd
284.c.o: 278.c.o:
285 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 279 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
286 280
287#ifndef LIBX11_MACHINE
288#define LIBX11_MACHINE
289#endif
290
291#ifndef LIBX11_SYSTEM 281#ifndef LIBX11_SYSTEM
292#define LIBX11_SYSTEM 282#define LIBX11_SYSTEM
293#endif 283#endif
@@ -441,7 +431,7 @@ XFT_LIBS=@XFT_LIBS@
441/* LD_SWITCH_X_DEFAULT comes after everything else that specifies 431/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
442 options for where to find X libraries, but before those libraries. */ 432 options for where to find X libraries, but before those libraries. */
443X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT 433X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
444LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM $(XFT_LIBS) 434LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS)
445#else /* not HAVE_X11 */ 435#else /* not HAVE_X11 */
446LIBX= $(LIBXMENU) LD_SWITCH_X_SITE 436LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
447#endif /* not HAVE_X11 */ 437#endif /* not HAVE_X11 */
@@ -524,12 +514,6 @@ GNULIB_VAR =
524#endif /* not __GNUC__ */ 514#endif /* not __GNUC__ */
525#endif /* not ORDINARY_LINK */ 515#endif /* not ORDINARY_LINK */
526 516
527/* Specify address for ld to start loading at,
528 if requested by configuration. */
529#ifdef LD_TEXT_START_ADDR
530STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
531#endif
532
533#ifdef ORDINARY_LINK 517#ifdef ORDINARY_LINK
534LD = $(CC) 518LD = $(CC)
535#else 519#else
diff --git a/src/ecrt0.c b/src/ecrt0.c
index 41bd1c8b323..9d73dfe05d0 100644
--- a/src/ecrt0.c
+++ b/src/ecrt0.c
@@ -72,7 +72,7 @@ int data_start = 0;
72int errno; 72int errno;
73#endif 73#endif
74 74
75#ifndef DONT_NEED_ENVIRON 75#ifndef MSDOS
76char **environ; 76char **environ;
77#endif 77#endif
78 78
diff --git a/src/emacs.c b/src/emacs.c
index 6a2479fc37a..6702b5e2846 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -423,11 +423,7 @@ memory_warning_signal (sig)
423 423
424#if ! defined (DOS_NT) && ! defined (NO_ABORT) 424#if ! defined (DOS_NT) && ! defined (NO_ABORT)
425 425
426#ifndef ABORT_RETURN_TYPE 426void
427#define ABORT_RETURN_TYPE void
428#endif
429
430ABORT_RETURN_TYPE
431abort () 427abort ()
432{ 428{
433 kill (getpid (), SIGABRT); 429 kill (getpid (), SIGABRT);
@@ -1087,10 +1083,6 @@ main (argc, argv
1087 if (do_initial_setlocale) 1083 if (do_initial_setlocale)
1088 setlocale (LC_ALL, ""); 1084 setlocale (LC_ALL, "");
1089 1085
1090#ifdef EXTRA_INITIALIZE
1091 EXTRA_INITIALIZE;
1092#endif
1093
1094 inhibit_window_system = 0; 1086 inhibit_window_system = 0;
1095 1087
1096 /* Handle the -t switch, which specifies filename to use as terminal. */ 1088 /* Handle the -t switch, which specifies filename to use as terminal. */
diff --git a/src/gmalloc.c b/src/gmalloc.c
index ccc08e1ff68..bd8fe344cbd 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -110,10 +110,6 @@ extern "C"
110#define NULL 0 110#define NULL 0
111#endif 111#endif
112 112
113#ifndef FREE_RETURN_TYPE
114#define FREE_RETURN_TYPE void
115#endif
116
117 113
118/* Allocate SIZE bytes of memory. */ 114/* Allocate SIZE bytes of memory. */
119extern __ptr_t malloc PP ((__malloc_size_t __size)); 115extern __ptr_t malloc PP ((__malloc_size_t __size));
@@ -123,7 +119,7 @@ extern __ptr_t realloc PP ((__ptr_t __ptr, __malloc_size_t __size));
123/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ 119/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
124extern __ptr_t calloc PP ((__malloc_size_t __nmemb, __malloc_size_t __size)); 120extern __ptr_t calloc PP ((__malloc_size_t __nmemb, __malloc_size_t __size));
125/* Free a block allocated by `malloc', `realloc' or `calloc'. */ 121/* Free a block allocated by `malloc', `realloc' or `calloc'. */
126extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr)); 122extern void free PP ((__ptr_t __ptr));
127 123
128/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ 124/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
129#if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ 125#if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */
@@ -816,11 +812,6 @@ _malloc_internal_nolock (size)
816 if (size < sizeof (struct list)) 812 if (size < sizeof (struct list))
817 size = sizeof (struct list); 813 size = sizeof (struct list);
818 814
819#ifdef SUNOS_LOCALTIME_BUG
820 if (size < 16)
821 size = 16;
822#endif
823
824 /* Determine the allocation policy based on the request size. */ 815 /* Determine the allocation policy based on the request size. */
825 if (size <= BLOCKSIZE / 2) 816 if (size <= BLOCKSIZE / 2)
826 { 817 {
@@ -1087,8 +1078,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.
1087 1078
1088/* Cope with systems lacking `memmove'. */ 1079/* Cope with systems lacking `memmove'. */
1089#ifndef memmove 1080#ifndef memmove
1090#if (defined (MEMMOVE_MISSING) || \ 1081#if (!defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
1091 !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
1092#ifdef emacs 1082#ifdef emacs
1093#undef __malloc_safe_bcopy 1083#undef __malloc_safe_bcopy
1094#define __malloc_safe_bcopy safe_bcopy 1084#define __malloc_safe_bcopy safe_bcopy
@@ -1368,7 +1358,7 @@ _free_internal (ptr)
1368 1358
1369/* Return memory to the heap. */ 1359/* Return memory to the heap. */
1370 1360
1371FREE_RETURN_TYPE 1361void
1372free (ptr) 1362free (ptr)
1373 __ptr_t ptr; 1363 __ptr_t ptr;
1374{ 1364{
@@ -1421,8 +1411,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.
1421 1411
1422 1412
1423/* Cope with systems lacking `memmove'. */ 1413/* Cope with systems lacking `memmove'. */
1424#if (defined (MEMMOVE_MISSING) || \ 1414#if (!defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
1425 !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
1426 1415
1427#ifdef emacs 1416#ifdef emacs
1428#undef __malloc_safe_bcopy 1417#undef __malloc_safe_bcopy
diff --git a/src/keyboard.c b/src/keyboard.c
index 83cc47099cb..81e2feadbd8 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7255,7 +7255,7 @@ tty_read_avail_input (struct terminal *terminal,
7255 Jeffrey Honig <jch@bsdi.com> says this is generally safe. */ 7255 Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
7256 if (nread == -1 && errno == EIO) 7256 if (nread == -1 && errno == EIO)
7257 return -2; /* Close this terminal. */ 7257 return -2; /* Close this terminal. */
7258#if defined (AIX) && (! defined (aix386) && defined (_BSD)) 7258#if defined (AIX) && defined (_BSD)
7259 /* The kernel sometimes fails to deliver SIGHUP for ptys. 7259 /* The kernel sometimes fails to deliver SIGHUP for ptys.
7260 This looks incorrect, but it isn't, because _BSD causes 7260 This looks incorrect, but it isn't, because _BSD causes
7261 O_NDELAY to be defined in fcntl.h as O_NONBLOCK, 7261 O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
diff --git a/src/lisp.h b/src/lisp.h
index 284ee0b2b25..5156386551a 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1665,8 +1665,7 @@ typedef unsigned char UCHAR;
1665 A null string means call interactively with no arguments. 1665 A null string means call interactively with no arguments.
1666 `doc' is documentation for the user. */ 1666 `doc' is documentation for the user. */
1667 1667
1668#if (!defined (__STDC__) && !defined (PROTOTYPES)) \ 1668#if (!defined (__STDC__) && !defined (PROTOTYPES))
1669 || defined (USE_NONANSI_DEFUN)
1670 1669
1671#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ 1670#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \
1672 Lisp_Object fnname (); \ 1671 Lisp_Object fnname (); \
@@ -2115,8 +2114,7 @@ void staticpro P_ ((Lisp_Object *));
2115 2114
2116/* Declare a Lisp-callable function. The MAXARGS parameter has the same 2115/* Declare a Lisp-callable function. The MAXARGS parameter has the same
2117 meaning as in the DEFUN macro, and is used to construct a prototype. */ 2116 meaning as in the DEFUN macro, and is used to construct a prototype. */
2118#if (!defined (__STDC__) && !defined (PROTOTYPES)) \ 2117#if (!defined (__STDC__) && !defined (PROTOTYPES))
2119 || defined (USE_NONANSI_DEFUN)
2120#define EXFUN(fnname, maxargs) \ 2118#define EXFUN(fnname, maxargs) \
2121 extern Lisp_Object fnname () 2119 extern Lisp_Object fnname ()
2122#else 2120#else
@@ -3368,11 +3366,7 @@ extern Lisp_Object Vdirectory_sep_char;
3368#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_)) 3366#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))
3369#endif 3367#endif
3370 3368
3371#ifdef SWITCH_ENUM_BUG
3372#define SWITCH_ENUM_CAST(x) ((int)(x))
3373#else
3374#define SWITCH_ENUM_CAST(x) (x) 3369#define SWITCH_ENUM_CAST(x) (x)
3375#endif
3376 3370
3377/* Loop over Lisp list LIST. Signal an error if LIST is not a proper 3371/* Loop over Lisp list LIST. Signal an error if LIST is not a proper
3378 list, or if it contains circles. 3372 list, or if it contains circles.
diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h
index 62daa72369d..da19196172c 100644
--- a/src/m/ibm370aix.h
+++ b/src/m/ibm370aix.h
@@ -19,17 +19,11 @@ along with GNU Emacs; see the file COPYING. If not, write to
19the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20Boston, MA 02110-1301, USA. */ 20Boston, MA 02110-1301, USA. */
21 21
22#include "ibmps2-aix.h"
23
24#define AIX 22#define AIX
25 23
26/* Include unistd.h, even though we don't define POSIX. */ 24/* Include unistd.h, even though we don't define POSIX. */
27#define NEED_UNISTD_H 25#define NEED_UNISTD_H
28 26
29/* these were defined in "ibmps2-aix.h" */
30#undef INTEL386
31#undef aix386
32
33/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word 27/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
34 is the most significant byte. */ 28 is the most significant byte. */
35 29
diff --git a/src/process.c b/src/process.c
index 73da0db18a8..03b6a0b4f95 100644
--- a/src/process.c
+++ b/src/process.c
@@ -57,12 +57,9 @@ Boston, MA 02110-1301, USA. */
57#include <netdb.h> 57#include <netdb.h>
58#include <netinet/in.h> 58#include <netinet/in.h>
59#include <arpa/inet.h> 59#include <arpa/inet.h>
60#ifdef NEED_NET_ERRNO_H
61#include <net/errno.h>
62#endif /* NEED_NET_ERRNO_H */
63 60
64/* Are local (unix) sockets supported? */ 61/* Are local (unix) sockets supported? */
65#if defined (HAVE_SYS_UN_H) && !defined (NO_SOCKETS_IN_FILE_SYSTEM) 62#if defined (HAVE_SYS_UN_H)
66#if !defined (AF_LOCAL) && defined (AF_UNIX) 63#if !defined (AF_LOCAL) && defined (AF_UNIX)
67#define AF_LOCAL AF_UNIX 64#define AF_LOCAL AF_UNIX
68#endif 65#endif
@@ -78,15 +75,6 @@ Boston, MA 02110-1301, USA. */
78#include <client.h> 75#include <client.h>
79#endif 76#endif
80 77
81/* On some systems, inet_addr returns a 'struct in_addr'. */
82#ifdef HAVE_BROKEN_INET_ADDR
83#define IN_ADDR struct in_addr
84#define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
85#else
86#define IN_ADDR unsigned long
87#define NUMERIC_ADDR_ERROR (numeric_addr == -1)
88#endif
89
90#if defined(BSD_SYSTEM) 78#if defined(BSD_SYSTEM)
91#include <sys/ioctl.h> 79#include <sys/ioctl.h>
92#if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) 80#if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5)
@@ -216,12 +204,6 @@ extern int h_errno;
216 maybe other values to come. */ 204 maybe other values to come. */
217static Lisp_Object Vprocess_connection_type; 205static Lisp_Object Vprocess_connection_type;
218 206
219#ifdef SKTPAIR
220#ifndef HAVE_SOCKETS
221#include <sys/socket.h>
222#endif
223#endif /* SKTPAIR */
224
225/* These next two vars are non-static since sysdep.c uses them in the 207/* These next two vars are non-static since sysdep.c uses them in the
226 emulation of `select'. */ 208 emulation of `select'. */
227/* Number of events of change of status of a process. */ 209/* Number of events of change of status of a process. */
@@ -1905,14 +1887,6 @@ create_process (process, new_argv, current_dir)
1905 } 1887 }
1906 else 1888 else
1907#endif /* HAVE_PTYS */ 1889#endif /* HAVE_PTYS */
1908#ifdef SKTPAIR
1909 {
1910 if (socketpair (AF_UNIX, SOCK_STREAM, 0, sv) < 0)
1911 report_file_error ("Opening socketpair", Qnil);
1912 outchannel = inchannel = sv[0];
1913 forkout = forkin = sv[1];
1914 }
1915#else /* not SKTPAIR */
1916 { 1890 {
1917 int tem; 1891 int tem;
1918 tem = pipe (sv); 1892 tem = pipe (sv);
@@ -1930,7 +1904,6 @@ create_process (process, new_argv, current_dir)
1930 outchannel = sv[1]; 1904 outchannel = sv[1];
1931 forkin = sv[0]; 1905 forkin = sv[0];
1932 } 1906 }
1933#endif /* not SKTPAIR */
1934 1907
1935#if 0 1908#if 0
1936 /* Replaced by close_process_descs */ 1909 /* Replaced by close_process_descs */
@@ -3156,9 +3129,9 @@ usage: (make-network-process &rest ARGS) */)
3156 else 3129 else
3157 /* Attempt to interpret host as numeric inet address */ 3130 /* Attempt to interpret host as numeric inet address */
3158 { 3131 {
3159 IN_ADDR numeric_addr; 3132 unsigned long numeric_addr;
3160 numeric_addr = inet_addr ((char *) SDATA (host)); 3133 numeric_addr = inet_addr ((char *) SDATA (host));
3161 if (NUMERIC_ADDR_ERROR) 3134 if (numeric_addr == -1)
3162 error ("Unknown host \"%s\"", SDATA (host)); 3135 error ("Unknown host \"%s\"", SDATA (host));
3163 3136
3164 bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr, 3137 bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr,
diff --git a/src/regex.c b/src/regex.c
index a0d6b945cf1..32da3d02d28 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -289,11 +289,7 @@ xrealloc (block, size)
289/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */ 289/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */
290enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; 290enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
291 291
292# ifdef SWITCH_ENUM_BUG
293# define SWITCH_ENUM_CAST(x) ((int)(x))
294# else
295# define SWITCH_ENUM_CAST(x) (x) 292# define SWITCH_ENUM_CAST(x) (x)
296# endif
297 293
298/* Dummy macros for non-Emacs environments. */ 294/* Dummy macros for non-Emacs environments. */
299# define BASE_LEADING_CODE_P(c) (0) 295# define BASE_LEADING_CODE_P(c) (0)
diff --git a/src/s/hpux.h b/src/s/hpux.h
index ca17f2aa1ec..1a9b2b8489f 100644
--- a/src/s/hpux.h
+++ b/src/s/hpux.h
@@ -210,9 +210,6 @@ Boston, MA 02110-1301, USA. */
210{ 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200, \ 210{ 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200, \
211 1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 } 211 1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 }
212 212
213/* This is needed for HPUX version 6.2; it may not be needed for 6.2.1. */
214#define SHORT_CAST_BUG
215
216/* This is how to get the device name of the tty end of a pty. */ 213/* This is how to get the device name of the tty end of a pty. */
217#define PTY_TTY_NAME_SPRINTF \ 214#define PTY_TTY_NAME_SPRINTF \
218 sprintf (pty_name, "/dev/pty/tty%c%x", c, i); 215 sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
diff --git a/src/s/msdos.h b/src/s/msdos.h
index 9b0b8b0449b..61289fdc2c0 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -193,7 +193,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
193 193
194/* command.com does not understand `...` so we define this. */ 194/* command.com does not understand `...` so we define this. */
195#define LIB_GCC -Lgcc 195#define LIB_GCC -Lgcc
196#define DONT_NEED_ENVIRON
197#define SEPCHAR ';' 196#define SEPCHAR ';'
198 197
199#define NULL_DEVICE "nul" 198#define NULL_DEVICE "nul"
diff --git a/src/sysdep.c b/src/sysdep.c
index 01126c4907e..02e1832e63f 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -144,9 +144,7 @@ extern int errno;
144 144
145#if defined (USG) 145#if defined (USG)
146#include <sys/utsname.h> 146#include <sys/utsname.h>
147#ifndef MEMORY_IN_STRING_H
148#include <memory.h> 147#include <memory.h>
149#endif
150#if defined (TIOCGWINSZ) 148#if defined (TIOCGWINSZ)
151#ifdef NEED_SIOCTL 149#ifdef NEED_SIOCTL
152#include <sys/sioctl.h> 150#include <sys/sioctl.h>
@@ -387,9 +385,6 @@ init_baud_rate (int fd)
387 emacs_ospeed = 0; 385 emacs_ospeed = 0;
388 else 386 else
389 { 387 {
390#ifdef INIT_BAUD_RATE
391 INIT_BAUD_RATE ();
392#else
393#ifdef DOS_NT 388#ifdef DOS_NT
394 emacs_ospeed = 15; 389 emacs_ospeed = 15;
395#else /* not DOS_NT */ 390#else /* not DOS_NT */
@@ -406,11 +401,6 @@ init_baud_rate (int fd)
406 sg.c_cflag = B9600; 401 sg.c_cflag = B9600;
407 tcgetattr (fd, &sg); 402 tcgetattr (fd, &sg);
408 emacs_ospeed = cfgetospeed (&sg); 403 emacs_ospeed = cfgetospeed (&sg);
409#if defined (USE_GETOBAUD) && defined (getobaud)
410 /* m88k-motorola-sysv3 needs this (ghazi@noc.rutgers.edu) 9/1/94. */
411 if (emacs_ospeed == 0)
412 emacs_ospeed = getobaud (sg.c_cflag);
413#endif
414#else /* neither VMS nor TERMIOS */ 404#else /* neither VMS nor TERMIOS */
415#ifdef HAVE_TERMIO 405#ifdef HAVE_TERMIO
416 struct termio sg; 406 struct termio sg;
@@ -433,7 +423,6 @@ init_baud_rate (int fd)
433#endif /* not HAVE_TERMIOS */ 423#endif /* not HAVE_TERMIOS */
434#endif /* not VMS */ 424#endif /* not VMS */
435#endif /* not DOS_NT */ 425#endif /* not DOS_NT */
436#endif /* not INIT_BAUD_RATE */
437 } 426 }
438 427
439 baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0] 428 baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0]
@@ -1274,11 +1263,9 @@ emacs_set_tty (fd, settings, flushp)
1274int lmode; 1263int lmode;
1275#endif 1264#endif
1276 1265
1277#ifndef F_SETOWN_BUG
1278#ifdef F_SETOWN 1266#ifdef F_SETOWN
1279int old_fcntl_owner[MAXDESC]; 1267int old_fcntl_owner[MAXDESC];
1280#endif /* F_SETOWN */ 1268#endif /* F_SETOWN */
1281#endif /* F_SETOWN_BUG */
1282 1269
1283/* This may also be defined in stdio, 1270/* This may also be defined in stdio,
1284 but if so, this does no harm, 1271 but if so, this does no harm,
@@ -1632,7 +1619,6 @@ init_sys_modes (tty_out)
1632#endif /* VMS */ 1619#endif /* VMS */
1633 1620
1634#ifdef F_SETFL 1621#ifdef F_SETFL
1635#ifndef F_SETOWN_BUG
1636#ifdef F_GETOWN /* F_SETFL does not imply existence of F_GETOWN */ 1622#ifdef F_GETOWN /* F_SETFL does not imply existence of F_GETOWN */
1637 if (interrupt_input) 1623 if (interrupt_input)
1638 { 1624 {
@@ -1651,7 +1637,6 @@ init_sys_modes (tty_out)
1651#endif /* HAVE_GPM */ 1637#endif /* HAVE_GPM */
1652 } 1638 }
1653#endif /* F_GETOWN */ 1639#endif /* F_GETOWN */
1654#endif /* F_SETOWN_BUG */
1655#endif /* F_SETFL */ 1640#endif /* F_SETFL */
1656 1641
1657#ifdef BSD4_1 1642#ifdef BSD4_1
@@ -1895,7 +1880,6 @@ reset_sys_modes (tty_out)
1895#endif 1880#endif
1896 1881
1897#ifdef F_SETFL 1882#ifdef F_SETFL
1898#ifndef F_SETOWN_BUG
1899#ifdef F_SETOWN /* F_SETFL does not imply existence of F_SETOWN */ 1883#ifdef F_SETOWN /* F_SETFL does not imply existence of F_SETOWN */
1900 if (interrupt_input) 1884 if (interrupt_input)
1901 { 1885 {
@@ -1904,7 +1888,6 @@ reset_sys_modes (tty_out)
1904 old_fcntl_owner[fileno (tty_out->input)]); 1888 old_fcntl_owner[fileno (tty_out->input)]);
1905 } 1889 }
1906#endif /* F_SETOWN */ 1890#endif /* F_SETOWN */
1907#endif /* F_SETOWN_BUG */
1908#ifdef O_NDELAY 1891#ifdef O_NDELAY
1909 fcntl (fileno (tty_out->input), F_SETFL, 1892 fcntl (fileno (tty_out->input), F_SETFL,
1910 fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NDELAY); 1893 fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NDELAY);
@@ -2543,7 +2526,7 @@ init_system_name ()
2543 2526
2544#ifndef MSDOS 2527#ifndef MSDOS
2545#ifndef VMS 2528#ifndef VMS
2546#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X) 2529#if !defined (HAVE_SELECT)
2547 2530
2548#include "sysselect.h" 2531#include "sysselect.h"
2549#undef select 2532#undef select
@@ -2781,7 +2764,7 @@ read_input_waiting ()
2781 } 2764 }
2782} 2765}
2783 2766
2784#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X) 2767#if !defined (HAVE_SELECT)
2785#define select sys_select 2768#define select sys_select
2786#endif 2769#endif
2787 2770
@@ -5287,31 +5270,6 @@ hft_reset (struct tty_display_info *tty_out)
5287 5270
5288#endif /* AIXHFT */ 5271#endif /* AIXHFT */
5289 5272
5290#ifdef USE_DL_STUBS
5291
5292/* These are included on Sunos 4.1 when we do not use shared libraries.
5293 X11 libraries may refer to these functions but (we hope) do not
5294 actually call them. */
5295
5296void *
5297dlopen ()
5298{
5299 return 0;
5300}
5301
5302void *
5303dlsym ()
5304{
5305 return 0;
5306}
5307
5308int
5309dlclose ()
5310{
5311 return -1;
5312}
5313
5314#endif /* USE_DL_STUBS */
5315 5273
5316#ifndef BSTRING 5274#ifndef BSTRING
5317 5275
diff --git a/src/sysselect.h b/src/sysselect.h
index a866af31000..e0e6c48ca9d 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -47,7 +47,7 @@ Boston, MA 02110-1301, USA. */
47#define FD_ZERO(p) (*(p) = 0) 47#define FD_ZERO(p) (*(p) = 0)
48#endif /* no FD_SET */ 48#endif /* no FD_SET */
49 49
50#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X) 50#if !defined (HAVE_SELECT)
51#define select sys_select 51#define select sys_select
52#endif 52#endif
53 53
diff --git a/src/systty.h b/src/systty.h
index a7e8c41c698..dc1460a24c5 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -127,10 +127,8 @@ static struct sensemode {
127#ifdef SYSV_PTYS 127#ifdef SYSV_PTYS
128#include <sys/types.h> 128#include <sys/types.h>
129#include <sys/tty.h> 129#include <sys/tty.h>
130#ifndef NO_PTY_H
131#include <sys/pty.h> 130#include <sys/pty.h>
132#endif 131#endif
133#endif
134 132
135 133
136/* Special cases - inhibiting the use of certain features. */ 134/* Special cases - inhibiting the use of certain features. */
diff --git a/src/unexec.c b/src/unexec.c
index 4ecb239c137..2ca70b752ec 100644
--- a/src/unexec.c
+++ b/src/unexec.c
@@ -133,11 +133,6 @@ thus, the amount of offset can depend on the data in the file.
133If defined, this macro specifies the number of bytes to seek into the 133If defined, this macro specifies the number of bytes to seek into the
134a.out file before starting to write the text segment. 134a.out file before starting to write the text segment.
135 135
136* EXEC_MAGIC
137
138For machines using COFF, this macro, if defined, is a value stored
139into the magic number field of the output file.
140
141* ADJUST_EXEC_HEADER 136* ADJUST_EXEC_HEADER
142 137
143This macro can be used to generate statements to adjust or 138This macro can be used to generate statements to adjust or
@@ -157,7 +152,6 @@ pointer looks like an int) but not on all machines.
157#ifndef emacs 152#ifndef emacs
158#define PERROR(arg) perror (arg); return -1 153#define PERROR(arg) perror (arg); return -1
159#else 154#else
160#define IN_UNEXEC
161#include <config.h> 155#include <config.h>
162#define PERROR(file) report_error (file, new) 156#define PERROR(file) report_error (file, new)
163#endif 157#endif
@@ -256,11 +250,6 @@ extern char *sbrk ();
256 250
257#define SYMS_START ((long) N_SYMOFF (ohdr)) 251#define SYMS_START ((long) N_SYMOFF (ohdr))
258 252
259/* Some machines override the structure name for an a.out header. */
260#ifndef EXEC_HDR_TYPE
261#define EXEC_HDR_TYPE struct exec
262#endif
263
264#ifdef HPUX 253#ifdef HPUX
265#ifdef HP9000S200_ID 254#ifdef HP9000S200_ID
266#define MY_ID HP9000S200_ID 255#define MY_ID HP9000S200_ID
@@ -272,11 +261,11 @@ static MAGIC OLDMAGIC = {MY_ID, SHARE_MAGIC};
272static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC}; 261static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC};
273#define N_TXTOFF(x) TEXT_OFFSET(x) 262#define N_TXTOFF(x) TEXT_OFFSET(x)
274#define N_SYMOFF(x) LESYM_OFFSET(x) 263#define N_SYMOFF(x) LESYM_OFFSET(x)
275static EXEC_HDR_TYPE hdr, ohdr; 264static struct exec hdr, ohdr;
276 265
277#else /* not HPUX */ 266#else /* not HPUX */
278 267
279#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (GNU_LINUX) 268#if defined (USG) && !defined (IRIS) && !defined (GNU_LINUX)
280static struct bhdr hdr, ohdr; 269static struct bhdr hdr, ohdr;
281#define a_magic fmagic 270#define a_magic fmagic
282#define a_text tsize 271#define a_text tsize
@@ -290,10 +279,10 @@ static struct bhdr hdr, ohdr;
290 (((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\ 279 (((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\
291 ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC) 280 ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
292#define NEWMAGIC FMAGIC 281#define NEWMAGIC FMAGIC
293#else /* IRIS or IBMAIX or not USG */ 282#else /* IRIS or not USG */
294static EXEC_HDR_TYPE hdr, ohdr; 283static struct exec hdr, ohdr;
295#define NEWMAGIC ZMAGIC 284#define NEWMAGIC ZMAGIC
296#endif /* IRIS or IBMAIX not USG */ 285#endif /* IRIS or not USG */
297#endif /* not HPUX */ 286#endif /* not HPUX */
298 287
299static int unexec_text_start; 288static int unexec_text_start;
@@ -504,12 +493,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
504#endif 493#endif
505 494
506 f_hdr.f_flags |= (F_RELFLG | F_EXEC); 495 f_hdr.f_flags |= (F_RELFLG | F_EXEC);
507#ifdef TPIX
508 f_hdr.f_nscns = 3;
509#endif
510#ifdef EXEC_MAGIC
511 f_ohdr.magic = EXEC_MAGIC;
512#endif
513#ifndef NO_REMAP 496#ifndef NO_REMAP
514 f_ohdr.text_start = (long) start_of_text (); 497 f_ohdr.text_start = (long) start_of_text ();
515 f_ohdr.tsize = data_start - f_ohdr.text_start; 498 f_ohdr.tsize = data_start - f_ohdr.text_start;
@@ -517,13 +500,11 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
517#endif /* NO_REMAP */ 500#endif /* NO_REMAP */
518 f_ohdr.dsize = bss_start - f_ohdr.data_start; 501 f_ohdr.dsize = bss_start - f_ohdr.data_start;
519 f_ohdr.bsize = bss_end - bss_start; 502 f_ohdr.bsize = bss_end - bss_start;
520#ifndef KEEP_OLD_TEXT_SCNPTR
521 /* On some machines, the old values are right. 503 /* On some machines, the old values are right.
522 ??? Maybe on all machines with NO_REMAP. */ 504 ??? Maybe on all machines with NO_REMAP. */
523 f_thdr.s_size = f_ohdr.tsize; 505 f_thdr.s_size = f_ohdr.tsize;
524 f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr); 506 f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr);
525 f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr)); 507 f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr));
526#endif /* KEEP_OLD_TEXT_SCNPTR */
527#ifdef ADJUST_TEXT_SCNHDR_SIZE 508#ifdef ADJUST_TEXT_SCNHDR_SIZE
528 /* On some machines, `text size' includes all headers. */ 509 /* On some machines, `text size' includes all headers. */
529 f_thdr.s_size -= f_thdr.s_scnptr; 510 f_thdr.s_size -= f_thdr.s_scnptr;
@@ -535,16 +516,8 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
535 f_thdr.s_scnptr 516 f_thdr.s_scnptr
536 = (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT; 517 = (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT;
537#endif /* SECTION_ALIGNMENT */ 518#endif /* SECTION_ALIGNMENT */
538#ifdef TPIX
539 f_thdr.s_scnptr = 0xd0;
540#endif
541 text_scnptr = f_thdr.s_scnptr; 519 text_scnptr = f_thdr.s_scnptr;
542#ifdef ADJUST_TEXTBASE
543 text_scnptr = sizeof (f_hdr) + sizeof (f_ohdr) + (f_hdr.f_nscns) * (sizeof (f_thdr));
544#endif
545#ifndef KEEP_OLD_PADDR
546 f_dhdr.s_paddr = f_ohdr.data_start; 520 f_dhdr.s_paddr = f_ohdr.data_start;
547#endif /* KEEP_OLD_PADDR */
548 f_dhdr.s_vaddr = f_ohdr.data_start; 521 f_dhdr.s_vaddr = f_ohdr.data_start;
549 f_dhdr.s_size = f_ohdr.dsize; 522 f_dhdr.s_size = f_ohdr.dsize;
550 f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size; 523 f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size;
@@ -561,9 +534,7 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
561 = (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT; 534 = (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT;
562#endif /* DATA_SECTION_ALIGNMENT */ 535#endif /* DATA_SECTION_ALIGNMENT */
563 data_scnptr = f_dhdr.s_scnptr; 536 data_scnptr = f_dhdr.s_scnptr;
564#ifndef KEEP_OLD_PADDR
565 f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize; 537 f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize;
566#endif /* KEEP_OLD_PADDR */
567 f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize; 538 f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize;
568 f_bhdr.s_size = f_ohdr.bsize; 539 f_bhdr.s_size = f_ohdr.bsize;
569 f_bhdr.s_scnptr = 0L; 540 f_bhdr.s_scnptr = 0L;
@@ -874,10 +845,6 @@ copy_text_and_data (new, a_out)
874 845
875 lseek (new, (long) text_scnptr, 0); 846 lseek (new, (long) text_scnptr, 0);
876 ptr = (char *) f_ohdr.text_start; 847 ptr = (char *) f_ohdr.text_start;
877#ifdef HEADER_INCL_IN_TEXT
878 /* For Gould UTX/32, text starts after headers */
879 ptr = (char *) (ptr + text_scnptr);
880#endif /* HEADER_INCL_IN_TEXT */
881 end = ptr + f_ohdr.tsize; 848 end = ptr + f_ohdr.tsize;
882 write_segment (new, ptr, end); 849 write_segment (new, ptr, end);
883 850
diff --git a/src/w32term.c b/src/w32term.c
index 4766382f6a1..cbe8e1f6776 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -7057,16 +7057,9 @@ w32_term_init (display_name, xrm_option, resource_name)
7057 the bitmaps. */ 7057 the bitmaps. */
7058 w32_init_fringe (terminal->rif); 7058 w32_init_fringe (terminal->rif);
7059 7059
7060#ifndef F_SETOWN_BUG
7061#ifdef F_SETOWN 7060#ifdef F_SETOWN
7062#ifdef F_SETOWN_SOCK_NEG
7063 /* stdin is a socket here */
7064 fcntl (connection, F_SETOWN, -getpid ());
7065#else /* ! defined (F_SETOWN_SOCK_NEG) */
7066 fcntl (connection, F_SETOWN, getpid ()); 7061 fcntl (connection, F_SETOWN, getpid ());
7067#endif /* ! defined (F_SETOWN_SOCK_NEG) */
7068#endif /* ! defined (F_SETOWN) */ 7062#endif /* ! defined (F_SETOWN) */
7069#endif /* F_SETOWN_BUG */
7070 7063
7071#ifdef SIGIO 7064#ifdef SIGIO
7072 if (interrupt_input) 7065 if (interrupt_input)
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 9a6225c2fa7..bfc8a2dfae2 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -389,16 +389,9 @@ ice_conn_watch_CB (iceConn, clientData, opening, watchData)
389 } 389 }
390 390
391 ice_fd = IceConnectionNumber (iceConn); 391 ice_fd = IceConnectionNumber (iceConn);
392#ifndef F_SETOWN_BUG
393#ifdef F_SETOWN 392#ifdef F_SETOWN
394#ifdef F_SETOWN_SOCK_NEG
395 /* stdin is a socket here */
396 fcntl (ice_fd, F_SETOWN, -getpid ());
397#else /* ! defined (F_SETOWN_SOCK_NEG) */
398 fcntl (ice_fd, F_SETOWN, getpid ()); 393 fcntl (ice_fd, F_SETOWN, getpid ());
399#endif /* ! defined (F_SETOWN_SOCK_NEG) */
400#endif /* ! defined (F_SETOWN) */ 394#endif /* ! defined (F_SETOWN) */
401#endif /* F_SETOWN_BUG */
402 395
403#ifdef SIGIO 396#ifdef SIGIO
404 if (interrupt_input) 397 if (interrupt_input)
diff --git a/src/xterm.c b/src/xterm.c
index cf806e49c38..840c874950b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11533,16 +11533,9 @@ x_term_init (display_name, xrm_option, resource_name)
11533 add_keyboard_wait_descriptor (connection); 11533 add_keyboard_wait_descriptor (connection);
11534#endif 11534#endif
11535 11535
11536#ifndef F_SETOWN_BUG
11537#ifdef F_SETOWN 11536#ifdef F_SETOWN
11538#ifdef F_SETOWN_SOCK_NEG
11539 /* stdin is a socket here */
11540 fcntl (connection, F_SETOWN, -getpid ());
11541#else /* ! defined (F_SETOWN_SOCK_NEG) */
11542 fcntl (connection, F_SETOWN, getpid ()); 11537 fcntl (connection, F_SETOWN, getpid ());
11543#endif /* ! defined (F_SETOWN_SOCK_NEG) */
11544#endif /* ! defined (F_SETOWN) */ 11538#endif /* ! defined (F_SETOWN) */
11545#endif /* F_SETOWN_BUG */
11546 11539
11547#ifdef SIGIO 11540#ifdef SIGIO
11548 if (interrupt_input) 11541 if (interrupt_input)