summaryrefslogtreecommitdiff
path: root/msdos
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 /msdos
parent5742859f273b82e7dbadf7e9f581fd5d364dc05a (diff)
Remove support for DJGPP < 2.02
This also removes some specially-licensed files and lots of accompanying explanation.
Diffstat (limited to 'msdos')
-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
6 files changed, 23 insertions, 449 deletions
diff --git a/msdos/ChangeLog b/msdos/ChangeLog
index f1d6c322bc2..709e68fc849 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 de950b89def..1521a5078a4 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 1cc424735fd..07be34a5e26 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 16b01c59a0b..00000000000
--- 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 97276d63aba..94cd997125f 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 44f7954fa20..00000000000
--- 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;
-}
-
-
-