summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2014-08-09 17:12:33 +0100
committerReuben Thomas <rrt@sc3d.org>2014-08-09 17:12:33 +0100
commitdcf7e861abd47b7b8f5803704f5e97e0c3cc1153 (patch)
tree64a5d55776b9a4b30eda325a836f3bd3e2516058
parent5742859f273b82e7dbadf7e9f581fd5d364dc05a (diff)
Remove support for DJGPP < 2.02
This also removes some specially-licensed files and lots of accompanying explanation.
-rw-r--r--ChangeLog5
-rw-r--r--admin/ChangeLog6
-rw-r--r--admin/authors.el1
-rw-r--r--admin/notes/copyright8
-rw-r--r--config.bat57
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/PROBLEMS13
-rwxr-xr-xmake-dist2
-rw-r--r--msdos/ChangeLog8
-rw-r--r--msdos/INSTALL42
-rw-r--r--msdos/README123
-rw-r--r--msdos/is_exec.c238
-rw-r--r--msdos/sed2v2.inp4
-rw-r--r--msdos/sigaction.c57
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dosfns.c7
-rw-r--r--src/msdos.c105
17 files changed, 73 insertions, 612 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b329544e5..bfdef69294 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-09 Reuben Thomas <rrt@sc3d.org>
+
+ * make-dist (files): Remove msdos/is_exec.c and sigaction.c.
+ * config.bat: Require DJGPP 2.02 or later.
+
2014-08-09 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 34dc8c9c5c..6746bb253e 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,9 @@
+2014-08-09 Reuben Thomas <rrt@sc3d.org>
+
+ * notes/copyright: Remove mention of msdos/is_exec.c and
+ sigaction.c.
+ * authors.el (authors-renamed-files-alist): Removed is_exec.c.
+
2014-08-07 Reuben Thomas <rrt@sc3d.org>
* notes/exit-value: Remove specific discussion of VMS.
diff --git a/admin/authors.el b/admin/authors.el
index 3a552c6c1e..60e7fc39a7 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -712,7 +712,6 @@ in the repository.")
("server.c" . "emacsserver.c")
("lib-src/etags.c" . "etags.c")
;; msdos/
- ("is-exec.c" . "is_exec.c")
("enriched.doc" . "enriched.txt")
("GETTING.GNU.SOFTWARE" . "FTP")
("etc/MACHINES" . "MACHINES")
diff --git a/admin/notes/copyright b/admin/notes/copyright
index ebef063303..77ca913701 100644
--- a/admin/notes/copyright
+++ b/admin/notes/copyright
@@ -316,11 +316,6 @@ licensing@fsf.org starting on Thu, 07 Aug 2003 with subject:
"[gnu.org #58812] Changing license of MH-E manual"
-msdos/is_exec.c, sigaction.c - these files are copyright DJ Delorie.
-Leave the copyrights alone. Leave the Eli Zaretskii copyright in
-is_exec.c alone. See the msdos/README file for the legal history of
-these files.
-
msdos/sed*.inp - These files are copyright FSF and distributed under
an MIT-like license.
@@ -563,8 +558,7 @@ oldXMenu/insque.c (rms: "We wrote that specifically for Emacs, so
definitely relicense that.").
2. The files that are copyright FSF and AIST, or AIST alone, should be
-and were updated, ditto the oldXMenu files with FSF copyright, and
-msdos/is_exec.c and sigaction.c.
+and were updated, ditto the oldXMenu files with FSF copyright.
3. lwlib/
diff --git a/config.bat b/config.bat
index cc354478ee..6d3210af70 100644
--- a/config.bat
+++ b/config.bat
@@ -19,13 +19,13 @@ rem You should have received a copy of the GNU General Public License
rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.
rem ----------------------------------------------------------------------
-rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
-rem
-rem + msdos version 3 or better.
-rem + DJGPP version 2.0 or later (version 2.03 or later recommended).
-rem + make utility that allows breaking of the 128 chars limit on
-rem command lines. ndmake (as of version 4.5) won't work due to a
-rem line length limit. The make that comes with DJGPP does work (and is
+rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
+rem
+rem + msdos version 3 or better.
+rem + DJGPP version 2.02 or later (version 2.03 or later recommended).
+rem + make utility that allows breaking of the 128 chars limit on
+rem command lines. ndmake (as of version 4.5) won't work due to a
+rem line length limit. The make that comes with DJGPP does work (and is
rem recommended).
rem + rm, mv, and cp (from GNU file utilities).
rem + sed (you can use the port that comes with DJGPP).
@@ -106,13 +106,13 @@ Echo Checking what version of DJGPP is installed...
If Not "%DJGPP%" == "" goto djgppOk
Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed!
Goto End
-:djgppOk
-echo int main() >junk.c
-echo #ifdef __DJGPP__ >>junk.c
-echo {return (__DJGPP__)*10;} >>junk.c
-echo #else >>junk.c
-echo #ifdef __GO32__ >>junk.c
-echo {return 10;} >>junk.c
+:djgppOk
+echo int main() >junk.c
+echo #ifdef __DJGPP__ >>junk.c
+echo {return (__DJGPP__)*10 + (__DJGPP_MINOR__);} >>junk.c
+echo #else >>junk.c
+echo #ifdef __GO32__ >>junk.c
+echo {return 10;} >>junk.c
echo #else >>junk.c
echo {return 0;} >>junk.c
echo #endif >>junk.c
@@ -123,22 +123,21 @@ junk
If ErrorLevel 10 Goto go32Ok
rm -f junk.c junk junk.exe
Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed!
-Goto End
-:go32Ok
-set djgpp_ver=2
-If Not ErrorLevel 20 Echo To build 'Emacs' you need DJGPP v2.0 or later!
-If Not ErrorLevel 20 Goto End
-rm -f junk.c junk junk.exe
-rem DJECHO is used by the top-level Makefile in the v2.x build
-Echo Checking whether 'djecho' is available...
+Goto End
+:go32Ok
+set djgpp_ver=2
+If Not ErrorLevel 22 Echo To build 'Emacs' you need DJGPP v2.02 or later!
+If Not ErrorLevel 22 Goto End
+rm -f junk.c junk junk.exe
+rem DJECHO is used by the top-level Makefile in the v2.x build
+Echo Checking whether 'djecho' is available...
redir -o Nul -eo djecho -o junk.$$$ foo
-If Exist junk.$$$ Goto djechoOk
-Echo To build 'Emacs' you need the 'djecho.exe' program!
-Echo 'djecho.exe' is part of 'djdevNNN.zip' basic DJGPP development kit.
-Echo Versions of DJGPP before 2.02 called this program 'echo.exe'.
-Echo Either unpack 'djecho.exe' from the 'djdevNNN.zip' archive,
-Echo or, if you have 'echo.exe', copy it to 'djecho.exe'.
-Echo Then run CONFIG.BAT again with the same arguments you did now.
+If Exist junk.$$$ Goto djechoOk
+Echo To build 'Emacs' you need the 'djecho.exe' program!
+Echo 'djecho.exe' is part of 'djdevNNN.zip' basic DJGPP development kit.
+Echo Either unpack 'djecho.exe' from the 'djdevNNN.zip' archive,
+Echo or, if you have 'echo.exe', copy it to 'djecho.exe'.
+Echo Then run CONFIG.BAT again with the same arguments you did now.
Goto End
:djechoOk
rm -f junk.$$$
diff --git a/etc/ChangeLog b/etc/ChangeLog
index fdaf1f0cab..fe3b1c5372 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-09 Reuben Thomas <rrt@sc3d.org>
+
+ * PROBLEMS: Remove msdos/is_exec.c and sigaction.c.
+
2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
* TODO: remove frame height remark.
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index ed41ddf65a..3401f4895e 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2850,19 +2850,6 @@ This is an unfortunate side-effect of the support for Unix-style
device names such as /dev/null in the DJGPP runtime library. A
work-around is to rename the problem directory to another name.
-*** MS-DOS+DJGPP: Problems on MS-DOS if DJGPP v2.0 is used to compile Emacs.
-
-There are two DJGPP library bugs which cause problems:
-
- * Running `shell-command' (or `compile', or `grep') you get
- `Searching for program: permission denied (EACCES), c:/command.com';
- * After you shell to DOS, Ctrl-Break kills Emacs.
-
-To work around these bugs, you can use two files in the msdos
-subdirectory: `is_exec.c' and `sigaction.c'. Compile them and link
-them into the Emacs executable `temacs'; then they will replace the
-incorrect library functions.
-
*** MS-DOS: Emacs compiled for MSDOS cannot find some Lisp files, or other
run-time support files, when long filename support is enabled.
diff --git a/make-dist b/make-dist
index fba490547e..3202f1f0e6 100755
--- a/make-dist
+++ b/make-dist
@@ -414,7 +414,7 @@ echo "Making links to \`msdos'"
(cd msdos
ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos
ln depfiles.bat inttypes.h ../${tempdir}/msdos
- ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos)
+ ln mainmake.v2 sed*.inp ../${tempdir}/msdos)
echo "Making links to \`nextstep'"
(cd nextstep
diff --git a/msdos/ChangeLog b/msdos/ChangeLog
index f1d6c322bc..709e68fc84 100644
--- a/msdos/ChangeLog
+++ b/msdos/ChangeLog
@@ -1,3 +1,11 @@
+2014-08-09 Reuben Thomas <rrt@sc3d.org>
+
+ * sed2v2.inp: Remove support for DJGPP 2.01.
+ * INSTALL: Don't mention removed files msdos/is_exec.c and
+ sigaction.c, and increase minimum version of DJGPP to 2.02.
+ * README: Remove note on legal status of removed files
+ msdos/is_exec.c and sigaction.c.
+
2014-04-16 Eli Zaretskii <eliz@gnu.org>
* sedlisp.inp:
diff --git a/msdos/INSTALL b/msdos/INSTALL
index de950b89de..1521a5078a 100644
--- a/msdos/INSTALL
+++ b/msdos/INSTALL
@@ -11,12 +11,13 @@ Building on plain MS-DOS is supported only if long file names are
supported (e.g., with a specialized driver such as doslfn).
To build and install the DJGPP port, you need to have the DJGPP ports
-of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed. See the
-remarks in CONFIG.BAT for more information about locations and
-versions. The Emacs FAQ (see info/efaq.info) includes pointers to
-Internet sites where you can find the necessary utilities; search for
-"MS-DOS". The configuration step (see below) will test for these
-utilities and will refuse to continue if any of them isn't found.
+of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed, and
+version 2.03 or later of DJGPP itself. See the remarks in CONFIG.BAT
+for more information about locations and versions. The Emacs FAQ (see
+info/efaq.info) includes pointers to Internet sites where you can find
+the necessary utilities; search for "MS-DOS". The configuration step
+(see below) will test for these utilities and will refuse to continue
+if any of them isn't found.
Bootstrapping Emacs or recompiling Lisp files in the `lisp'
subdirectory using the various targets in the lisp/Makefile file
@@ -28,14 +29,13 @@ are distributed in byte-compiled form as well. As for bootstrapping
itself, you will only need that if you check-out development sources
from the Emacs source repository.
-Building the DJGPP version of Emacs is currently supported only on
-systems which support long file names (e.g. Windows 9X or Windows XP).
-You need to unpack Emacs distribution in a way that doesn't truncate
-the original long filenames to the DOS 8.3 namespace; the easiest way
-to do this is to use djtar program which comes with DJGPP, since it
-will behave consistently with the rest of DJGPP tools. Do _not_
-disable the DJGPP long-file-name support (a.k.a. "LFN") while building
-Emacs.
+Building the DJGPP version of Emacs is supported only on systems which
+support long file names (e.g. Windows 9X or Windows XP). You need to
+unpack Emacs distribution in a way that doesn't truncate the original
+long filenames to the DOS 8.3 namespace; the easiest way to do this is
+to use djtar program which comes with DJGPP, since it will behave
+consistently with the rest of DJGPP tools. Do _not_ disable the DJGPP
+long-file-name support (a.k.a. "LFN") while building Emacs.
(By the time you read this, you have already unpacked the Emacs
distribution, but if the explanations above imply that you should have
@@ -68,13 +68,7 @@ type these commands:
Running "config msdos" checks for several programs that are required
to configure and build Emacs; if one of those programs is not found,
-CONFIG.BAT stops and prints an error message. If you have DJGPP
-version 2.0 or 2.01, it will complain about a program called
-DJECHO.EXE. These old versions of DJGPP shipped that program under
-the name ECHO.EXE, so you can simply copy ECHO.EXE to DJECHO.EXE and
-rerun CONFIG.BAT. If you have neither ECHO.EXE nor DJECHO.EXE, you
-should be able to find them in your djdevNNN.zip archive (where NNN is
-the DJGPP version number).
+CONFIG.BAT stops and prints an error message.
On Windows NT and Windows 2000/XP/Vista/7, running "config msdos"
might print an error message like "VDM has been already loaded". This
@@ -143,12 +137,6 @@ multitasking do not work in the DJGPP port. Synchronous subprocesses
do work, so features such as compilation, grep, and Ispell run
synchronously, unlike on other platforms.
-Version 2.0 of djgpp has two bugs that affect Emacs. We've included
-corrected versions of two files from djgpp in the msdos subdirectory:
-is_exec.c and sigaction.c. To work around the bugs, compile these
-files and link them into temacs. Djgpp versions 2.01 and later have
-these bugs fixed, so upgrade if you can before building Emacs.
-
This file is part of GNU Emacs.
diff --git a/msdos/README b/msdos/README
index 1cc424735f..07be34a5e2 100644
--- a/msdos/README
+++ b/msdos/README
@@ -24,129 +24,6 @@ reproduced here:
#
# ----------------------------------------------------------------------
-
-NOTE ON THE LEGAL STATUS OF THE FILES IS_EXEC.C, SIGACTION.C
-
-As distributed with GNU Emacs, the files is_exec.c and sigaction.c are
-Copyright (C) 1995 DJ Delorie, and are licensed under the terms of the
-GNU General Public License version 3 (see COPYING), or (at your
-option) any later version.
-
-Here we record the details of the legal history of these files.
-
-The files is_exec.c and sigaction.c were originally part of DJGPP,
-distributed by DJ Delorie. The versions of these files in DJGPP
-contain the following license notice:
-
- Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details
-
-The contents of the file COPYING.DJ (as available at, for example, the
-URL: <http://www.delorie.com/bin/cvsweb.cgi/djgpp/copying.dj>) are as
-follows:
-
--- COPYING.DJ STARTS HERE --
-
-This is the file "COPYING.DJ". It does NOT apply to any sources or
-binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
-any other agency besides DJ Delorie and others who have agreed to
-allow their sources to be distributed under these terms.
-
- Copyright Information for sources and executables that are marked
- Copyright (C) DJ Delorie
- 334 North Rd
- Deerfield NH 03037-1110
-
-This document is Copyright (C) DJ Delorie and may be distributed
-verbatim, but changing it is not allowed.
-
-Source code copyright DJ Delorie is distributed under the terms of the
-GNU General Public License, with the following exceptions:
-
-* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
- libemu.a are distributed under the terms of the GNU Library General
- Public License, rather than the GNU GPL.
-
-* Any existing copyright or authorship information in any given source
- file must remain intact. If you modify a source file, a notice to that
- effect must be added to the authorship information in the source file.
-
-* Runtime binaries, as provided by DJ in DJGPP, may be distributed
- without sources ONLY if the recipient is given sufficient information
- to obtain a copy of djgpp themselves. This primarily applies to
- go32-v2.exe, emu387.dxe, and stubedit.exe.
-
-* Runtime objects and libraries, as provided by DJ in DJGPP, when
- linked into an application, may be distributed without sources ONLY
- if the recipient is given sufficient information to obtain a copy of
- djgpp themselves. This primarily applies to crt0.o and libc.a.
-
------
-
-Changes to source code copyright BSD, FSF, or others, by DJ Delorie
-fall under the terms of the original copyright. Such files usually
-have multiple copyright notices in them.
-
-A copy of the files "COPYING" and "COPYING.LIB" are included with this
-document. If you did not receive a copy of these files, you may
-obtain one from whence this document was obtained, or by writing:
-
- Free Software Foundation, Inc.
- 51 Franklin Street,
- Fifth Floor,
- Boston, MA 02110-1301,
- USA
-
--- COPYING.DJ ENDS HERE --
-
-Both is_exec.c and sigaction.c are parts of DJGPP's libc.a, therefore
-according to exception 1 in the above terms their "base" license is
-the GNU Library General Public License [now known as the GNU Lesser
-General Public License].
-
-The terms of the GNU LGPL, specifically clause 3, which begins:
-
- 3. You may opt to apply the terms of the ordinary GNU General
- Public License instead of this License to a given copy of the
- Library.
-
-permit us to relicense the files is_exec.c and sigaction.c as used in
-GNU Emacs under the terms of the GNU GPL.
-
-COPYING.DJ, however, lists extra exceptions 2-4 to the GNU licenses.
-Items 3 and 4 are not relevant in the case of GNU Emacs, since they
-can only apply to copies of DJGPP [confirmed by email from DJ Delorie
-to rms at gnu.org and others, 2007/01/31].
-
-Exception 2 of COPYING.DJ, when viewed as an added restriction, rather
-than as an interpretation of the GPL, leads to problems. The added
-requirement makes the overall license of the file incompatible with
-the GNU GPL.
-
-As a solution to this problem, DJ Delorie has kindly granted (February
-2007) GNU Emacs an exception, and permits us to license the files
-is_exec.c and sigaction.c solely under the terms of the GNU GPL. This
-exception applies _only_ to these files as distributed with GNU Emacs.
-This solution was arrived at in an email discussion between DJ Delorie
-<dj at delorie.com> and Richard Stallman <rms at gnu.org> in
-January/February 2007. We record below a summary of the relevant final
-email in this discussion:
-
- From: DJ Delorie <dj at delorie.com>
- To: rms at gnu.org
- Subject: Re: COPYING.DJ and Emacsn
-
- I have no problem with whatever you wish to do with those files in
- emacs (as long as djgpp itself doesn't need to change).
-
-
-Accordingly, in February 2007 we relicensed the files is_exec.c and
-sigaction.c as used in GNU Emacs under the GNU GPL.
-
-Copies of both the GNU General Public License and GNU Lesser (Library)
-Public License may be obtained from <http://www.gnu.org/licenses/>, or:
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.
-
This file is part of GNU Emacs.
diff --git a/msdos/is_exec.c b/msdos/is_exec.c
deleted file mode 100644
index 16b01c59a0..0000000000
--- a/msdos/is_exec.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/* IS_EXEC.C
- *
- * Copyright (C) 1995 DJ Delorie
- * Copyright (C) 1994 Eli Zaretskii <eliz@is.elta.co.il>
- *
- * (See the README file in this directory for the copyright and license
- * history of this file.)
- *
- * This file is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This file is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this file. If not, see <http://www.gnu.org/licenses/>.
- *
- * Commentary:
- *
- * Given a filename or a file handle, and the extension of the file,
- * determine if the file is executable.
- * First, the file extension is checked in case it uniquely identifies
- * the file as either an executable or not. Failing this, the first
- * two bytes of the file are tested for known signatures of executable
- * files.
- *
- */
-
-#include <libc/stubs.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <dpmi.h>
-#include <go32.h>
-#include <io.h>
-#include <libc/farptrgs.h>
-#include <libc/dosio.h>
-
-extern unsigned short _djstat_flags;
-unsigned short _get_magic(const char *, int);
-int _is_executable(const char *, int, const char *);
-
-/*
- * Read a MAGIC NUMBER from a given file. These are the first
- * two bytes of the file, if we look at them as an unsigned short. */
-
-#define _STAT_EXEC_EXT 2 /* get execute bits from file extension? */
-#define _STAT_EXEC_MAGIC 4 /* get execute bits from magic signature? */
-
-unsigned short
-_get_magic(const char *s, int fh)
-{
- __dpmi_regs regs;
- unsigned short retval;
- unsigned short fpos_high = 0, fpos_low = 0;
- int read_fail = 0;
-
- /* If given a pathname, open the file. */
- if (s)
- {
- int handle;
- if((handle = _open(s,0)) == -1)
- return 0;
- regs.x.bx = handle;
- }
- /* Else file already open. Remember its current file position
- and move to beginning of file. */
- else
- {
- regs.x.ax = 0x4201; /* set pointer from current position */
- regs.x.bx = fh;
- regs.x.cx = regs.x.dx = 0; /* move 0 bytes (i.e., stay put) */
- __dpmi_int(0x21, &regs);
- if (regs.x.flags & 1)
- {
- errno = __doserr_to_errno(regs.x.ax);
- return 0;
- }
- fpos_high = regs.x.dx; /* got current position */
- fpos_low = regs.x.ax;
-
- regs.x.ax = 0x4200; /* set pointer from the beginning of file */
- regs.x.cx = regs.x.dx = 0; /* move to beginning of file */
- __dpmi_int(0x21, &regs);
- if (regs.x.flags & 1)
- {
- errno = __doserr_to_errno(regs.x.ax);
- return 0;
- }
- }
- regs.x.ds = __tb_segment;
- regs.x.dx = __tb_offset;
-
- /* Read 2 bytes from the file. */
- regs.x.ax = 0x3f00;
- regs.x.cx = 2;
- __dpmi_int(0x21, &regs);
-
- /* We can either (1) succeed, (2) read less than 2 bytes,
- or (3) fail to read at all. */
- if (regs.x.ax != 2)
- read_fail = (regs.x.flags & 1) ? regs.x.ax : -1;
-
- /* If called with filename, close the file. */
- if (s)
- {
- regs.x.ax = 0x3e00;
- __dpmi_int(0x21, &regs);
- if (regs.x.flags & 1)
- errno = __doserr_to_errno(regs.x.ax);
- }
- /* Else leave file pointer where we found it. */
- else
- {
- regs.x.ax = 0x4200; /* set pointer from the beginning of file */
- regs.x.bx = fh;
- regs.x.cx = fpos_high;
- regs.x.dx = fpos_low;
- __dpmi_int(0x21, &regs);
- if (regs.x.flags & 1)
- {
- errno = __doserr_to_errno(regs.x.ax);
- return 0;
- }
- }
-
- if (read_fail == 0)
- retval = _farpeekw(_dos_ds, __tb);
- else
- {
- /* The file couldn't be read: assume non-executable. If the file
- *is* executable, but was passed as a file-handle, and the user
- opened it in write-only mode, they lose... */
- retval = 0;
- if (read_fail != -1)
- errno = __doserr_to_errno(read_fail);
- }
-
- return retval;
-}
-
-/* A list of extensions which designate executable files. These
- are NOT tested for the magic number. */
-static char executables[] = "|EXE|COM|BAT|BTM|DLL|VXD|";
-
-/* A list of extensions which belong to files known to NEVER be
- executables. These exist to minimize read()'ing files while
- detecting executables by magic number. You are welcome to
- add to this list, but remember: only extensions which could
- NEVER be present in executables should go here. */
-static char non_executables[] = "\
-|A|A01|A02|A03|A04|A05|ADL|ARC|ARJ|ASC|ASM|AUX|AWK\
-|BAS|BIB|BGI|BMP\
-|C|CC|CFG|CGZ|CH3|CHR|CI|CLP|CMF|CPI|CPP|CXX\
-|DAT|DBF|DIZ|DOC|DVI\
-|E|EL|ELC\
-|F77|FN3\
-|GIF|GZ\
-|H|HLP|HPP|HXX\
-|ICO|IN|INC|INF|INI\
-|JPG\
-|L|LEX|LF|LIB|LOG|LST|LZH\
-|M|MAK|MAP|MF|MID|MPG\
-|O|OBJ\
-|PAK|PAS|PBM|PCD|PCX|PDS|PIC|PIF|PN3|PRJ|PS\
-|RAS|RGB|RLE\
-|S|SND|SY3\
-|TAR|TAZ|TEX|TGA|TGZ|TIF|TXH|TXI|TXT\
-|VOC\
-|WAV|WK1|WK3|WKB|WQ1|WQ3|WQ4|WQ5|WQ6|WQ!\
-|XBM\
-|Y\
-|ZIP|ZOO|";
-
-int
-_is_executable(const char *filename, int fhandle, const char *extension)
-{
- if (!extension && filename)
- {
- const char *cp, *ep=0;
- for (cp=filename; *cp; cp++)
- {
- if (*cp == '.')
- ep = cp;
- if (*cp == '/' || *cp == '\\' || *cp == ':')
- ep = 0;
- }
- extension = ep;
- }
- if ((_djstat_flags & _STAT_EXEC_EXT) == 0
- && extension
- && *extension
- && strlen(extension) <= ((extension[0]=='.') ? 4 : 3))
- {
- /* Search the list of extensions in executables[]. */
- char tmp_buf[6], *tp = tmp_buf;
-
- *tp++ = '|';
- if (*extension == '.')
- extension++;
- while (*extension)
- *tp++ = toupper (*extension++);
- *tp++ = '|';
- *tp = '\0';
- if (strstr(non_executables, tmp_buf))
- return 0;
- else if (strstr(executables, tmp_buf))
- return 1;
- }
-
- /* No extension, or extension doesn't define execute
- bits unambiguously. We are in for some dirty work.
- Read the first two bytes of the file and see if they
- are any of the known magic numbers which designate
- executable files.
- Unix-like shells, which have executable shell scripts
- without extensions and DON'T have "#!" as their FIRST
- TWO CHARACTERS, lose here. Sorry, folks. */
- if ( (_djstat_flags & _STAT_EXEC_MAGIC) == 0 )
- {
- switch (_get_magic(filename, fhandle))
- {
- case 0x5a4d: /* "MZ" */
- case 0x010b:
- case 0x014c:
- case 0x2123: /* "#!" */
- return 1;
- }
- }
-
- return 0;
-}
-
diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp
index 97276d63ab..94cd997125 100644
--- a/msdos/sed2v2.inp
+++ b/msdos/sed2v2.inp
@@ -22,10 +22,6 @@
#include <sys/version.h>\
/* In DJGPP v2.x almost everything is already defined in a system header. */\
#include <sys/config.h>\
-/* For those who still use DJGPP v2.01 */\
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ == 1\
-#define NSIG 320\
-#endif
/^#undef MSDOS *$/c\
#ifndef MSDOS\
diff --git a/msdos/sigaction.c b/msdos/sigaction.c
deleted file mode 100644
index 44f7954fa2..0000000000
--- a/msdos/sigaction.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* sigaction.c
- *
- * Copyright (C) 1995 DJ Delorie
- *
- * (See the README file in this directory for the copyright and license
- * history of this file.)
- *
- * This file is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This file is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this file. If not, see <http://www.gnu.org/licenses/>.
- */
-#include <signal.h>
-#include <errno.h>
-
-int
-sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact)
-{
- int retval = 0;
-
- if (_oact)
- {
- void (*installed_sig)(int) = signal (_sig, SIG_IGN);
-
- /* FIXME */
- if (installed_sig == SIG_ERR)
- {
- retval = -1;
- errno = EINVAL;
- }
- else
- signal (_sig, installed_sig);
- _oact->sa_handler = installed_sig;
- retval = sigemptyset (&_oact->sa_mask);
- _oact->sa_flags = 0;
- }
- if (_act)
- {
- if (signal (_sig, _act->sa_handler) == SIG_ERR)
- {
- retval = -1;
- errno = EINVAL;
- }
- }
- return 0;
-}
-
-
-
diff --git a/src/ChangeLog b/src/ChangeLog
index b5831d811d..bc044923fe 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-09 Reuben Thomas <rrt@sc3d.org>
+
+ * msdos.c:
+ * dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
+
2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
* widgetprv.h (EmacsFramePart): Remove font.
diff --git a/src/dosfns.c b/src/dosfns.c
index e557dcba02..bdd296bf65 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -370,13 +370,6 @@ init_dosfns (void)
Don't OR it with the previous value, so the value recorded at dump
time, possibly with `preserve-case' flags set, won't get through. */
__opendir_flags = __OPENDIR_FIND_HIDDEN;
-
-#if __DJGPP_MINOR__ == 0
- /* Under LFN, preserve the case of files as recorded in the directory
- (in DJGPP 2.01 and later this is automagically done by the library). */
- if (!NILP (Fmsdos_long_file_names ()))
- __opendir_flags |= __OPENDIR_PRESERVE_CASE;
-#endif /* __DJGPP_MINOR__ == 0 */
}
#ifndef HAVE_X_WINDOWS
diff --git a/src/msdos.c b/src/msdos.c
index ccca371583..9fe078d074 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -4016,103 +4016,6 @@ unsetenv (const char *name)
#endif
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
-
-/* Augment DJGPP library POSIX signal functions. This is needed
- as of DJGPP v2.01, but might be in the library in later releases. */
-
-#include <libc/bss.h>
-
-/* A counter to know when to re-initialize the static sets. */
-static int sigprocmask_count = -1;
-
-/* Which signals are currently blocked (initially none). */
-static sigset_t current_mask;
-
-/* Which signals are pending (initially none). */
-static sigset_t msdos_pending_signals;
-
-/* Previous handlers to restore when the blocked signals are unblocked. */
-typedef void (*sighandler_t)(int);
-static sighandler_t prev_handlers[320];
-
-/* A signal handler which just records that a signal occurred
- (it will be raised later, if and when the signal is unblocked). */
-static void
-sig_suspender (int signo)
-{
- sigaddset (&msdos_pending_signals, signo);
-}
-
-int
-sigprocmask (int how, const sigset_t *new_set, sigset_t *old_set)
-{
- int signo;
- sigset_t new_mask;
-
- /* If called for the first time, initialize. */
- if (sigprocmask_count != __bss_count)
- {
- sigprocmask_count = __bss_count;
- sigemptyset (&msdos_pending_signals);
- sigemptyset (&current_mask);
- for (signo = 0; signo < 320; signo++)
- prev_handlers[signo] = SIG_ERR;
- }
-
- if (old_set)
- *old_set = current_mask;
-
- if (new_set == 0)
- return 0;
-
- if (how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK)
- {
- errno = EINVAL;
- return -1;
- }
-
- sigemptyset (&new_mask);
-
- /* DJGPP supports upto 320 signals. */
- for (signo = 0; signo < 320; signo++)
- {
- if (sigismember (&current_mask, signo))
- sigaddset (&new_mask, signo);
- else if (sigismember (new_set, signo) && how != SIG_UNBLOCK)
- {
- sigaddset (&new_mask, signo);
-
- /* SIGKILL is silently ignored, as on other platforms. */
- if (signo != SIGKILL && prev_handlers[signo] == SIG_ERR)
- prev_handlers[signo] = signal (signo, sig_suspender);
- }
- if (( how == SIG_UNBLOCK
- && sigismember (&new_mask, signo)
- && sigismember (new_set, signo))
- || (how == SIG_SETMASK
- && sigismember (&new_mask, signo)
- && !sigismember (new_set, signo)))
- {
- sigdelset (&new_mask, signo);
- if (prev_handlers[signo] != SIG_ERR)
- {
- signal (signo, prev_handlers[signo]);
- prev_handlers[signo] = SIG_ERR;
- }
- if (sigismember (&msdos_pending_signals, signo))
- {
- sigdelset (&msdos_pending_signals, signo);
- raise (signo);
- }
- }
- }
- current_mask = new_mask;
- return 0;
-}
-
-#endif /* not __DJGPP_MINOR__ < 2 */
-
#ifndef HAVE_SELECT
#include "sysselect.h"
@@ -4259,15 +4162,7 @@ msdos_abort (void)
dos_ttcooked ();
ScreenSetCursor (10, 0);
cputs ("\r\n\nEmacs aborted!\r\n");
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
- if (screen_virtual_segment)
- dosv_refresh_virtual_screen (2 * 10 * screen_size_X, 4 * screen_size_X);
- /* Generate traceback, so we could tell whodunit. */
- signal (SIGINT, SIG_DFL);
- __asm__ __volatile__ ("movb $0x1b,%al;call ___djgpp_hw_exception");
-#else /* __DJGPP_MINOR__ >= 2 */
raise (SIGABRT);
-#endif /* __DJGPP_MINOR__ >= 2 */
exit (2);
}