From 4624371d9a4c1a078bcb7a305adb0520cd8975bc Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 9 Feb 2008 18:03:10 +0000 Subject: [PATCH] * 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. --- ChangeLog | 5 ++++ admin/CPP-DEFINES | 66 +--------------------------------------------- configure.in | 18 +------------ lib-src/ChangeLog | 3 +++ lib-src/fakemail.c | 6 +---- src/ChangeLog | 24 +++++++++++++++++ src/Makefile.in | 20 ++------------ src/ecrt0.c | 2 +- src/emacs.c | 10 +------ src/gmalloc.c | 19 +++---------- src/keyboard.c | 2 +- src/lisp.h | 10 ++----- src/m/ibm370aix.h | 6 ----- src/process.c | 33 +++-------------------- src/regex.c | 4 --- src/s/hpux.h | 3 --- src/s/msdos.h | 1 - src/sysdep.c | 46 ++------------------------------ src/sysselect.h | 2 +- src/systty.h | 2 -- src/unexec.c | 43 ++++-------------------------- src/w32term.c | 7 ----- src/xsmfns.c | 7 ----- src/xterm.c | 7 ----- 24 files changed, 57 insertions(+), 289 deletions(-) diff --git a/ChangeLog b/ChangeLog index de1023d3b0..30e365af25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-09 Dan Nicolaescu + + * configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code + dealing with obsolete variables. + 2008-02-08 Glenn Morris * Makefile.in (check-info-dir): New target. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 4d2d642eb5..f951a4686d 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -42,23 +42,17 @@ FRAME_WINDOW_P A GUI frame (like X, w32, etc.) 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 @@ CANNOT_DUMP 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 @@ DATA_START 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_UNIX_DOMAIN 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 @@ LIB_X11_LIB 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 @@ SEGMENT_MASK 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 @@ TERMCAP 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 @@ USG_SHARED_LIBRARIES VIRT_ADDR_VARIES WORDS_BIG_ENDIAN WORD_MACHINE -WRITE -X11R4 -XICCC XINT XSET XUINT @@ -280,26 +223,19 @@ X_DEFAULT_FONT _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 diff --git a/configure.in b/configure.in index 57aa340544..7147952152 100644 --- a/configure.in +++ b/configure.in @@ -1004,14 +1004,10 @@ configure___ c_switch_machine=C_SWITCH_MACHINE #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(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") 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 @@ if test "${HAVE_X11}" = "yes" ; then [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. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 8b669dbdcd..a9d82de9c7 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,8 @@ 2008-02-09 Dan Nicolaescu + * 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. diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index 10a9cdb20e..a2d31350fc 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -135,10 +135,6 @@ struct linebuffer lb; #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 @@ main (argc, argv) 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; diff --git a/src/ChangeLog b/src/ChangeLog index 5ee3586885..9fd2e55b12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2008-02-09 Dan Nicolaescu + + * 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 * buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table diff --git a/src/Makefile.in b/src/Makefile.in index e6c36e5c7e..baf41d4af3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -219,7 +219,7 @@ MAKE = MAKE_COMMAND #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 @@ STARTFILES = START_FILES #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 @@ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcd .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 @@ XFT_LIBS=@XFT_LIBS@ /* 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 @@ GNULIB_VAR = #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 diff --git a/src/ecrt0.c b/src/ecrt0.c index 41bd1c8b32..9d73dfe05d 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c @@ -72,7 +72,7 @@ int data_start = 0; int errno; #endif -#ifndef DONT_NEED_ENVIRON +#ifndef MSDOS char **environ; #endif diff --git a/src/emacs.c b/src/emacs.c index 6a2479fc37..6702b5e284 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -423,11 +423,7 @@ memory_warning_signal (sig) #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 @@ main (argc, argv 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. */ diff --git a/src/gmalloc.c b/src/gmalloc.c index ccc08e1ff6..bd8fe344cb 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -110,10 +110,6 @@ extern "C" #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 @@ extern __ptr_t realloc PP ((__ptr_t __ptr, __malloc_size_t __size)); /* 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 @@ _malloc_internal_nolock (size) 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 @@ Fifth Floor, Boston, MA 02110-1301, USA. /* 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 @@ _free_internal (ptr) /* Return memory to the heap. */ -FREE_RETURN_TYPE +void free (ptr) __ptr_t ptr; { @@ -1421,8 +1411,7 @@ Fifth Floor, Boston, MA 02110-1301, USA. /* 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 diff --git a/src/keyboard.c b/src/keyboard.c index 83cc47099c..81e2feadbd 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -7255,7 +7255,7 @@ tty_read_avail_input (struct terminal *terminal, Jeffrey Honig 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, diff --git a/src/lisp.h b/src/lisp.h index 284ee0b2b2..5156386551 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1665,8 +1665,7 @@ typedef unsigned char UCHAR; 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 @@ void staticpro P_ ((Lisp_Object *)); /* 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 @@ extern Lisp_Object Vdirectory_sep_char; #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. diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h index 62daa72369..da19196172 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 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. */ diff --git a/src/process.c b/src/process.c index 73da0db18a..03b6a0b4f9 100644 --- a/src/process.c +++ b/src/process.c @@ -57,12 +57,9 @@ Boston, MA 02110-1301, USA. */ #include #include #include -#ifdef NEED_NET_ERRNO_H -#include -#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 @@ Boston, MA 02110-1301, USA. */ #include #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 #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) @@ -216,12 +204,6 @@ extern int h_errno; maybe other values to come. */ static Lisp_Object Vprocess_connection_type; -#ifdef SKTPAIR -#ifndef HAVE_SOCKETS -#include -#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 @@ create_process (process, new_argv, current_dir) } 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 @@ create_process (process, new_argv, current_dir) outchannel = sv[1]; forkin = sv[0]; } -#endif /* not SKTPAIR */ #if 0 /* Replaced by close_process_descs */ @@ -3156,9 +3129,9 @@ usage: (make-network-process &rest ARGS) */) 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, diff --git a/src/regex.c b/src/regex.c index a0d6b945cf..32da3d02d2 100644 --- a/src/regex.c +++ b/src/regex.c @@ -289,11 +289,7 @@ xrealloc (block, size) /* 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) diff --git a/src/s/hpux.h b/src/s/hpux.h index ca17f2aa1e..1a9b2b8489 100644 --- a/src/s/hpux.h +++ b/src/s/hpux.h @@ -210,9 +210,6 @@ Boston, MA 02110-1301, USA. */ { 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); diff --git a/src/s/msdos.h b/src/s/msdos.h index 9b0b8b0449..61289fdc2c 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 */ /* command.com does not understand `...` so we define this. */ #define LIB_GCC -Lgcc -#define DONT_NEED_ENVIRON #define SEPCHAR ';' #define NULL_DEVICE "nul" diff --git a/src/sysdep.c b/src/sysdep.c index 01126c4907..02e1832e63 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -144,9 +144,7 @@ extern int errno; #if defined (USG) #include -#ifndef MEMORY_IN_STRING_H #include -#endif #if defined (TIOCGWINSZ) #ifdef NEED_SIOCTL #include @@ -387,9 +385,6 @@ init_baud_rate (int fd) 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 @@ init_baud_rate (int fd) 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 @@ init_baud_rate (int fd) #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 @@ emacs_set_tty (fd, settings, flushp) 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 @@ init_sys_modes (tty_out) #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 @@ init_sys_modes (tty_out) #endif /* HAVE_GPM */ } #endif /* F_GETOWN */ -#endif /* F_SETOWN_BUG */ #endif /* F_SETFL */ #ifdef BSD4_1 @@ -1895,7 +1880,6 @@ reset_sys_modes (tty_out) #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 @@ reset_sys_modes (tty_out) 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 @@ init_system_name () #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 @@ read_input_waiting () } } -#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X) +#if !defined (HAVE_SELECT) #define select sys_select #endif @@ -5287,31 +5270,6 @@ hft_reset (struct tty_display_info *tty_out) #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 diff --git a/src/sysselect.h b/src/sysselect.h index a866af3100..e0e6c48ca9 100644 --- a/src/sysselect.h +++ b/src/sysselect.h @@ -47,7 +47,7 @@ Boston, MA 02110-1301, USA. */ #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 diff --git a/src/systty.h b/src/systty.h index a7e8c41c69..dc1460a24c 100644 --- a/src/systty.h +++ b/src/systty.h @@ -127,10 +127,8 @@ static struct sensemode { #ifdef SYSV_PTYS #include #include -#ifndef NO_PTY_H #include #endif -#endif /* Special cases - inhibiting the use of certain features. */ diff --git a/src/unexec.c b/src/unexec.c index 4ecb239c13..2ca70b752e 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. 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 @@ pointer looks like an int) but not on all machines. #ifndef emacs #define PERROR(arg) perror (arg); return -1 #else -#define IN_UNEXEC #include #define PERROR(file) report_error (file, new) #endif @@ -256,11 +250,6 @@ extern char *sbrk (); #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 OLDMAGIC = {MY_ID, SHARE_MAGIC}; 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 @@ static struct bhdr hdr, ohdr; (((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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) #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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) #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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) 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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) = (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 @@ copy_text_and_data (new, a_out) 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); diff --git a/src/w32term.c b/src/w32term.c index 4766382f6a..cbe8e1f677 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -7057,16 +7057,9 @@ w32_term_init (display_name, xrm_option, resource_name) 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) diff --git a/src/xsmfns.c b/src/xsmfns.c index 9a6225c2fa..bfc8a2dfae 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -389,16 +389,9 @@ ice_conn_watch_CB (iceConn, clientData, opening, watchData) } 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) diff --git a/src/xterm.c b/src/xterm.c index cf806e49c3..840c874950 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11533,16 +11533,9 @@ x_term_init (display_name, xrm_option, resource_name) 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) -- 2.20.1