changeset 107733:84b961690802

Remove support for DJGPP v1.x (bug#5813). src/: w16select.c (__dpmi_int): Remove DJGPP v1.x compatibility. s/msdos.h: unexec.c (make_hdr, copy_text_and_data): sysdep.c (wait_for_termination, sys_subshell): msdos.c (dos_set_window_size, msdos_set_cursor_shape) (IT_set_terminal_modes): (__write, _rename, gethostname, gettimeofday, alarm, fork, kill) (dos_ttraw, dos_ttcooked, run_msdos_command, abort): Remove DJGPP v1.x code and tests of the value of __DJGPP__. (nice, pause, sigsetmask, sigblock): Remove DJGPP v1.x compatibility code. lread.c: gmalloc.c (memalign): fileio.c (Fcopy_file, check_executable, Ffile_modes): emacs.c (main): dosfns.c (init_dosfns): dired.c (file_name_completion_stat): Remove tests of __DJGPP__. msdos/: sed3.inp: sed2.inp: sed1.inp: mainmake: Files removed.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 01 Apr 2010 17:59:46 +0300
parents dc45468b3140
children 32691d6c973c
files msdos/ChangeLog msdos/mainmake msdos/sed1.inp msdos/sed2.inp msdos/sed3.inp src/ChangeLog src/dired.c src/dosfns.c src/emacs.c src/fileio.c src/gmalloc.c src/lread.c src/msdos.c src/s/msdos.h src/sysdep.c src/unexec.c src/w16select.c
diffstat 17 files changed, 37 insertions(+), 856 deletions(-) [+]
line wrap: on
line diff
--- a/msdos/ChangeLog	Thu Apr 01 15:37:28 2010 +0300
+++ b/msdos/ChangeLog	Thu Apr 01 17:59:46 2010 +0300
@@ -1,3 +1,12 @@
+2010-04-01  Eli Zaretskii  <eliz@gnu.org>
+
+	Remove support for DJGPP v1.x.
+
+	* sed3.inp:
+	* sed2.inp:
+	* sed1.inp:
+	* mainmake: Files removed.
+
 2010-03-27  Eli Zaretskii  <eliz@gnu.org>
 
 	* sedlisp.inp (VPATH): Don't edit, no longer needed.
--- a/msdos/mainmake	Thu Apr 01 15:37:28 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-# Copyright (C) 1993, 1994, 1995, 1996, 2001, 2002, 2003, 2004,
-#   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-# This file is part of GNU Emacs.
-
-# GNU Emacs 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.
-
-# GNU Emacs 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 GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-# make all	to compile and build Emacs.
-# make install	to install it.
-# make TAGS	to update tags tables.
-#
-# make clean  or  make mostlyclean
-#      Delete all files from the current directory that are normally
-#      created by building the program.	 Don't delete the files that
-#      record the configuration.  Also preserve files that could be made
-#      by building, but normally aren't because the distribution comes
-#      with them.
-#
-#      Delete `.dvi' files here if they are not part of the distribution.
-#
-# make distclean
-#      Delete all files from the current directory that are created by
-#      configuring or building the program.  If you have unpacked the
-#      source and built the program without creating any other files,
-#      `make distclean' should leave only the files that were in the
-#      distribution.
-#
-# make realclean
-#      Delete everything from the current directory that can be
-#      reconstructed with this Makefile.  This typically includes
-#      everything deleted by distclean, plus more: C source files
-#      produced by Bison, tags tables, info files, and so on.
-#
-# make extraclean
-#      Still more severe - delete backup and autosave files, too.
-
-all:	lib-src src
-
-lib-src: FRC
-	cd lib-src
-	$(MAKE)
-	cd ..
-
-src: FRC
-	cd src
-	$(MAKE)
-	cd ..
-
-install: all
-	-md bin
-	cd lib-src
-	coff2exe hexl
-	coff2exe etags
-	coff2exe ctags
-	coff2exe b2m
-	mv -f hexl.exe etags.exe ctags.exe b2m.exe ../bin/
-	cd ..
-	cd src
-	coff2exe emacs
-	stubedit emacs.exe minstack=512k
-	mv -f emacs.exe ../bin/
-	cd ..
-
-FRC:
-
-TAGS tags:	lib-src
-	cd src
-	go32 ../lib-src/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
-	cd ..
-
-check:
-	@echo "We don't have any tests for GNU Emacs yet."
-
-clean:
-	cd lib-src
-	$(MAKE) clean
-	cd ..
-	cd src
-	$(MAKE) clean
-	cd ..
-	cd oldxmenu
-	-$(MAKE) clean
-	cd ..
-
-# arch-tag: d5a489bc-818e-4c3c-8040-b5205ed0602f
--- a/msdos/sed1.inp	Thu Apr 01 15:37:28 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-# -sed1.inp-------------------------------------------------------------
-# Configuration script for src/makefile
-# ----------------------------------------------------------------------
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-#   2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
-#
-# This file is part of GNU Emacs.
-#
-# This file is free software; as a special exception, the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program 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.
-#
-# ----------------------------------------------------------------------
-# In case src/Makefile needs to rebuild `make-doc.exe' (might happen under
-# Windows 95), make sure it gets built with commands that DOS
-# understands (one command per line).
-s/^#.*//
-s/^[ \f\t][ \f\t]*$//
-s/^ /	/
-s/\.h\.in/.h-in/
-s!^	\./temacs!	go32 temacs!
-s!/bin/sh!command.com!
-/^MAKE *=/s/^/# /
-/^SHELL *=/s/^/# /
-/^srcdir *=/s/@[^@\n]*@/./
-/^VPATH *=/s/@[^@\n]*@/./
-/^CC *=/s/@[^@\n]*@/gcc/
-/^CPP *=/s/@[^@\n]*@/gcc -e/
-/^CFLAGS *=/s/@[^@\n]*@/-O2 -g/
-/^LIBS *=/s/@[^@\n]*@//
-/^LIBOBJS *=/s/@[^@\n]*@//
-/^LN_S *=/s/@[^@\n]*@/ln -s/
-/^M_FILE *=/s!@[^@\n]*@!m/intel386.h!
-/^S_FILE *=/s!@[^@\n]*@!s/msdos.h!
-/^@SET_MAKE@$/s/@SET_MAKE@//
-/^.\${libsrc}make-docfile.*>/s!make-docfile!make-doc.exe -o ../etc/DOC!
-/^.\${libsrc}make-doc/s!>.*$!!
-/^\${libsrc}make-docfile:/c\
-${libsrc}make-doc.exe:\
-	cd ..\
-	cd lib-src\
-	$(MAKE) ${MFLAGS} make-docfile -W make-docfile.c\
-	cd ..\
-	cd src
-/^	cd \${libsrc}; \${MAKE} \${MFLAGS} make-docfile/d
-/\${libsrc}make-docfile/s/-docfile[ 	]/-doc.exe /
-/^[ 	]*$/d
-/^temacs:/s/prefix-args//
-/^temacs:/s/stamp-oldxmenu//
-/^	#/d
-
-# arch-tag: 246725c1-79de-4d03-a080-8f19329fa35e
--- a/msdos/sed2.inp	Thu Apr 01 15:37:28 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-# -sed2.inp-------------------------------------------------------------
-# Configuration script for src/config.h
-# ----------------------------------------------------------------------
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
-#   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
-#
-# This file is part of GNU Emacs.
-#
-# This file is free software; as a special exception, the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program 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.
-#
-# ----------------------------------------------------------------------
-/^#undef LISP_FLOAT_TYPE *$/s/undef/define/
-/^#undef GNU_MALLOC *$/s/undef/define/
-/^#undef REL_ALLOC *$/s/undef/define/
-/^#undef HAVE_SYS_SELECT/i\
-/^#undef STDC_HEADERS *$/s/undef/define/
-/^#undef HAVE_SYS_TIMEB_H *$/s/undef/define/
-/^#undef HAVE_SYS_TIME_H *$/s/undef/define/
-# /^#undef HAVE_UNISTD_H *$/s/undef/define/
-/^#undef HAVE_GETTIMEOFDAY *$/s/undef/define/
-/^#undef HAVE_GETHOSTNAME *$/s/undef/define/
-/^#undef HAVE_DUP2 *$/s/undef/define/
-/^#undef HAVE_TM_ZONE *$/s/undef/define/
-/^#undef LOCALTIME_CACHE *$/s/undef/define/
-/^#undef HAVE_TZSET *$/s/undef/define/
-/^#undef TM_IN_SYS_TIME *$/s/undef/define/
-/^#undef TIME_WITH_SYS_TIME *$/s/undef/define/
-/^#undef HAVE_RENAME *$/s/undef/define/
-/^#undef HAVE_CLOSEDIR *$/s/undef/define/
-/^#undef HAVE_RANDOM *$/s/undef/define/
-/^#undef HAVE_MKDIR *$/s/undef/define/
-/^#undef HAVE_RMDIR *$/s/undef/define/
-/^#undef HAVE_BCMP *$/s/undef/define/
-/^#undef HAVE_BCOPY *$/s/undef/define/
-/^#undef HAVE_FREXP *$/s/undef/define/
-/^#undef HAVE_FTIME *$/s/undef/define/
-/^#undef HAVE_MKTIME *$/s/undef/define/
-/^#undef HAVE_STRERROR *$/s/undef/define/
-/^#undef HAVE_TIMEVAL *$/s/undef/define/
-s/^#define USER_FULL_NAME .*$/#define USER_FULL_NAME (getenv ("NAME"))/
-s/^#undef STACK_DIRECTION *$/#define STACK_DIRECTION -1/
-s/^#undef EMACS_CONFIGURATION *$/#define EMACS_CONFIGURATION "i386-pc-msdosdjgpp"/
-s/^#undef EMACS_CONFIG_OPTIONS *$/#define EMACS_CONFIG_OPTIONS "-"/
-s!^#undef config_opsysfile *$!#define config_opsysfile "s/msdos.h"!
-s!^#undef config_machfile *$!#define config_machfile "m/intel386.h"!
-s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/
-s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/
-
-# arch-tag: 31840234-109a-41ab-a675-7a3844978299
--- a/msdos/sed3.inp	Thu Apr 01 15:37:28 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-# -sed3.inp-------------------------------------------------------------
-# Configuration script for lib-src/makefile
-# ----------------------------------------------------------------------
-#
-# Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004,
-#   2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
-#
-# This file is part of GNU Emacs.
-#
-# This file is free software; as a special exception, the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program 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.
-#
-# ----------------------------------------------------------------------
-/^# DIST: /d
-/^SHELL *=/s/^/# /
-/^CC *=/s/=.*$/=gcc/
-# Actually, here we should patch in the exact version number, but only
-# [ce]tags uses it.  Don't pass it.  This is more update-resistant.
-/-DVERSION=/s/-DVERSION="\\"\${version}\\""//
-/^configname *=/s/=.*$/=msdos/
-/^archlibdir *=/s!=.*$!=/emacs/bin!
-/^bindir *=/s!=.*$!=/emacs/bin!
-/^libdir *=/s!=.*$!=/emacs/bin!
-/^srcdir *=/s!=.*$!=.!
-/^VPATH *=/s!=.*$!=.!
-/^KRB4LIB *=/s/@[^@\n]*@//g
-/^DESLIB *=/s/@[^@\n]*@//g
-/^KRB5LIB *=/s/@[^@\n]*@//g
-/^CRYPTOLIB *=/s/@[^@\n]*@//g
-/^COM_ERRLIB *=/s/@[^@\n]*@//g
-/^LIBHESIOD *=/s/@[^@\n]*@//g
-/^LIBRESOLV *=/s/@[^@\n]*@//g
-/^LIBS_MAIL *=/s/@[^@\n]*@//g
-/^CFLAGS *=/s!=.*$!=-O2 -g!
-/^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS!
-/^LOADLIBES *=/s!=.*$!=!
-/^ALLOCA *=/s!=.*$!=alloca.o!
-/^INSTALLABLES/s/emacsclient *//
-s!^	\./!	go32 ./!
-/^UTILITIES=/s/ wakeup//
-/^UTILITIES=/s/ movemail//
-/^UTILITIES=/s/ emacsserver//
-/^UTILITIES=/s/ timer//
-/^all *:/s/$/ make-docfile/
-s!^	go32 ./test-distrib!	go32 ./test-dis!
-/-o make-docfile/a\
-	coff2exe make-docfile
-
-# arch-tag: cac6f5c7-3dbf-4e84-9d0c-44f0126f0ea8
--- a/src/ChangeLog	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/ChangeLog	Thu Apr 01 17:59:46 2010 +0300
@@ -1,5 +1,26 @@
 2010-04-01  Eli Zaretskii  <eliz@gnu.org>
 
+	Remove support for DJGPP v1.x (bug#5813).
+
+	* w16select.c (__dpmi_int): Remove DJGPP v1.x compatibility.
+	* s/msdos.h: 
+	* unexec.c (make_hdr, copy_text_and_data): 
+	* sysdep.c (wait_for_termination, sys_subshell): 
+	* msdos.c (dos_set_window_size, msdos_set_cursor_shape)
+	(IT_set_terminal_modes): 
+	(__write, _rename, gethostname, gettimeofday, alarm, fork, kill)
+	(dos_ttraw, dos_ttcooked, run_msdos_command, abort): Remove DJGPP
+	v1.x code and tests of the value of __DJGPP__.
+	(nice, pause, sigsetmask, sigblock): Remove DJGPP v1.x
+	compatibility code.
+
+	* lread.c: 
+	* gmalloc.c (memalign): 
+	* fileio.c (Fcopy_file, check_executable, Ffile_modes): 
+	* emacs.c (main): 
+	* dosfns.c (init_dosfns): 
+	* dired.c (file_name_completion_stat): Remove tests of __DJGPP__.
+
 	* xdisp.c (set_cursor_from_row): Fix cursor positioning when the
 	string with `cursor' property comes from an `after-string'
 	overlay.  (Bug#5816)
--- a/src/dired.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/dired.c	Thu Apr 01 17:59:46 2010 +0300
@@ -859,7 +859,6 @@
   char *fullname = (char *) alloca (len + pos + 2);
 
 #ifdef MSDOS
-#if __DJGPP__ > 1
   /* Some fields of struct stat are *very* expensive to compute on MS-DOS,
      but aren't required here.  Avoid computing the following fields:
      st_inode, st_size and st_nlink for directories, and the execute bits
@@ -868,7 +867,6 @@
   unsigned short save_djstat_flags = _djstat_flags;
 
   _djstat_flags = _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
-#endif /* __DJGPP__ > 1 */
 #endif /* MSDOS */
 
   bcopy (SDATA (dirname), fullname, pos);
@@ -888,9 +886,7 @@
 #else
   value = stat (fullname, st_addr);
 #ifdef MSDOS
-#if __DJGPP__ > 1
   _djstat_flags = save_djstat_flags;
-#endif /* __DJGPP__ > 1 */
 #endif /* MSDOS */
   return value;
 #endif /* S_IFLNK */
--- a/src/dosfns.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/dosfns.c	Thu Apr 01 17:59:46 2010 +0300
@@ -48,10 +48,6 @@
 #include <grp.h>
 #include <crt0.h>
 
-#ifndef __DJGPP_MINOR__
-# define __tb _go32_info_block.linear_address_of_transfer_buffer;
-#endif
-
 DEFUN ("int86", Fint86, Sint86, 2, 2, 0,
        doc: /* Call specific MS-DOS interrupt number INTERRUPT with REGISTERS.
 Return the updated REGISTER vector.
@@ -385,8 +381,6 @@
     }
 #endif /* !HAVE_X_WINDOWS */
 
-#if __DJGPP__ >= 2
-
   /* Without this, we never see hidden files.
      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.  */
@@ -398,7 +392,6 @@
   if (!NILP (Fmsdos_long_file_names ()))
     __opendir_flags |= __OPENDIR_PRESERVE_CASE;
 #endif /* __DJGPP_MINOR__ == 0 */
-#endif /* __DJGPP__ >= 2 */
 }
 
 #ifndef HAVE_X_WINDOWS
--- a/src/emacs.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/emacs.c	Thu Apr 01 17:59:46 2010 +0300
@@ -945,7 +945,6 @@
 #endif /* MSDOS || WINDOWSNT */
 
 #ifdef MSDOS
-#if __DJGPP__ >= 2
   if (!isatty (fileno (stdin)))
     setmode (fileno (stdin), O_BINARY);
   if (!isatty (fileno (stdout)))
@@ -953,11 +952,6 @@
       fflush (stdout);
       setmode (fileno (stdout), O_BINARY);
     }
-#else  /* not __DJGPP__ >= 2 */
-  (stdin)->_flag &= ~_IOTEXT;
-  (stdout)->_flag &= ~_IOTEXT;
-  (stderr)->_flag &= ~_IOTEXT;
-#endif /* not __DJGPP__ >= 2 */
 #endif /* MSDOS */
 
 #ifdef SET_EMACS_PRIORITY
--- a/src/fileio.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/fileio.c	Thu Apr 01 17:59:46 2010 +0300
@@ -79,11 +79,9 @@
 #ifdef MSDOS
 #include "msdos.h"
 #include <sys/param.h>
-#if __DJGPP__ >= 2
 #include <fcntl.h>
 #include <string.h>
 #endif
-#endif
 
 #ifdef DOS_NT
 #define CORRECT_DIR_SEPS(s) \
@@ -2012,7 +2010,6 @@
      copyable by us. */
   input_file_statable_p = (fstat (ifd, &st) >= 0);
 
-#if !defined (MSDOS) || __DJGPP__ > 1
   if (out_st.st_mode != 0
       && st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino)
     {
@@ -2020,7 +2017,6 @@
       report_file_error ("Input and output files are the same",
 			 Fcons (file, Fcons (newname, Qnil)));
     }
-#endif
 
 #if defined (S_ISREG) && defined (S_ISLNK)
   if (input_file_statable_p)
@@ -2091,7 +2087,7 @@
 
   emacs_close (ifd);
 
-#if defined (__DJGPP__) && __DJGPP__ > 1
+#ifdef MSDOS
   if (input_file_statable_p)
     {
       /* In DJGPP v2.0 and later, fstat usually returns true file mode bits,
@@ -2101,7 +2097,7 @@
       if ((_djstat_flags & _STFAIL_WRITEBIT) == 0)
 	chmod (SDATA (encoded_newname), st.st_mode & 07777);
     }
-#endif /* DJGPP version 2 or newer */
+#endif /* MSDOS */
 #endif /* not WINDOWSNT */
 
   /* Discard the unwind protects.  */
@@ -2477,16 +2473,7 @@
   struct stat st;
   if (stat (filename, &st) < 0)
     return 0;
-#if defined (WINDOWSNT) || (defined (MSDOS) && __DJGPP__ > 1)
   return ((st.st_mode & S_IEXEC) != 0);
-#else
-  return (S_ISREG (st.st_mode)
-	  && len >= 5
-	  && (xstrcasecmp ((suffix = filename + len-4), ".com") == 0
-	      || xstrcasecmp (suffix, ".exe") == 0
-	      || xstrcasecmp (suffix, ".bat") == 0)
-	  || (st.st_mode & S_IFMT) == S_IFDIR);
-#endif /* not WINDOWSNT */
 #else /* not DOS_NT */
 #ifdef HAVE_EUIDACCESS
   return (euidaccess (filename, 1) >= 0);
@@ -2885,10 +2872,6 @@
 
   if (stat (SDATA (absname), &st) < 0)
     return Qnil;
-#if defined (MSDOS) && __DJGPP__ < 2
-  if (check_executable (SDATA (absname)))
-    st.st_mode |= S_IEXEC;
-#endif /* MSDOS && __DJGPP__ < 2 */
 
   return make_number (st.st_mode & 07777);
 }
--- a/src/gmalloc.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/gmalloc.c	Thu Apr 01 17:59:46 2010 +0300
@@ -122,7 +122,7 @@
 extern void free PP ((__ptr_t __ptr));
 
 /* Allocate SIZE bytes allocated to ALIGNMENT bytes.  */
-#if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict.  */
+#if !defined (_MALLOC_INTERNAL) || defined (MSDOS) /* Avoid conflict.  */
 extern __ptr_t memalign PP ((__malloc_size_t __alignment,
 			     __malloc_size_t __size));
 extern int posix_memalign PP ((__ptr_t *, __malloc_size_t,
@@ -1763,13 +1763,6 @@
 #include <malloc.h>
 #endif
 
-#if __DJGPP__ - 0 == 1
-
-/* There is some problem with memalign in DJGPP v1 and we are supposed
-   to omit it.  Noone told me why, they just told me to do it.  */
-
-#else
-
 __ptr_t (*__memalign_hook) PP ((__malloc_size_t __size,
 				__malloc_size_t __alignment));
 
@@ -1878,7 +1871,6 @@
   return 0;
 }
 
-#endif /* Not DJGPP v1 */
 /* Allocate memory on a page boundary.
    Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
 
--- a/src/lread.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/lread.c	Thu Apr 01 17:59:46 2010 +0300
@@ -41,9 +41,6 @@
 #include "blockinput.h"
 
 #ifdef MSDOS
-#if __DJGPP__ < 2
-#include <unistd.h>	/* to get X_OK */
-#endif
 #include "msdos.h"
 #endif
 
--- a/src/msdos.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/msdos.c	Thu Apr 01 17:59:46 2010 +0300
@@ -39,7 +39,6 @@
 #include <sys/stat.h>    /* for _fixpath */
 #include <unistd.h>	 /* for chdir, dup, dup2, etc. */
 #include <dir.h>	 /* for getdisk */
-#if __DJGPP__ >= 2
 #pragma pack(0)		 /* dir.h does a pack(4), which isn't GCC's default */
 #include <fcntl.h>
 #include <io.h>		 /* for setmode */
@@ -47,7 +46,6 @@
 #include <sys/farptr.h>	 /* for _farsetsel, _farnspokeb */
 #include <libc/dosio.h>  /* for _USE_LFN */
 #include <conio.h>	 /* for cputs */
-#endif
 
 #include "msdos.h"
 #include "systime.h"
@@ -81,8 +79,6 @@
 #define _dos_ds _go32_info_block.selector_for_linear_memory
 #endif
 
-#if __DJGPP__ > 1
-
 #include <signal.h>
 #include "syssignal.h"
 
@@ -104,7 +100,6 @@
 #endif /* GNU_MALLOC */
 
 #endif /* not SYSTEM_MALLOC */
-#endif /* __DJGPP__ > 1 */
 
 static unsigned long
 event_timestamp ()
@@ -427,7 +422,6 @@
    colors for newly-created frames.  */
 static int initial_screen_colors[2];
 
-#if __DJGPP__ > 1
 /* Update the screen from a part of relocated DOS/V screen buffer which
    begins at OFFSET and includes COUNT characters.  */
 static void
@@ -444,7 +438,6 @@
   regs.x.cx = count;
   __dpmi_int (0x10, &regs);
 }
-#endif
 
 static void
 dos_direct_output (y, x, buf, len)
@@ -456,67 +449,12 @@
   int t = t0 + (int) ScreenPrimary;
   int l0 = len;
 
-#if (__DJGPP__ < 2)
-  while (--len >= 0) {
-    dosmemput (buf++, 1, t);
-    t += 2;
-  }
-#else
   /* This is faster.  */
   for (_farsetsel (_dos_ds); --len >= 0; t += 2, buf++)
     _farnspokeb (t, *buf);
 
   if (screen_virtual_segment)
     dosv_refresh_virtual_screen (t0, l0);
-#endif
-}
-#endif
-
-/* Flash the screen as a substitute for BEEPs.  */
-
-#if (__DJGPP__ < 2)
-static void
-do_visible_bell (xorattr)
-     unsigned char xorattr;
-{
-  asm volatile
-    ("  movb   $1,%%dl				\n\
-visible_bell_0:					\n\
-	movl   _ScreenPrimary,%%eax		\n\
-	call   dosmemsetup			\n\
-	movl   %%eax,%%ebx			\n\
-	movl   %1,%%ecx				\n\
-	movb   %0,%%al				\n\
-	incl   %%ebx				\n\
-visible_bell_1:					\n\
-	xorb   %%al,%%gs:(%%ebx)		\n\
-	addl   $2,%%ebx				\n\
-	decl   %%ecx				\n\
-	jne    visible_bell_1			\n\
-	decb   %%dl				\n\
-	jne    visible_bell_3			\n\
-visible_bell_2:					\n\
-	movzwl %%ax,%%eax			\n\
-        movzwl %%ax,%%eax			\n\
-	movzwl %%ax,%%eax			\n\
-	movzwl %%ax,%%eax			\n\
-	decw   %%cx				\n\
-	jne    visible_bell_2			\n\
-	jmp    visible_bell_0                   \n\
-visible_bell_3:"
-     : /* no output */
-     : "m" (xorattr), "g" (screen_size)
-     : "%eax", "%ebx", /* "%gs",*/ "%ecx", "%edx");
-}
-
-static void
-ScreenVisualBell (void)
-{
-  /* This creates an xor-mask that will swap the default fore- and
-     background colors.  */
-  do_visible_bell (((FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ())
-		     ^ FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()))
-		    * 0x11) & 0x7f);
 }
 #endif
 
@@ -611,9 +549,6 @@
 
   /* Find one of the dimensions supported by standard EGA/VGA
      which gives us at least the required dimensions.  */
-
-#if __DJGPP__ > 1
-
   else
     {
       static struct {
@@ -642,41 +577,6 @@
 	}
     }
 
-#else /* not __DJGPP__ > 1 */
-
-  else if (*rows <= 25)
-    {
-      if (current_rows != 25 || current_cols != 80)
-	{
-	  regs.x.ax = 3;
-	  int86 (0x10, &regs, &regs);
-	  regs.x.ax = 0x1101;
-	  regs.h.bl = 0;
-	  int86 (0x10, &regs, &regs);
-	  regs.x.ax = 0x1200;
-	  regs.h.bl = 32;
-	  int86 (0x10, &regs, &regs);
-	  regs.x.ax = 3;
-	  int86 (0x10, &regs, &regs);
-	}
-    }
-  else if (*rows <= 50)
-    if (have_vga && (current_rows != 50 || current_cols != 80)
-	|| *rows <= 43 && (current_rows != 43 || current_cols != 80))
-      {
-	regs.x.ax = 3;
-	int86 (0x10, &regs, &regs);
-	regs.x.ax = 0x1112;
-	regs.h.bl = 0;
-	int86 (0x10, &regs, &regs);
-	regs.x.ax = 0x1200;
-	regs.h.bl = 32;
-	int86 (0x10, &regs, &regs);
-	regs.x.ax = 0x0100;
-	regs.x.cx = 7;
-	int86 (0x10, &regs, &regs);
-      }
-#endif /* not __DJGPP__ > 1 */
 
   if (have_mouse)
     {
@@ -693,7 +593,6 @@
   screen_size_Y = *rows;
   screen_size = *cols * *rows;
 
-#if __DJGPP__ > 1
   /* If the dimensions changed, the mouse highlight info is invalid.  */
   if (current_rows != *rows || current_cols != *cols)
     {
@@ -708,7 +607,6 @@
 	  dpyinfo->mouse_face_window = Qnil;
 	}
     }
-#endif
 
   /* Enable bright background colors.  */
   bright_bg ();
@@ -747,7 +645,6 @@
 static void
 msdos_set_cursor_shape (struct frame *f, int start_line, int width)
 {
-#if __DJGPP__ > 1
   unsigned desired_cursor;
   __dpmi_regs regs;
   int max_line, top_line, bot_line;
@@ -824,7 +721,6 @@
   regs.h.ah = 1;
   regs.x.cx = desired_cursor;
   __dpmi_int (0x10, &regs);
-#endif /* __DJGPP__ > 1 */
 }
 
 static void
@@ -2041,7 +1937,6 @@
   startup_screen_size_Y = screen_size_Y;
   startup_screen_attrib = ScreenAttrib;
 
-#if __DJGPP__ > 1
   /* Is DOS/V (or any other RSIS software which relocates
      the screen) installed?  */
   {
@@ -2072,7 +1967,6 @@
 	ScreenPrimary = (screen_virtual_segment << 4) + screen_virtual_offset;
       }
   }
-#endif /* __DJGPP__ > 1 */
 
   ScreenGetCursor (&startup_pos_Y, &startup_pos_X);
   ScreenRetrieve (startup_screen_buffer = xmalloc (screen_size * 2));
@@ -4068,195 +3962,6 @@
   return np - startp;
 }
 
-#if defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 0
-
-/* In DJGPP v2.0, library `write' can call `malloc', which might
-   cause relocation of the buffer whose address we get in ADDR.
-   Here is a version of `write' that avoids calling `malloc',
-   to serve us until such time as the library is fixed.
-   Actually, what we define here is called `__write', because
-   `write' is a stub that just jmp's to `__write' (to be
-   POSIXLY-correct with respect to the global name-space).  */
-
-#include <io.h>		      /* for _write */
-#include <libc/dosio.h>       /* for __file_handle_modes[] */
-
-static char xbuf[64 * 1024];  /* DOS cannot write more in one chunk */
-
-#define XBUF_END (xbuf + sizeof (xbuf) - 1)
-
-int
-__write (int handle, const void *buffer, size_t count)
-{
-  if (count == 0)
-    return 0;
-
-  if(__file_handle_modes[handle] & O_BINARY)
-    return _write (handle, buffer, count);
-  else
-    {
-      char *xbp = xbuf;
-      const char *bp = buffer;
-      int total_written = 0;
-      int nmoved = 0, ncr = 0;
-
-      while (count)
-	{
-	  /* The next test makes sure there's space for at least 2 more
-	     characters in xbuf[], so both CR and LF can be put there.  */
-	  if (xbp < XBUF_END)
-	    {
-	      if (*bp == '\n')
-		{
-		  ncr++;
-		  *xbp++ = '\r';
-		}
-	      *xbp++ = *bp++;
-	      nmoved++;
-	      count--;
-	    }
-	  if (xbp >= XBUF_END || !count)
-	    {
-	      size_t to_write = nmoved + ncr;
-	      int written = _write (handle, xbuf, to_write);
-
-	      if (written == -1)
-		return -1;
-	      else
-		total_written += nmoved;  /* CRs aren't counted in ret value */
-
-	      /* If some, but not all were written (disk full?), return
-		 an estimate of the total written bytes not counting CRs.  */
-	      if (written < to_write)
-		return total_written - (to_write - written) * nmoved/to_write;
-
-	      nmoved = 0;
-	      ncr = 0;
-	      xbp = xbuf;
-	    }
-	}
-      return total_written;
-    }
-}
-
-/* A low-level file-renaming function which works around Windows 95 bug.
-   This is pulled directly out of DJGPP v2.01 library sources, and only
-   used when you compile with DJGPP v2.0.  */
-
-#include <io.h>
-
-int _rename(const char *old, const char *new)
-{
-  __dpmi_regs r;
-  int olen    = strlen(old) + 1;
-  int i;
-  int use_lfn = _USE_LFN;
-  char tempfile[FILENAME_MAX];
-  const char *orig = old;
-  int lfn_fd = -1;
-
-  r.x.dx = __tb_offset;
-  r.x.di = __tb_offset + olen;
-  r.x.ds = r.x.es = __tb_segment;
-
-  if (use_lfn)
-    {
-      /* Windows 95 bug: for some filenames, when you rename
-	 file -> file~ (as in Emacs, to leave a backup), the
-	 short 8+3 alias doesn't change, which effectively
-	 makes OLD and NEW the same file.  We must rename
-	 through a temporary file to work around this.  */
-
-      char *pbase = 0, *p;
-      static char try_char[] = "abcdefghijklmnopqrstuvwxyz012345789";
-      int idx = sizeof(try_char) - 1;
-
-      /* Generate a temporary name.  Can't use `tmpnam', since $TMPDIR
-	 might point to another drive, which will fail the DOS call.  */
-      strcpy(tempfile, old);
-      for (p = tempfile; *p; p++) /* ensure temporary is on the same drive */
-	if (*p == '/' || *p == '\\' || *p == ':')
-	  pbase = p;
-      if (pbase)
-	pbase++;
-      else
-	pbase = tempfile;
-      strcpy(pbase, "X$$djren$$.$$temp$$");
-
-      do
-	{
-	  if (idx <= 0)
-	    return -1;
-	  *pbase = try_char[--idx];
-	} while (_chmod(tempfile, 0) != -1);
-
-      r.x.ax = 0x7156;
-      _put_path2(tempfile, olen);
-      _put_path(old);
-      __dpmi_int(0x21, &r);
-      if (r.x.flags & 1)
-	{
-	  errno = __doserr_to_errno(r.x.ax);
-	  return -1;
-	}
-
-      /* Now create a file with the original name.  This will
-	 ensure that NEW will always have a 8+3 alias
-	 different from that of OLD.  (Seems to be required
-	 when NameNumericTail in the Registry is set to 0.)  */
-      lfn_fd = _creat(old, 0);
-
-      olen = strlen(tempfile) + 1;
-      old  = tempfile;
-      r.x.di = __tb_offset + olen;
-    }
-
-  for (i=0; i<2; i++)
-    {
-      if(use_lfn)
-	r.x.ax = 0x7156;
-      else
-	r.h.ah = 0x56;
-      _put_path2(new, olen);
-      _put_path(old);
-      __dpmi_int(0x21, &r);
-      if(r.x.flags & 1)
-	{
-	  if (r.x.ax == 5 && i == 0) /* access denied */
-	    remove(new);		 /* and try again */
-	  else
-	    {
-	      errno = __doserr_to_errno(r.x.ax);
-
-	      /* Restore to original name if we renamed it to temporary.  */
-	      if (use_lfn)
-		{
-		  if (lfn_fd != -1)
-		    {
-		      _close (lfn_fd);
-		      remove (orig);
-		    }
-		  _put_path2(orig, olen);
-		  _put_path(tempfile);
-		  r.x.ax = 0x7156;
-		  __dpmi_int(0x21, &r);
-		}
-	      return -1;
-	    }
-	}
-      else
-	break;
-    }
-
-  /* Success.  Delete the file possibly created to work
-     around the Windows 95 bug.  */
-  if (lfn_fd != -1)
-    return (_close (lfn_fd) == 0) ? remove (orig) : -1;
-  return 0;
-}
-
-#endif /* __DJGPP__ == 2 && __DJGPP_MINOR__ == 0 */
-
 DEFUN ("msdos-long-file-names", Fmsdos_long_file_names, Smsdos_long_file_names,
        0, 0, 0,
        doc: /* Return non-nil if long file names are supported on MS-DOS.  */)
@@ -4502,39 +4207,6 @@
 static int break_stat;	 /* BREAK check mode status.	*/
 static int stdin_stat;	 /* stdin IOCTL status.		*/
 
-#if __DJGPP__ < 2
-
-/* These must be global.  */
-static _go32_dpmi_seginfo ctrl_break_vector;
-static _go32_dpmi_registers ctrl_break_regs;
-static int ctrlbreakinstalled = 0;
-
-/* Interrupt level detection of Ctrl-Break.  Don't do anything fancy here!  */
-
-void
-ctrl_break_func (regs)
-     _go32_dpmi_registers *regs;
-{
-  Vquit_flag = Qt;
-}
-
-void
-install_ctrl_break_check ()
-{
-  if (!ctrlbreakinstalled)
-    {
-      /* Don't press Ctrl-Break if you don't have either DPMI or Emacs
-	 was compiler with Djgpp 1.11 maintenance level 5 or later!  */
-      ctrlbreakinstalled = 1;
-      ctrl_break_vector.pm_offset = (int) ctrl_break_func;
-      _go32_dpmi_allocate_real_mode_callback_iret (&ctrl_break_vector,
-						   &ctrl_break_regs);
-      _go32_dpmi_set_real_mode_interrupt_vector (0x1b, &ctrl_break_vector);
-    }
-}
-
-#endif /* __DJGPP__ < 2 */
-
 /* Turn off Dos' Ctrl-C checking and inhibit interpretation of
    control chars by DOS.   Determine the keyboard type.  */
 
@@ -4551,9 +4223,6 @@
 
   break_stat = getcbrk ();
   setcbrk (0);
-#if __DJGPP__ < 2
-  install_ctrl_break_check ();
-#endif
 
   if (first_time)
     {
@@ -4585,42 +4254,18 @@
 	    mouse_button_count = outregs.x.bx;
 
 #ifndef HAVE_X_WINDOWS
-#if __DJGPP__ >= 2
 	  /* Save the cursor shape used outside Emacs.  */
 	  outside_cursor = _farpeekw (_dos_ds, 0x460);
 #endif
-#endif
 	}
 
       first_time = 0;
 
-#if __DJGPP__ >= 2
-
       stdin_stat = setmode (fileno (stdin), O_BINARY);
       return (stdin_stat != -1);
     }
   else
     return (setmode (fileno (stdin), O_BINARY) != -1);
-
-#else /* __DJGPP__ < 2 */
-
-    }
-
-  /* I think it is wrong to overwrite `stdin_stat' every time
-     but the first one this function is called, but I don't
-     want to change the way it used to work in v1.x.--EZ  */
-
-  inregs.x.ax = 0x4400;		/* Get IOCTL status. */
-  inregs.x.bx = 0x00;		/* 0 = stdin. */
-  intdos (&inregs, &outregs);
-  stdin_stat = outregs.h.dl;
-
-  inregs.x.dx = stdin_stat | 0x0020; /* raw mode */
-  inregs.x.ax = 0x4401;		/* Set IOCTL status */
-  intdos (&inregs, &outregs);
-  return !outregs.x.cflag;
-
-#endif /* __DJGPP__ < 2 */
 }
 
 /*  Restore status of standard input and Ctrl-C checking.  */
@@ -4633,8 +4278,6 @@
   setcbrk (break_stat);
   mouse_off ();
 
-#if __DJGPP__ >= 2
-
 #ifndef HAVE_X_WINDOWS
   /* Restore the cursor shape we found on startup.  */
   if (outside_cursor)
@@ -4646,16 +4289,6 @@
 #endif
 
   return (setmode (fileno (stdin), stdin_stat) != -1);
-
-#else  /* not __DJGPP__ >= 2 */
-
-  inregs.x.ax = 0x4401;	/* Set IOCTL status.	*/
-  inregs.x.bx = 0x00;	/* 0 = stdin.		*/
-  inregs.x.dx = stdin_stat;
-  intdos (&inregs, &outregs);
-  return !outregs.x.cflag;
-
-#endif /* not __DJGPP__ >= 2 */
 }
 
 
@@ -4735,8 +4368,6 @@
   dup2 (tempout, 1);
   dup2 (temperr, 2);
 
-#if __DJGPP__ > 1
-
   if (msshell && !argv[3])
     {
       /* MS-DOS native shells are too restrictive.  For starters, they
@@ -4777,10 +4408,7 @@
 	result = 0;	/* emulate Unixy shell behavior with empty cmd line */
     }
   else
-
-#endif /* __DJGPP__ > 1 */
-
-  result = spawnve (P_WAIT, argv[0], argv, envv);
+    result = spawnve (P_WAIT, argv[0], argv, envv);
 
   dup2 (inbak, 0);
   dup2 (outbak, 1);
@@ -4822,88 +4450,7 @@
   exit (1);
 }
 
-#if __DJGPP__ < 2
-
-/* ------------------------- Compatibility functions -------------------
- *	gethostname
- *	gettimeofday
- */
-
-/* Hostnames for a pc are not really funny,
-   but they are used in change log so we emulate the best we can.  */
-
-gethostname (p, size)
-     char *p;
-     int size;
-{
-  char *q = egetenv ("HOSTNAME");
-
-  if (!q) q = "pc";
-  strcpy (p, q);
-  return 0;
-}
-
-/* When time zones are set from Ms-Dos too many C-libraries are playing
-   tricks with time values.  We solve this by defining our own version
-   of `gettimeofday' bypassing GO32.  Our version needs to be initialized
-   once and after each call to `tzset' with TZ changed.  That is
-   accomplished by aliasing tzset to init_gettimeofday. */
-
-static struct tm time_rec;
-
-int
-gettimeofday (struct timeval *tp, struct timezone *tzp)
-{
-  if (tp)
-    {
-      struct time t;
-      struct tm tm;
-
-      gettime (&t);
-      if (t.ti_hour < time_rec.tm_hour) /* midnight wrap */
-	{
-	  struct date d;
-	  getdate (&d);
-	  time_rec.tm_year = d.da_year - 1900;
-	  time_rec.tm_mon = d.da_mon - 1;
-	  time_rec.tm_mday = d.da_day;
-	}
-
-      time_rec.tm_hour = t.ti_hour;
-      time_rec.tm_min = t.ti_min;
-      time_rec.tm_sec = t.ti_sec;
-
-      tm = time_rec;
-      tm.tm_gmtoff = dos_timezone_offset;
-
-      tp->tv_sec = mktime (&tm);	/* may modify tm */
-      tp->tv_usec = t.ti_hund * (1000000 / 100);
-    }
-  /* Ignore tzp; it's obsolescent.  */
-  return 0;
-}
-
-#endif /* __DJGPP__ < 2 */
-
-/*
- * A list of unimplemented functions that we silently ignore.
- */
-
-#if __DJGPP__ < 2
-unsigned alarm (s) unsigned s; {}
-fork () { return 0; }
-int kill (x, y) int x, y; { return -1; }
-nice (p) int p; {}
-void volatile pause () {}
-sigsetmask (x) int x; { return 0; }
-sigblock (mask) int mask; { return 0; }
-#endif
-
-setpgrp () {return 0; }
-setpriority (x,y,z) int x,y,z; { return 0; }
-
-#if __DJGPP__ > 1
-#if __DJGPP_MINOR__ < 2
+#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
 
 #ifdef POSIX_SIGNALS
 
@@ -5011,7 +4558,6 @@
 
 #endif /* not POSIX_SIGNALS */
 #endif /* not __DJGPP_MINOR__ < 2 */
-#endif /* __DJGPP__ > 1 */
 
 #ifndef HAVE_SELECT
 #include "sysselect.h"
@@ -5194,7 +4740,6 @@
   dos_ttcooked ();
   ScreenSetCursor (10, 0);
   cputs ("\r\n\nEmacs aborted!\r\n");
-#if __DJGPP__ > 1
 #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
   if (screen_virtual_segment)
     dosv_refresh_virtual_screen (2 * 10 * screen_size_X, 4 * screen_size_X);
@@ -5204,7 +4749,6 @@
 #else  /* __DJGPP_MINOR__ >= 2 */
   raise (SIGABRT);
 #endif /* __DJGPP_MINOR__ >= 2 */
-#endif
   exit (2);
 }
 #endif
--- a/src/s/msdos.h	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/s/msdos.h	Thu Apr 01 17:59:46 2010 +0300
@@ -30,11 +30,7 @@
 #define MSDOS
 #endif
 
-#ifdef __GO32__
 #ifndef __DJGPP__
-#define __DJGPP__ 1	/* V2 defines __DJGPP__ == 2 */
-#endif
-#else
 You lose; /* Emacs for DOS must be compiled with DJGPP */
 #endif
 
@@ -97,34 +93,11 @@
 #define _setjmp setjmp
 #define _longjmp longjmp
 
-#if __DJGPP__ < 2
-
-/* New chdir () routine.
-   DJGPP v2.0 and later doesn't need it because its chdir() does
-   set the drive itself. */
-#ifdef chdir
-#undef chdir
-#endif
-#define chdir sys_chdir
-
-#define LIBS_SYSTEM -lpc  /* isn't required in DJGPP v2.0, either */
-
-#endif /* __DJGPP__ < 2 */
-
-#if __DJGPP__ > 1
-
 #define DATA_START  (&etext + 1)
 #define TEXT_START  &start
 
 #define _NAIVE_DOS_REGS
 
-#else /* not __DJGPP__ > 1 */
-
-/* This somehow needs to be defined even though we use COFF.  */
-#define TEXT_START -1
-
-#endif /* not __DJGPP__ > 1 */
-
 #define ORDINARY_LINK
 
 /* command.com does not understand `...` so we define this.  */
@@ -133,19 +106,6 @@
 
 #define NULL_DEVICE "nul"
 
-#if __DJGPP__ < 2
-#define O_RDONLY        0x0001
-#define O_WRONLY        0x0002
-#define O_RDWR          0x0004
-#define O_CREAT         0x0100
-#define O_TRUNC         0x0200
-#define O_EXCL          0x0400
-#define O_APPEND        0x0800
-#define O_TEXT          0x4000
-#define O_BINARY        0x8000
-#define NO_MATHERR
-#endif
-
 #define HAVE_INVERSE_HYPERBOLIC
 #define FLOAT_CHECK_DOMAIN
 
@@ -166,12 +126,6 @@
 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
 
-/* Call init_gettimeofday when TZ changes.  */
-#if __DJGPP__ < 2
-#define LOCALTIME_CACHE
-#define tzset init_gettimeofday
-#endif
-
 /* bcopy under djgpp is quite safe */
 #define GAP_USE_BCOPY
 #define BCOPY_UPWARD_SAFE 1
@@ -181,9 +135,7 @@
 #define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B")
 
 /* Do we have POSIX signals?  */
-#if __DJGPP__ > 1
 #define POSIX_SIGNALS
-#endif
 
 /* We have (the code to control) a mouse.  */
 #define HAVE_MOUSE
--- a/src/sysdep.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/sysdep.c	Thu Apr 01 17:59:46 2010 +0300
@@ -90,11 +90,9 @@
 #include "msdos.h"
 #include <sys/param.h>
 
-#if __DJGPP__ > 1
 extern int etext;
 extern unsigned start __asm__ ("start");
 #endif
-#endif
 
 #ifndef USE_CRT_DLL
 #ifndef errno
@@ -462,13 +460,7 @@
 #endif /* not POSIX_SIGNALS */
 #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */
 #else /* not subprocesses */
-#if __DJGPP__ > 1
       break;
-#else /* not __DJGPP__ > 1 */
-      if (kill (pid, 0) < 0)
-	break;
-      wait (0);
-#endif /* not __DJGPP__ > 1*/
 #endif /* not subprocesses */
     }
 }
@@ -672,10 +664,8 @@
 
 #ifdef DOS_NT
   pid = 0;
-#if __DJGPP__ > 1
   save_signal_handlers (saved_handlers);
   synch_process_alive = 1;
-#endif /* __DJGPP__ > 1 */
 #else
   pid = vfork ();
   if (pid == -1)
@@ -747,7 +737,7 @@
     }
 
   /* Do this now if we did not do it before.  */
-#if !defined (MSDOS) || __DJGPP__ == 1
+#ifndef MSDOS
   save_signal_handlers (saved_handlers);
   synch_process_alive = 1;
 #endif
--- a/src/unexec.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/unexec.c	Thu Apr 01 17:59:46 2010 +0300
@@ -131,11 +131,9 @@
 #ifdef HAVE_COFF_H
 #include <coff.h>
 #ifdef MSDOS
-#if __DJGPP__ > 1
 #include <fcntl.h>  /* for O_RDONLY, O_RDWR */
 #include <crt0.h>   /* for _crt0_startup_flags and its bits */
 static int save_djgpp_startup_flags;
-#endif /* __DJGPP__ > 1 */
 #define filehdr external_filehdr
 #define scnhdr external_scnhdr
 #define syment external_syment
@@ -310,7 +308,6 @@
   if (a_out >= 0)
     {
 #ifdef MSDOS
-#if __DJGPP__ > 1
       /* Support the coff-go32-exe format with a prepended stub, since
 	 this is what GCC 2.8.0 and later generates by default in DJGPP.  */
       unsigned short mz_header[3];
@@ -328,7 +325,6 @@
 	}
       else
 	lseek (a_out, 0L, 0);
-#endif /* __DJGPP__ > 1 */
 #endif /* MSDOS */
       if (read (a_out, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr))
 	{
@@ -532,7 +528,6 @@
   register char *ptr;
 
 #ifdef MSDOS
-#if __DJGPP__ >= 2
   /* Dump the original table of exception handlers, not the one
      where our exception hooks are registered.  */
   __djgpp_exception_toggle ();
@@ -542,7 +537,6 @@
   save_djgpp_startup_flags = _crt0_startup_flags;
   _crt0_startup_flags &= ~(_CRT0_FLAG_NO_LFN | _CRT0_FLAG_NEARPTR);
 #endif
-#endif
 
   lseek (new, (long) text_scnptr, 0);
   ptr = (char *) f_ohdr.text_start;
@@ -555,14 +549,12 @@
   write_segment (new, ptr, end);
 
 #ifdef MSDOS
-#if __DJGPP__ >= 2
   /* Restore our exception hooks.  */
   __djgpp_exception_toggle ();
 
   /* Restore the startup flags.  */
   _crt0_startup_flags = save_djgpp_startup_flags;
 #endif
-#endif
 
 
   return 0;
--- a/src/w16select.c	Thu Apr 01 15:37:28 2010 +0300
+++ b/src/w16select.c	Thu Apr 01 17:59:46 2010 +0300
@@ -23,7 +23,7 @@
    menus, and the Windows clipboard.  */
 
 /* Written by Dale P. Smith <dpsm@en.com>  */
-/* Adapted to DJGPP v1 by Eli Zaretskii <eliz@is.elta.co.il>  */
+/* Adapted to DJGPP by Eli Zaretskii <eliz@gnu.org>  */
 
 #ifdef MSDOS
 
@@ -94,25 +94,6 @@
 /* The size of allocated storage for storing the clipboard data.  */
 static size_t clipboard_storage_size;
 
-/* Emulation of `__dpmi_int' and friends for DJGPP v1.x  */
-
-#if __DJGPP__ < 2
-
-typedef _go32_dpmi_registers __dpmi_regs;
-#define __tb      _go32_info_block.linear_address_of_transfer_buffer
-#define _dos_ds	  _go32_info_block.selector_for_linear_memory
-
-static int
-__dpmi_int (intno, regs)
-     int intno;
-     __dpmi_regs *regs;
-{
-  regs->x.ss = regs->x.sp = regs->x.flags = 0;
-  return _go32_dpmi_simulate_int (intno, regs);
-}
-
-#endif /* __DJGPP__ < 2 */
-
 /* C functions to access the Windows 3.1x clipboard from DOS apps.
 
    The information was obtained from the Microsoft Knowledge Base,