From 8e5a769965313a7a1c42b5992ed24e8b0ea71ead Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 6 Dec 2016 23:41:45 -0800 Subject: [PATCH] Clean out some IRIX cruft * etc/MACHINES: Remove obsolete discussion of IRIX. * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code. (create_process) [HAVE_PTYS]: Don't worry about IRIX. * src/syntax.c (scan_sexps_forward): Remove obsolete comment. * src/unexelf.c [__sgi]: Don't include . (unexec) [__sgi]: Remove SGI-specific code. --- etc/MACHINES | 9 --------- src/process.c | 9 ++------- src/syntax.c | 2 -- src/unexelf.c | 50 -------------------------------------------------- 4 files changed, 2 insertions(+), 68 deletions(-) diff --git a/etc/MACHINES b/etc/MACHINES index 15ac91772e0..7f3c979c3f6 100644 --- a/etc/MACHINES +++ b/etc/MACHINES @@ -101,15 +101,6 @@ the list at the end of this file. ./configure CC='/usr/sfw/bin/gcc -m64' # GCC ./configure CC='cc -m64' # Solaris Studio -** Irix 6.5 - - Emacs versions later than 24.4 will not compile on Irix by default. - (Note that SGI stopped supporting Irix in December 2013.) - Older versions of Emacs 24 (and 23?) also had problems on Irix. - It *may* be possible to build Emacs <= 24.4 on Irix 6.5 with an old - version (3.1) of gcc. Newer versions of gcc may not work. - See . - * Obsolete platforms diff --git a/src/process.c b/src/process.c index 49340b120ef..8ab73bd9ae6 100644 --- a/src/process.c +++ b/src/process.c @@ -690,11 +690,7 @@ allocate_pty (char pty_name[PTY_NAME_SIZE]) if (faccessat (AT_FDCWD, pty_name, R_OK | W_OK, AT_EACCESS) != 0) { emacs_close (fd); -# ifndef __sgi continue; -# else - return -1; -# endif /* __sgi */ } setup_pty (fd); return fd; @@ -1886,9 +1882,8 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) /* Make the pty be the controlling terminal of the process. */ #ifdef HAVE_PTYS /* First, disconnect its current controlling terminal. */ - /* We tried doing setsid only if pty_flag, but it caused - process_set_signal to fail on SGI when using a pipe. */ - setsid (); + if (pty_flag) + setsid (); /* Make the pty's terminal the controlling terminal. */ if (pty_flag && forkin >= 0) { diff --git a/src/syntax.c b/src/syntax.c index d463f7e93db..338dd854f22 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3196,8 +3196,6 @@ do { prev_from = from; \ && (c1 = FETCH_CHAR (from_byte), syntax = SYNTAX_WITH_FLAGS (c1), SYNTAX_FLAGS_COMSTART_SECOND (syntax))) - /* Duplicate code to avoid a complex if-expression - which causes trouble for the SGI compiler. */ { /* Record the comment style we have entered so that only the comment-end sequence of the same style actually diff --git a/src/unexelf.c b/src/unexelf.c index 748e7a42cfa..58c9244c3a5 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -66,9 +66,6 @@ what you give them. Help stamp out software-hoarding! */ #include #include #endif /* _SYSTYPE_SYSV */ -#if __sgi -#include /* for HDRR declaration */ -#endif /* __sgi */ #ifndef MAP_ANON #ifdef MAP_ANONYMOUS @@ -498,53 +495,6 @@ unexec (const char *new_name, const char *old_name) phdr->cbExtOffset += diff; } #endif /* __alpha__ || _SYSTYPE_SYSV */ - -#if __sgi - /* Adjust the HDRR offsets in .mdebug and copy the - line data if it's in its usual 'hole' in the object. - Makes the new file debuggable with dbx. - patches up two problems: the absolute file offsets - in the HDRR record of .mdebug (see /usr/include/syms.h), and - the ld bug that gets the line table in a hole in the - elf file rather than in the .mdebug section proper. - David Anderson. davea@sgi.com Jan 16,1994. */ - if (strcmp (old_section_names + new_shdr->sh_name, ".mdebug") == 0 - && new_shdr->sh_offset - old_shdr->sh_offset != 0) - { -#define MDEBUGADJUST(__ct,__fileaddr) \ - if (n_phdrr->__ct > 0) \ - { \ - n_phdrr->__fileaddr += movement; \ - } - - HDRR *o_phdrr = (HDRR *) ((byte *) old_base + old_shdr->sh_offset); - HDRR *n_phdrr = (HDRR *) ((byte *) new_base + new_shdr->sh_offset); - ptrdiff_t movement = new_shdr->sh_offset - old_shdr->sh_offset; - - MDEBUGADJUST (idnMax, cbDnOffset); - MDEBUGADJUST (ipdMax, cbPdOffset); - MDEBUGADJUST (isymMax, cbSymOffset); - MDEBUGADJUST (ioptMax, cbOptOffset); - MDEBUGADJUST (iauxMax, cbAuxOffset); - MDEBUGADJUST (issMax, cbSsOffset); - MDEBUGADJUST (issExtMax, cbSsExtOffset); - MDEBUGADJUST (ifdMax, cbFdOffset); - MDEBUGADJUST (crfd, cbRfdOffset); - MDEBUGADJUST (iextMax, cbExtOffset); - /* The Line Section, being possible off in a hole of the object, - requires special handling. */ - if (n_phdrr->cbLine > 0) - { - n_phdrr->cbLineOffset += movement; - - if (o_phdrr->cbLineOffset > (old_shdr->sh_offset - + old_shdr->sh_size)) - /* If not covered by section, it hasn't yet been copied. */ - memcpy (n_phdrr->cbLineOffset + new_base, - o_phdrr->cbLineOffset + old_base, n_phdrr->cbLine); - } - } -#endif /* __sgi */ } /* Update the symbol values of _edata and _end. */ -- 2.39.2