changeset 91702:b7a5a89054dc

* 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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 09 Feb 2008 18:03:10 +0000
parents 8fac5ad6ff83
children bda1e76bc03b
files ChangeLog admin/CPP-DEFINES configure.in lib-src/ChangeLog lib-src/fakemail.c src/ChangeLog src/Makefile.in src/ecrt0.c 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/s/msdos.h src/sysdep.c src/sysselect.h src/systty.h src/unexec.c src/w32term.c src/xsmfns.c src/xterm.c
diffstat 24 files changed, 57 insertions(+), 289 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Feb 09 14:06:47 2008 +0000
+++ b/ChangeLog	Sat Feb 09 18:03:10 2008 +0000
@@ -1,3 +1,8 @@
+2008-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code
+	dealing with obsolete variables.
+
 2008-02-08  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (check-info-dir): New target.
--- a/admin/CPP-DEFINES	Sat Feb 09 14:06:47 2008 +0000
+++ b/admin/CPP-DEFINES	Sat Feb 09 18:03:10 2008 +0000
@@ -42,23 +42,17 @@
 REL_ALLOC	Compile in the relocatable memory allocator ralloc.c.
 SYSTEM_MALLOC	Use the system library's malloc.
 
-** All references to these symbols should be removed, all their definitions are gone **
-
-NU
-romp
+** Replace, the definition is trivial: SWITCH_ENUM_CAST
 
 ** Temporarily put defines from removed files here, check if these macros need to be documented or removed because they are not used anymore.  ** 
 
-ABORT_RETURN_TYPE
 ADDR_CORRECT
-ADJUST_EXEC_HEADER
 ADJUST_TEXTBASE
 ADJUST_TEXT_SCNHDR_SIZE
 A_TEXT_OFFSET
 A_TEXT_SEEK
 BAUD_CONVERT
 BROKEN_FIONREAD
-BROKEN_SELECT_NON_X
 BROKEN_SIGIO
 BROKEN_TIOCGETC
 BROKEN_TIOCGWINSZ
@@ -72,11 +66,9 @@
 CLASH_DETECTION
 COFF
 COFF_BSD_SYMBOLS
-CRT0_COMPILE
 CRT0_DUMMIES
 C_DEBUG_SWITCH
 C_OPTIMIZE_SWITCH
-C_SWITCH_ASM
 C_SWITCH_MACHINE
 C_SWITCH_SYSTEM
 DATA_END
@@ -86,27 +78,18 @@
 DEBUG
 DECLARE_GETPWUID_WITH_UID_T
 DEFAULT_ENTRY_ADDRESS
-DONT_NEED_ENVIRON
 DOT_GLOBAL_START
 DUMMIES
-EEOF
 ELF
-EXEC_HDR_TYPE
-EXEC_MAGIC
 EXEC_PAGESIZE
 EXPLICIT_SIGN_EXTEND
-EXTRA_INITIALIZE
 FIRST_PTY_LETTER
-FREE_RETURN_TYPE
 FSCALE
-F_SETOWN_BUG
-F_SETOWN_SOCK_NEG
 GC_MARK_STACK
 GC_SETJMP_WORKS
 GETPGRP_NO_ARG
 GNU_MALLOC
 HAVE_ALLOCA
-HAVE_BROKEN_INET_ADDR
 HAVE_CLOSEDIR
 HAVE_CONFIG_H
 HAVE_CRTN
@@ -131,33 +114,24 @@
 HAVE_UTIMES
 HAVE_WAIT_HEADER
 HAVE_X11R6
-HAVE_XFREE386
 HAVE_XSCREENNUMBEROFSCREEN
 HAVE_X_WINDOWS
-HEADER_INCL_IN_TEXT
-IBMAIX
 INHIBIT_X11R6_XIM
-INIT_BAUD_RATE
 INTEL386
 INTERRUPT_INPUT
-IN_UNEXEC
 IRIS
 IRIS_4D
 IRIX6_5
 IRIX_FORCE_32_BITS
-KEEP_OLD_PADDR
-KEEP_OLD_TEXT_SCNPTR
 KERNEL_FILE
 LDAV_SYMBOL
 LD_SWITCH_MACHINE
 LD_SWITCH_SYSTEM
 LD_SWITCH_SYSTEM_TEMACS
-LD_TEXT_START_ADDR
 LIBS_DEBUG
 LIBS_MACHINE
 LIBS_SYSTEM
 LIBS_TERMCAP
-LIBX11_MACHINE
 LIBX11_SYSTEM
 LIBXMU
 LIB_GCC
@@ -167,44 +141,29 @@
 LINKER
 LOAD_AVE_CVT
 LOAD_AVE_TYPE
-L_SET
-MAIL_PROGRAM_NAME
 MAIL_USE_FLOCK
-MAXNAMLEN
-MEMMOVE_MISSING
-MEMORY_IN_STRING_H
 MKDIR_PROTOTYPE
 MOTIF
 NARROWPROTO
 NEED_ERRNO
-NEED_NET_ERRNO_H
 NEED_PTEM_H
 NEED_SIOCTL
-NEW_PROGRAM_H
-NEW_SECTION_H
-NLIST_NAME_UNION
 NLIST_STRUCT
 NOMULTIPLEJOBS
 NONSYSTEM_DIR_LIBRARY
 NOT_C_CODE
 NO_ARG_ARRAY
-NO_GET_LOAD_AVG
 NO_MODE_T
-NO_PTY_H
 NO_REMAP
 NO_SIOCTL_H
-NO_SOCKETS_IN_FILE_SYSTEM
 NO_SOCK_SIGIO
 NO_TERMIO
 NO_UNION_TYPE
-NO_UNION_TYPE
 NSIG
 NSIG_MINIMUM
 OBJECTS_MACHINE
 ORDINARY_LINK
-OSF1
 O_NDELAY
-PATCH_INDEX
 PENDING_OUTPUT_COUNT
 PERROR
 PNTR_COMPARISON_TYPE
@@ -224,20 +183,12 @@
 SEGSIZ
 SETUP_SLAVE_PTY
 SHORTNAMES
-SHORT_CAST_BUG
 SIGMASKTYPE
 SIGNALS_VIA_CHARACTERS
 SIGN_EXTEND_CHAR
 SIGTYPE
-SIG_BLOCK
-SKTPAIR
-SMAIL
 START_FILES
-SUNOS4
-SUNOS_LOCALTIME_BUG
 SVR4
-SWITCH_ENUM_BUG
-SYMS_START
 SYSTEM_MALLOC
 SYSTEM_TYPE
 SYSV_PTYS
@@ -252,15 +203,10 @@
 TERMINFO
 TEXT_END
 TEXT_START
-TEXT_START_ADDR
 THIS_IS_MAKEFILE
-TPIX
 ULIMIT_BREAK_VALUE
 UNEXEC
-USE_DL_STUBS
-USE_GETOBAUD
 USE_MMAP_FOR_BUFFERS
-USE_NONANSI_DEFUN
 USG
 USG5
 USG5_3
@@ -270,9 +216,6 @@
 VIRT_ADDR_VARIES
 WORDS_BIG_ENDIAN
 WORD_MACHINE
-WRITE
-X11R4
-XICCC
 XINT
 XSET
 XUINT
@@ -280,26 +223,19 @@
 _ABIN32
 _MIPS_SZLONG
 _POSIX_SOURCE
-__main
 _longjmp
 _setjmp
-_sobuf
-aix386
 alloca
-aouthdr
 data_start
 drem
-dsize
 emacs
 entry
 etext
 fatal
 fchmod
 getpgrp
-ghs
 hp9000s800
 index
-internal_with_output_to_temp_buffer
 jmp_buf
 longjmp
 m68000
--- a/configure.in	Sat Feb 09 14:06:47 2008 +0000
+++ b/configure.in	Sat Feb 09 18:03:10 2008 +0000
@@ -1004,14 +1004,10 @@
 #define LIB_X11_LIB -lX11
 #endif
 
-#ifndef LIBX11_MACHINE
-#define LIBX11_MACHINE
-#endif
-
 #ifndef LIBX11_SYSTEM
 #define LIBX11_SYSTEM
 #endif
-configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
+configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
 
 #ifdef UNEXEC
 configure___ unexec=UNEXEC
@@ -1548,15 +1544,6 @@
 
 AC_CHECK_LIB(pthreads, cma_open)
 
-AC_MSG_CHECKING(for XFree86 in /usr/X386)
-if test -d /usr/X386/include; then
-  HAVE_XFREE386=yes
-  : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
-else
-  HAVE_XFREE386=no
-fi
-AC_MSG_RESULT($HAVE_XFREE386)
-
 dnl Check for need for bigtoc support on IBM AIX
 
 case ${host_os} in
@@ -2702,9 +2689,6 @@
 	    [Define to 1 if you want to use version 11 of X windows.
 	     Otherwise, Emacs expects to use version 10.])
 fi
-if test "${HAVE_XFREE386}" = "yes" ; then
-  AC_DEFINE(HAVE_XFREE386, 1, [Define to 1 if you're using XFree386.])
-fi
 if test "${HAVE_MENUS}" = "yes" ; then
   AC_DEFINE(HAVE_MENUS, 1,
 	    [Define to 1 if you have mouse menus.
--- a/lib-src/ChangeLog	Sat Feb 09 14:06:47 2008 +0000
+++ b/lib-src/ChangeLog	Sat Feb 09 18:03:10 2008 +0000
@@ -1,5 +1,8 @@
 2008-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	* fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional.
+	(main): Replace MAIL_PROGRAM_NAME with its value.
+
 	* Makefile.in (REGEXP_IN_LIBC): Remove reference to obsolete
 	variable.
 
--- a/lib-src/fakemail.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/lib-src/fakemail.c	Sat Feb 09 18:03:10 2008 +0000
@@ -135,10 +135,6 @@
 #define NIL ((line_list) NULL)
 #define INITIAL_LINE_SIZE 200
 
-#ifndef MAIL_PROGRAM_NAME
-#define MAIL_PROGRAM_NAME "/bin/mail"
-#endif
-
 static char *my_name;
 static char *the_date;
 static char *the_user;
@@ -734,7 +730,7 @@
 
   mail_program_name = getenv ("FAKEMAILER");
   if (!(mail_program_name && *mail_program_name))
-    mail_program_name = MAIL_PROGRAM_NAME;
+    mail_program_name = "/bin/mail";
   name_length = strlen (mail_program_name);
 
   my_name = MY_NAME;
--- a/src/ChangeLog	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/ChangeLog	Sat Feb 09 18:03:10 2008 +0000
@@ -1,3 +1,27 @@
+2008-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* 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.
+
 2008-02-09  Eli Zaretskii  <eliz@gnu.org>
 
 	* buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table
--- a/src/Makefile.in	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/Makefile.in	Sat Feb 09 18:03:10 2008 +0000
@@ -219,7 +219,7 @@
 #ifndef ORDINARY_LINK
 
 #ifndef CRT0_COMPILE
-#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
+#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
 #endif
 
 #ifndef START_FILES
@@ -241,12 +241,6 @@
 #endif /* not ORDINARY_LINK */
 
 
-/* cc switches needed to make ``asm'' keyword work.
-   Nothing special needed on most machines.  */
-#ifndef C_SWITCH_ASM
-#define C_SWITCH_ASM
-#endif
-
 #if HAVE_GTK
 #define USE_GTK
 TOOLKIT_DEFINES = -DUSE_GTK
@@ -284,10 +278,6 @@
 .c.o:
 	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
 
-#ifndef LIBX11_MACHINE
-#define LIBX11_MACHINE
-#endif
-
 #ifndef LIBX11_SYSTEM
 #define LIBX11_SYSTEM
 #endif
@@ -441,7 +431,7 @@
 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
    options for where to find X libraries, but before those libraries.  */
 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
-LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM $(XFT_LIBS)
+LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS)
 #else /* not HAVE_X11 */
 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
 #endif /* not HAVE_X11 */
@@ -524,12 +514,6 @@
 #endif /* not __GNUC__ */
 #endif /* not ORDINARY_LINK */
 
-/* Specify address for ld to start loading at,
-   if requested by configuration.  */
-#ifdef LD_TEXT_START_ADDR
-STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
-#endif
-
 #ifdef ORDINARY_LINK
 LD = $(CC)
 #else
--- a/src/ecrt0.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/ecrt0.c	Sat Feb 09 18:03:10 2008 +0000
@@ -72,7 +72,7 @@
 int errno;
 #endif
 
-#ifndef DONT_NEED_ENVIRON
+#ifndef MSDOS
 char **environ;
 #endif
 
--- a/src/emacs.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/emacs.c	Sat Feb 09 18:03:10 2008 +0000
@@ -423,11 +423,7 @@
 
 #if ! defined (DOS_NT) && ! defined (NO_ABORT)
 
-#ifndef ABORT_RETURN_TYPE
-#define ABORT_RETURN_TYPE void
-#endif
-
-ABORT_RETURN_TYPE
+void
 abort ()
 {
   kill (getpid (), SIGABRT);
@@ -1087,10 +1083,6 @@
   if (do_initial_setlocale)
     setlocale (LC_ALL, "");
 
-#ifdef EXTRA_INITIALIZE
-  EXTRA_INITIALIZE;
-#endif
-
   inhibit_window_system = 0;
 
   /* Handle the -t switch, which specifies filename to use as terminal.  */
--- a/src/gmalloc.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/gmalloc.c	Sat Feb 09 18:03:10 2008 +0000
@@ -110,10 +110,6 @@
 #define	NULL	0
 #endif
 
-#ifndef FREE_RETURN_TYPE
-#define FREE_RETURN_TYPE void
-#endif
-
 
 /* Allocate SIZE bytes of memory.  */
 extern __ptr_t malloc PP ((__malloc_size_t __size));
@@ -123,7 +119,7 @@
 /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0.  */
 extern __ptr_t calloc PP ((__malloc_size_t __nmemb, __malloc_size_t __size));
 /* Free a block allocated by `malloc', `realloc' or `calloc'.  */
-extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr));
+extern void free PP ((__ptr_t __ptr));
 
 /* Allocate SIZE bytes allocated to ALIGNMENT bytes.  */
 #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict.  */
@@ -816,11 +812,6 @@
   if (size < sizeof (struct list))
     size = sizeof (struct list);
 
-#ifdef SUNOS_LOCALTIME_BUG
-  if (size < 16)
-    size = 16;
-#endif
-
   /* Determine the allocation policy based on the request size.  */
   if (size <= BLOCKSIZE / 2)
     {
@@ -1087,8 +1078,7 @@
 
 /* Cope with systems lacking `memmove'.    */
 #ifndef memmove
-#if  (defined (MEMMOVE_MISSING) || \
-      !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
+#if  (!defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
 #ifdef emacs
 #undef	__malloc_safe_bcopy
 #define __malloc_safe_bcopy safe_bcopy
@@ -1368,7 +1358,7 @@
 
 /* Return memory to the heap.  */
 
-FREE_RETURN_TYPE
+void
 free (ptr)
      __ptr_t ptr;
 {
@@ -1421,8 +1411,7 @@
 
 
 /* Cope with systems lacking `memmove'.    */
-#if  (defined (MEMMOVE_MISSING) || \
-      !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
+#if  (!defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG))
 
 #ifdef emacs
 #undef	__malloc_safe_bcopy
--- a/src/keyboard.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/keyboard.c	Sat Feb 09 18:03:10 2008 +0000
@@ -7255,7 +7255,7 @@
          Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
       if (nread == -1 && errno == EIO)
         return -2;          /* Close this terminal. */
-#if defined (AIX) && (! defined (aix386) && defined (_BSD))
+#if defined (AIX) && defined (_BSD)
       /* The kernel sometimes fails to deliver SIGHUP for ptys.
          This looks incorrect, but it isn't, because _BSD causes
          O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
--- a/src/lisp.h	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/lisp.h	Sat Feb 09 18:03:10 2008 +0000
@@ -1665,8 +1665,7 @@
     A null string means call interactively with no arguments.
  `doc' is documentation for the user.  */
 
-#if (!defined (__STDC__) && !defined (PROTOTYPES)) \
-    || defined (USE_NONANSI_DEFUN)
+#if (!defined (__STDC__) && !defined (PROTOTYPES))
 
 #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc)	\
   Lisp_Object fnname ();						\
@@ -2115,8 +2114,7 @@
 
 /* Declare a Lisp-callable function.  The MAXARGS parameter has the same
    meaning as in the DEFUN macro, and is used to construct a prototype.  */
-#if (!defined (__STDC__) &&  !defined (PROTOTYPES)) \
-    || defined (USE_NONANSI_DEFUN)
+#if (!defined (__STDC__) &&  !defined (PROTOTYPES))
 #define EXFUN(fnname, maxargs) \
   extern Lisp_Object fnname ()
 #else
@@ -3368,11 +3366,7 @@
 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))
 #endif
 
-#ifdef SWITCH_ENUM_BUG
-#define SWITCH_ENUM_CAST(x) ((int)(x))
-#else
 #define SWITCH_ENUM_CAST(x) (x)
-#endif
 
 /* Loop over Lisp list LIST.  Signal an error if LIST is not a proper
    list, or if it contains circles.
--- a/src/m/ibm370aix.h	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/m/ibm370aix.h	Sat Feb 09 18:03:10 2008 +0000
@@ -19,17 +19,11 @@
 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 Boston, MA 02110-1301, USA.  */
 
-#include "ibmps2-aix.h"
-
 #define AIX
 
 /* Include unistd.h, even though we don't define POSIX.  */
 #define NEED_UNISTD_H
 
-/* these were defined in "ibmps2-aix.h" */
-#undef INTEL386
-#undef aix386
-
 /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
    is the most significant byte.  */
 
--- a/src/process.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/process.c	Sat Feb 09 18:03:10 2008 +0000
@@ -57,12 +57,9 @@
 #include <netdb.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#ifdef NEED_NET_ERRNO_H
-#include <net/errno.h>
-#endif /* NEED_NET_ERRNO_H */
 
 /* Are local (unix) sockets supported?  */
-#if defined (HAVE_SYS_UN_H) && !defined (NO_SOCKETS_IN_FILE_SYSTEM)
+#if defined (HAVE_SYS_UN_H)
 #if !defined (AF_LOCAL) && defined (AF_UNIX)
 #define AF_LOCAL AF_UNIX
 #endif
@@ -78,15 +75,6 @@
 #include <client.h>
 #endif
 
-/* On some systems, inet_addr returns a 'struct in_addr'. */
-#ifdef HAVE_BROKEN_INET_ADDR
-#define IN_ADDR struct in_addr
-#define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
-#else
-#define IN_ADDR unsigned long
-#define NUMERIC_ADDR_ERROR (numeric_addr == -1)
-#endif
-
 #if defined(BSD_SYSTEM)
 #include <sys/ioctl.h>
 #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5)
@@ -216,12 +204,6 @@
    maybe other values to come.  */
 static Lisp_Object Vprocess_connection_type;
 
-#ifdef SKTPAIR
-#ifndef HAVE_SOCKETS
-#include <sys/socket.h>
-#endif
-#endif /* SKTPAIR */
-
 /* These next two vars are non-static since sysdep.c uses them in the
    emulation of `select'.  */
 /* Number of events of change of status of a process.  */
@@ -1905,14 +1887,6 @@
     }
   else
 #endif /* HAVE_PTYS */
-#ifdef SKTPAIR
-    {
-      if (socketpair (AF_UNIX, SOCK_STREAM, 0, sv) < 0)
-	report_file_error ("Opening socketpair", Qnil);
-      outchannel = inchannel = sv[0];
-      forkout = forkin = sv[1];
-    }
-#else /* not SKTPAIR */
     {
       int tem;
       tem = pipe (sv);
@@ -1930,7 +1904,6 @@
       outchannel = sv[1];
       forkin = sv[0];
     }
-#endif /* not SKTPAIR */
 
 #if 0
   /* Replaced by close_process_descs */
@@ -3156,9 +3129,9 @@
       else
 	/* Attempt to interpret host as numeric inet address */
 	{
-	  IN_ADDR numeric_addr;
+	  unsigned long numeric_addr;
 	  numeric_addr = inet_addr ((char *) SDATA (host));
-	  if (NUMERIC_ADDR_ERROR)
+	  if (numeric_addr == -1)
 	    error ("Unknown host \"%s\"", SDATA (host));
 
 	  bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr,
--- a/src/regex.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/regex.c	Sat Feb 09 18:03:10 2008 +0000
@@ -289,11 +289,7 @@
 /* Sword must be nonzero for the wordchar pattern commands in re_match_2.  */
 enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
 
-# ifdef SWITCH_ENUM_BUG
-#  define SWITCH_ENUM_CAST(x) ((int)(x))
-# else
 #  define SWITCH_ENUM_CAST(x) (x)
-# endif
 
 /* Dummy macros for non-Emacs environments.  */
 # define BASE_LEADING_CODE_P(c) (0)
--- a/src/s/hpux.h	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/s/hpux.h	Sat Feb 09 18:03:10 2008 +0000
@@ -210,9 +210,6 @@
 { 0, 50, 75, 110, 135, 150, 200, 300, 600, 900, 1200,  \
   1800, 2400, 3600, 4800, 7200, 9600, 19200, 38400 }
 
-/* This is needed for HPUX version 6.2; it may not be needed for 6.2.1.  */
-#define SHORT_CAST_BUG
-
 /* This is how to get the device name of the tty end of a pty.  */
 #define PTY_TTY_NAME_SPRINTF \
             sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
--- a/src/s/msdos.h	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/s/msdos.h	Sat Feb 09 18:03:10 2008 +0000
@@ -193,7 +193,6 @@
 
 /* command.com does not understand `...` so we define this.  */
 #define LIB_GCC -Lgcc
-#define DONT_NEED_ENVIRON
 #define SEPCHAR ';'
 
 #define NULL_DEVICE "nul"
--- a/src/sysdep.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/sysdep.c	Sat Feb 09 18:03:10 2008 +0000
@@ -144,9 +144,7 @@
 
 #if defined (USG)
 #include <sys/utsname.h>
-#ifndef MEMORY_IN_STRING_H
 #include <memory.h>
-#endif
 #if defined (TIOCGWINSZ)
 #ifdef NEED_SIOCTL
 #include <sys/sioctl.h>
@@ -387,9 +385,6 @@
     emacs_ospeed = 0;
   else
     {
-#ifdef INIT_BAUD_RATE
-      INIT_BAUD_RATE ();
-#else
 #ifdef DOS_NT
     emacs_ospeed = 15;
 #else  /* not DOS_NT */
@@ -406,11 +401,6 @@
       sg.c_cflag = B9600;
       tcgetattr (fd, &sg);
       emacs_ospeed = cfgetospeed (&sg);
-#if defined (USE_GETOBAUD) && defined (getobaud)
-      /* m88k-motorola-sysv3 needs this (ghazi@noc.rutgers.edu) 9/1/94. */
-      if (emacs_ospeed == 0)
-        emacs_ospeed = getobaud (sg.c_cflag);
-#endif
 #else /* neither VMS nor TERMIOS */
 #ifdef HAVE_TERMIO
       struct termio sg;
@@ -433,7 +423,6 @@
 #endif /* not HAVE_TERMIOS */
 #endif /* not VMS */
 #endif /* not DOS_NT */
-#endif /* not INIT_BAUD_RATE */
     }
 
   baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0]
@@ -1274,11 +1263,9 @@
 int lmode;
 #endif
 
-#ifndef F_SETOWN_BUG
 #ifdef F_SETOWN
 int old_fcntl_owner[MAXDESC];
 #endif /* F_SETOWN */
-#endif /* F_SETOWN_BUG */
 
 /* This may also be defined in stdio,
    but if so, this does no harm,
@@ -1632,7 +1619,6 @@
 #endif /* VMS */
 
 #ifdef F_SETFL
-#ifndef F_SETOWN_BUG
 #ifdef F_GETOWN		/* F_SETFL does not imply existence of F_GETOWN */
   if (interrupt_input)
     {
@@ -1651,7 +1637,6 @@
 #endif /* HAVE_GPM */
     }
 #endif /* F_GETOWN */
-#endif /* F_SETOWN_BUG */
 #endif /* F_SETFL */
 
 #ifdef BSD4_1
@@ -1895,7 +1880,6 @@
 #endif
 
 #ifdef F_SETFL
-#ifndef F_SETOWN_BUG
 #ifdef F_SETOWN		/* F_SETFL does not imply existence of F_SETOWN */
   if (interrupt_input)
     {
@@ -1904,7 +1888,6 @@
              old_fcntl_owner[fileno (tty_out->input)]);
     }
 #endif /* F_SETOWN */
-#endif /* F_SETOWN_BUG */
 #ifdef O_NDELAY
   fcntl (fileno (tty_out->input), F_SETFL,
          fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NDELAY);
@@ -2543,7 +2526,7 @@
 
 #ifndef MSDOS
 #ifndef VMS
-#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
+#if !defined (HAVE_SELECT)
 
 #include "sysselect.h"
 #undef select
@@ -2781,7 +2764,7 @@
     }
 }
 
-#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
+#if !defined (HAVE_SELECT)
 #define select sys_select
 #endif
 
@@ -5287,31 +5270,6 @@
 
 #endif /* AIXHFT */
 
-#ifdef USE_DL_STUBS
-
-/* These are included on Sunos 4.1 when we do not use shared libraries.
-   X11 libraries may refer to these functions but (we hope) do not
-   actually call them.  */
-
-void *
-dlopen ()
-{
-  return 0;
-}
-
-void *
-dlsym ()
-{
-  return 0;
-}
-
-int
-dlclose ()
-{
-  return -1;
-}
-
-#endif /* USE_DL_STUBS */
 
 #ifndef BSTRING
 
--- a/src/sysselect.h	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/sysselect.h	Sat Feb 09 18:03:10 2008 +0000
@@ -47,7 +47,7 @@
 #define FD_ZERO(p) (*(p) = 0)
 #endif /* no FD_SET */
 
-#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
+#if !defined (HAVE_SELECT)
 #define select sys_select
 #endif
 
--- a/src/systty.h	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/systty.h	Sat Feb 09 18:03:10 2008 +0000
@@ -127,10 +127,8 @@
 #ifdef SYSV_PTYS
 #include <sys/types.h>
 #include <sys/tty.h>
-#ifndef NO_PTY_H
 #include <sys/pty.h>
 #endif
-#endif
 
 
 /* Special cases - inhibiting the use of certain features.  */
--- a/src/unexec.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/unexec.c	Sat Feb 09 18:03:10 2008 +0000
@@ -133,11 +133,6 @@
 If defined, this macro specifies the number of bytes to seek into the
 a.out file before starting to write the text segment.
 
-* EXEC_MAGIC
-
-For machines using COFF, this macro, if defined, is a value stored
-into the magic number field of the output file.
-
 * ADJUST_EXEC_HEADER
 
 This macro can be used to generate statements to adjust or
@@ -157,7 +152,6 @@
 #ifndef emacs
 #define PERROR(arg) perror (arg); return -1
 #else
-#define IN_UNEXEC
 #include <config.h>
 #define PERROR(file) report_error (file, new)
 #endif
@@ -256,11 +250,6 @@
 
 #define SYMS_START ((long) N_SYMOFF (ohdr))
 
-/* Some machines override the structure name for an a.out header.  */
-#ifndef EXEC_HDR_TYPE
-#define EXEC_HDR_TYPE struct exec
-#endif
-
 #ifdef HPUX
 #ifdef HP9000S200_ID
 #define MY_ID HP9000S200_ID
@@ -272,11 +261,11 @@
 static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC};
 #define N_TXTOFF(x) TEXT_OFFSET(x)
 #define N_SYMOFF(x) LESYM_OFFSET(x)
-static EXEC_HDR_TYPE hdr, ohdr;
+static struct exec hdr, ohdr;
 
 #else /* not HPUX */
 
-#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (GNU_LINUX)
+#if defined (USG) && !defined (IRIS) && !defined (GNU_LINUX)
 static struct bhdr hdr, ohdr;
 #define a_magic fmagic
 #define a_text tsize
@@ -290,10 +279,10 @@
     (((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\
      ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
 #define NEWMAGIC FMAGIC
-#else /* IRIS or IBMAIX or not USG */
-static EXEC_HDR_TYPE hdr, ohdr;
+#else /* IRIS or not USG */
+static struct exec hdr, ohdr;
 #define NEWMAGIC ZMAGIC
-#endif /* IRIS or IBMAIX not USG */
+#endif /* IRIS or not USG */
 #endif /* not HPUX */
 
 static int unexec_text_start;
@@ -504,12 +493,6 @@
 #endif
 
   f_hdr.f_flags |= (F_RELFLG | F_EXEC);
-#ifdef TPIX
-  f_hdr.f_nscns = 3;
-#endif
-#ifdef EXEC_MAGIC
-  f_ohdr.magic = EXEC_MAGIC;
-#endif
 #ifndef NO_REMAP
   f_ohdr.text_start = (long) start_of_text ();
   f_ohdr.tsize = data_start - f_ohdr.text_start;
@@ -517,13 +500,11 @@
 #endif /* NO_REMAP */
   f_ohdr.dsize = bss_start - f_ohdr.data_start;
   f_ohdr.bsize = bss_end - bss_start;
-#ifndef KEEP_OLD_TEXT_SCNPTR
   /* On some machines, the old values are right.
      ??? Maybe on all machines with NO_REMAP.  */
   f_thdr.s_size = f_ohdr.tsize;
   f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr);
   f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr));
-#endif /* KEEP_OLD_TEXT_SCNPTR */
 #ifdef ADJUST_TEXT_SCNHDR_SIZE
   /* On some machines, `text size' includes all headers.  */
   f_thdr.s_size -= f_thdr.s_scnptr;
@@ -535,16 +516,8 @@
   f_thdr.s_scnptr
     = (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT;
 #endif /* SECTION_ALIGNMENT */
-#ifdef TPIX
-  f_thdr.s_scnptr = 0xd0;
-#endif
   text_scnptr = f_thdr.s_scnptr;
-#ifdef ADJUST_TEXTBASE
-  text_scnptr = sizeof (f_hdr) + sizeof (f_ohdr) + (f_hdr.f_nscns) * (sizeof (f_thdr));
-#endif
-#ifndef KEEP_OLD_PADDR
   f_dhdr.s_paddr = f_ohdr.data_start;
-#endif /* KEEP_OLD_PADDR */
   f_dhdr.s_vaddr = f_ohdr.data_start;
   f_dhdr.s_size = f_ohdr.dsize;
   f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size;
@@ -561,9 +534,7 @@
     = (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT;
 #endif /* DATA_SECTION_ALIGNMENT */
   data_scnptr = f_dhdr.s_scnptr;
-#ifndef KEEP_OLD_PADDR
   f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize;
-#endif /* KEEP_OLD_PADDR */
   f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize;
   f_bhdr.s_size = f_ohdr.bsize;
   f_bhdr.s_scnptr = 0L;
@@ -874,10 +845,6 @@
 
   lseek (new, (long) text_scnptr, 0);
   ptr = (char *) f_ohdr.text_start;
-#ifdef HEADER_INCL_IN_TEXT
-  /* For Gould UTX/32, text starts after headers */
-  ptr = (char *) (ptr + text_scnptr);
-#endif /* HEADER_INCL_IN_TEXT */
   end = ptr + f_ohdr.tsize;
   write_segment (new, ptr, end);
 
--- a/src/w32term.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/w32term.c	Sat Feb 09 18:03:10 2008 +0000
@@ -7057,16 +7057,9 @@
      the bitmaps.  */
   w32_init_fringe (terminal->rif);
 
-#ifndef F_SETOWN_BUG
 #ifdef F_SETOWN
-#ifdef F_SETOWN_SOCK_NEG
-  /* stdin is a socket here */
-  fcntl (connection, F_SETOWN, -getpid ());
-#else /* ! defined (F_SETOWN_SOCK_NEG) */
   fcntl (connection, F_SETOWN, getpid ());
-#endif /* ! defined (F_SETOWN_SOCK_NEG) */
 #endif /* ! defined (F_SETOWN) */
-#endif /* F_SETOWN_BUG */
 
 #ifdef SIGIO
   if (interrupt_input)
--- a/src/xsmfns.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/xsmfns.c	Sat Feb 09 18:03:10 2008 +0000
@@ -389,16 +389,9 @@
     }
 
   ice_fd = IceConnectionNumber (iceConn);
-#ifndef F_SETOWN_BUG
 #ifdef F_SETOWN
-#ifdef F_SETOWN_SOCK_NEG
-  /* stdin is a socket here */
-  fcntl (ice_fd, F_SETOWN, -getpid ());
-#else /* ! defined (F_SETOWN_SOCK_NEG) */
   fcntl (ice_fd, F_SETOWN, getpid ());
-#endif /* ! defined (F_SETOWN_SOCK_NEG) */
 #endif /* ! defined (F_SETOWN) */
-#endif /* F_SETOWN_BUG */
 
 #ifdef SIGIO
   if (interrupt_input)
--- a/src/xterm.c	Sat Feb 09 14:06:47 2008 +0000
+++ b/src/xterm.c	Sat Feb 09 18:03:10 2008 +0000
@@ -11533,16 +11533,9 @@
     add_keyboard_wait_descriptor (connection);
 #endif
 
-#ifndef F_SETOWN_BUG
 #ifdef F_SETOWN
-#ifdef F_SETOWN_SOCK_NEG
-  /* stdin is a socket here */
-  fcntl (connection, F_SETOWN, -getpid ());
-#else /* ! defined (F_SETOWN_SOCK_NEG) */
   fcntl (connection, F_SETOWN, getpid ());
-#endif /* ! defined (F_SETOWN_SOCK_NEG) */
 #endif /* ! defined (F_SETOWN) */
-#endif /* F_SETOWN_BUG */
 
 #ifdef SIGIO
   if (interrupt_input)