summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog46
-rw-r--r--djgpp/GNUmakefile.in3
-rw-r--r--djgpp/README.djgpp21
-rw-r--r--djgpp/config.hin114
-rw-r--r--djgpp/config.sed128
-rwxr-xr-xdjgpp/configure.bat20
-rw-r--r--djgpp/mkver.sed1
-rw-r--r--dln.c3
-rw-r--r--ext/Setup.dj33
-rw-r--r--ext/socket/socket.c2
-rw-r--r--file.c8
-rw-r--r--gc.c25
-rw-r--r--io.c7
-rw-r--r--lib/fileutils.rb2
-rw-r--r--lib/mkmf.rb4
-rw-r--r--process.c11
-rw-r--r--ruby.c5
-rw-r--r--signal.c6
-rw-r--r--test/fileutils/test_fileutils.rb4
-rw-r--r--test/ruby/test_env.rb2
-rw-r--r--test/ruby/test_path.rb8
-rw-r--r--util.c136
-rw-r--r--vm_core.h4
23 files changed, 67 insertions, 526 deletions
diff --git a/ChangeLog b/ChangeLog
index b21e7e5302..a08c7397e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,49 @@
+Sat Oct 4 22:14:15 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
+
+ * djgpp/README.djgpp: ditto.
+
+ * djgpp/config.hin: ditto.
+
+ * djgpp/config.sed: ditto.
+
+ * djgpp/configure.bat: ditto.
+
+ * djgpp/mkver.sed: ditto.
+
+ * ext/Setup.dj: ditto.
+
+ * dln.c: removed djgpp supports.
+
+ * file.c: ditto.
+
+ * gc.c: ditto.
+
+ * io.c: ditto.
+
+ * process.c: ditto.
+
+ * ruby.c: ditto.
+
+ * signal.c: ditto.
+
+ * util.c: ditto.
+
+ * vm_core.h: ditto.
+
+ * lib/fileutils.rb: ditto.
+
+ * lib/mkmf.rb: ditto.
+
+ * ext/socket/socket.c: ditto.
+
+ * test/fileutils/test_fileutils.rb: ditto.
+
+ * test/ruby/test_env.rb: ditto.
+
+ * test/ruby/test_path.rb: ditto.
+
Sat Oct 4 21:59:39 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* x68/_dtos18.c: removed. Ruby no longer supports human68k.
diff --git a/djgpp/GNUmakefile.in b/djgpp/GNUmakefile.in
deleted file mode 100644
index b11e7fdc35..0000000000
--- a/djgpp/GNUmakefile.in
+++ /dev/null
@@ -1,3 +0,0 @@
-include Makefile
-VPATH = $(srcdir) $(srcdir)/missing
-include uncommon.mk
diff --git a/djgpp/README.djgpp b/djgpp/README.djgpp
deleted file mode 100644
index f1f413a478..0000000000
--- a/djgpp/README.djgpp
+++ /dev/null
@@ -1,21 +0,0 @@
-* How to compile and install on djgpp
-
-This is what you need to do to compile and install Ruby:
-
- 1. Run configure.bat, which will generate config.h and Makefile
- (GNU sed required).
- Message like this is normal:
- sed.exe: can't read 123456789: No such file or directory (ENOENT)
-
- 2. Edit defines.h if you need. Probably this step will not need.
-
- 3. Remove comment mark(#) before the module names from ext/Setup.dj (or
- add module names if not present).
-
- 4. Run make.
-
- 5. Optionally, run 'make test' to check whether the compiled Ruby
- interpreter works well. If you see the message "test succeeded",
- your ruby works as it should (hopefully).
-
- 6. Run 'make install'
diff --git a/djgpp/config.hin b/djgpp/config.hin
deleted file mode 100644
index f90f2ed061..0000000000
--- a/djgpp/config.hin
+++ /dev/null
@@ -1,114 +0,0 @@
-
-#define PACKAGE_NAME ""
-#define PACKAGE_TARNAME ""
-#define PACKAGE_VERSION ""
-#define PACKAGE_STRING ""
-#define PACKAGE_BUGREPORT ""
-#define USE_BUILTIN_FRAME_ADDRESS 1
-#define STDC_HEADERS 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_LONG_LONG 1
-#define HAVE_OFF_T 1
-#define SIZEOF_INT 4
-#define SIZEOF_SHORT 2
-#define SIZEOF_LONG 4
-#define SIZEOF_LONG_LONG 8
-#define SIZEOF___INT64 0
-#define SIZEOF_OFF_T 4
-#define SIZEOF_VOIDP 4
-#define SIZEOF_FLOAT 4
-#define SIZEOF_DOUBLE 8
-#define HAVE_PROTOTYPES 1
-#define TOKEN_PASTE(x,y) x##y
-#define HAVE_STDARG_PROTOTYPES 1
-#define NORETURN(x) x __attribute__ ((noreturn))
-#define HAVE_DECL_SYS_NERR 1
-#define HAVE_DIRENT_H 1
-#define STDC_HEADERS 1
-#define HAVE_SYS_WAIT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_SYS_FILE_H 1
-#define HAVE_SYS_IOCTL_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_SYS_FCNTL_H 1
-#define HAVE_SYS_TIME_H 1
-#define HAVE_SYS_TIMES_H 1
-#define HAVE_SYS_PARAM_H 1
-#define HAVE_PWD_H 1
-#define HAVE_UTIME_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_DIRECT_H 1
-#define HAVE_SYS_RESOURCE_H 1
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-#define HAVE_ST_BLKSIZE 1
-#define HAVE_STRUCT_STAT_ST_RDEV 1
-#define HAVE_ST_RDEV 1
-#define GETGROUPS_T gid_t
-#define RETSIGTYPE void
-#define HAVE_ALLOCA 1
-#define HAVE_DUP2 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MKDIR 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_STRERROR 1
-#define HAVE_STRFTIME 1
-#define HAVE_STRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOUL 1
-#define HAVE_ISINF 1
-#define HAVE_ISNAN 1
-#define HAVE_FINITE 1
-#define HAVE_HYPOT 1
-#define HAVE_ACOSH 1
-#define HAVE_FMOD 1
-#define HAVE_WAITPID 1
-#define HAVE_FSYNC 1
-#define HAVE_TRUNCATE 1
-#define HAVE_CHSIZE 1
-#define HAVE_TIMES 1
-#define HAVE_UTIMES 1
-#define HAVE_FCNTL 1
-#define HAVE_SYMLINK 1
-#define HAVE_SETITIMER 1
-#define HAVE_PAUSE 1
-#define HAVE_GETPGRP 1
-#define HAVE_SETPGID 1
-#define HAVE_GETGROUPS 1
-#define HAVE_GETRLIMIT 1
-#define HAVE_SIGPROCMASK 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETSID 1
-#define HAVE_TELLDIR 1
-#define HAVE_SEEKDIR 1
-#define HAVE_MKTIME 1
-#define HAVE_COSH 1
-#define HAVE_SINH 1
-#define HAVE_TANH 1
-#define HAVE_STRUCT_TM_TM_ZONE 1
-#define HAVE_TM_ZONE 1
-#define HAVE_STRUCT_TM_TM_GMTOFF 1
-#define POSIX_SIGNAL 1
-#define GETPGRP_VOID 1
-#define SETPGRP_VOID 1
-#define RSHIFT(x,y) ((x)>>(int)y)
-#define FILE_COUNT _cnt
-#define FILE_READPTR _ptr
-#define NEED_IO_FLUSH_BETWEEN_RW 1
-#define DEFAULT_KCODE KCODE_NONE
-#define DLEXT ".so"
-#define RUBY_LIB "/lib/ruby/@MAJOR@.@MINOR@.@TEENY@"
-#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
-#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/@MAJOR@.@MINOR@.@TEENY@"
-#define RUBY_PLATFORM "i386-msdosdjgpp"
-#define RUBY_ARCHLIB "/lib/ruby/@MAJOR@.@MINOR@.@TEENY@/i386-msdosdjgpp"
-#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/@MAJOR@.@MINOR@.@TEENY@/i386-msdosdjgpp"
diff --git a/djgpp/config.sed b/djgpp/config.sed
deleted file mode 100644
index 1805789520..0000000000
--- a/djgpp/config.sed
+++ /dev/null
@@ -1,128 +0,0 @@
-/^SHELL/s,/bin/sh,$(COMSPEC),
-;s%/bin/rm%rm%
-;s%|| true%%
-;/\/dev\/null/ {
-;s,/dev/null 2>&1, nul,
-;s,2> /dev/null,,
-;}
-;/^config.status/ {
-; N;N;N;N;N;d
-;}
-:t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@srcdir@,.,g;t t
-s,@top_srcdir@,..,;t t
-s,@PATH_SEPARATOR@,:,;t t
-s,@PACKAGE_NAME@,,;t t
-s,@PACKAGE_TARNAME@,,;t t
-s,@PACKAGE_VERSION@,,;t t
-s,@PACKAGE_STRING@,,;t t
-s,@PACKAGE_BUGREPORT@,,;t t
-s,@exec_prefix@,${prefix},;t t
-s,@prefix@,/dev/env/DJDIR,;t t
-s%@program_transform_name@%s,^,,%;t t
-s,@bindir@,${exec_prefix}/bin,;t t
-s,@sbindir@,${exec_prefix}/sbin,;t t
-s,@libexecdir@,${exec_prefix}/libexec,;t t
-s,@datadir@,${prefix}/share,;t t
-s,@sysconfdir@,${prefix}/etc,;t t
-s,@sharedstatedir@,${prefix}/com,;t t
-s,@localstatedir@,${prefix}/var,;t t
-s,@libdir@,${exec_prefix}/lib,;t t
-s,@includedir@,${prefix}/include,;t t
-s,@oldincludedir@,/usr/include,;t t
-s,@infodir@,${prefix}/info,;t t
-s,@mandir@,${prefix}/man,;t t
-s,@build_alias@,i586-pc-msdosdjgpp,;t t
-s,@host_alias@,i586-pc-msdosdjgpp,;t t
-s,@target_alias@,i386-msdosdjgpp,;t t
-s,@DEFS@,,;t t
-s,@ECHO_C@,,;t t
-s,@ECHO_N@,-n,;t t
-s,@ECHO_T@,,;t t
-s,@LIBS@,-lm ,;t t
-s,@MAJOR@,1,;t t
-s,@MINOR@,7,;t t
-s,@TEENY@,3,;t t
-s,@build@,i586-pc-msdosdjgpp,;t t
-s,@build_cpu@,i586,;t t
-s,@build_vendor@,pc,;t t
-s,@build_os@,msdosdjgpp,;t t
-s,@host@,i586-pc-msdosdjgpp,;t t
-s,@host_cpu@,i586,;t t
-s,@host_vendor@,pc,;t t
-s,@host_os@,msdosdjgpp,;t t
-s,@target@,i386-pc-msdosdjgpp,;t t
-s,@target_cpu@,i386,;t t
-s,@target_vendor@,pc,;t t
-s,@target_os@,msdosdjgpp,;t t
-s,@CC@,gcc,;t t
-s,@ac_ct_CC@,,;t t
-s,@CFLAGS@,-Os,;t t
-s,@LDFLAGS@,,;t t
-s,@CPPFLAGS@,,;t t
-s,@EXEEXT@,.exe,;t t
-s,@OBJEXT@,o,;t t
-s,@CPP@,gcc -E,;t t
-s,@EGREP@,grep -E,;t t
-s,@GNU_LD@,yes,;t t
-s,@CPPOUTFILE@,-o conftest.i,;t t
-s,@OUTFLAG@,-o ,;t t
-s,@YACC@,bison -y,;t t
-s,@RANLIB@,ranlib,;t t
-s,@ac_ct_RANLIB@,,;t t
-s,@AR@,ar,;t t
-s,@ac_ct_AR@,,;t t
-s,@NM@,,;t t
-s,@ac_ct_NM@,,;t t
-s,@WINDRES@,,;t t
-s,@ac_ct_WINDRES@,,;t t
-s,@DLLWRAP@,,;t t
-s,@ac_ct_DLLWRAP@,,;t t
-s,@LN_S@,ln -s,;t t
-s,@SET_MAKE@,,;t t
-s,@LIBOBJS@,crypt.o flock.o vsnprintf.o,;t t
-s,@ALLOCA@,,;t t
-s,@XCFLAGS@,,;t t
-s,@XLDFLAGS@, -L.,;t t
-s,@DLDFLAGS@,,;t t
-s,@STATIC@,,;t t
-s,@CCDLFLAGS@,,;t t
-s,@LDSHARED@,ld,;t t
-s,@DLEXT@,so,;t t
-s,@DLEXT2@,,;t t
-s,@LIBEXT@,a,;t t
-s,@LINK_SO@,,;t t
-s,@LIBPATHFLAG@, -L%s,;t t
-s,@STRIP@,strip,;t t
-s,@EXTSTATIC@,,;t t
-s,@setup@,Setup.dj,;t t
-s,@MINIRUBY@,./miniruby,;t t
-s,@PREP@,,;t t
-s,@ARCHFILE@,,;t t
-s,@LIBRUBY_LDSHARED@,ld,;t t
-s,@LIBRUBY_DLDFLAGS@,,;t t
-s,@RUBY_INSTALL_NAME@,ruby,;t t
-s,@rubyw_install_name@,,;t t
-s,@RUBYW_INSTALL_NAME@,,;t t
-s,@RUBY_SO_NAME@,$(RUBY_INSTALL_NAME),;t t
-s,@LIBRUBY_A@,lib$(RUBY_INSTALL_NAME).a,;t t
-s,@LIBRUBY_SO@,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY),;t t
-s,@LIBRUBY_ALIASES@,lib$(RUBY_SO_NAME).so,;t t
-s,@LIBRUBY@,$(LIBRUBY_A),;t t
-s,@LIBRUBYARG@,-l$(RUBY_INSTALL_NAME),;t t
-s,@SOLIBS@,,;t t
-s,@DLDLIBS@,-lc,;t t
-s,@ENABLE_SHARED@,no,;t t
-s,@MAINLIBS@,,;t t
-s,@COMMON_LIBS@,,;t t
-s,@COMMON_MACROS@,,;t t
-s,@COMMON_HEADERS@,,;t t
-s,@EXPORT_PREFIX@,,;t t
-s,@MAKEFILES@,Makefile,;t t
-s,@arch@,i386-msdosdjgpp,;t t
-s,@sitearch@,i386-msdosdjgpp,;t t
-s,@sitedir@,${prefix}/lib/ruby/site_ruby,;t t
-s,@configure_args@,,;t t
-/^,THIS_IS_DUMMY_PATTERN_/i\
-ac_given_srcdir=.
diff --git a/djgpp/configure.bat b/djgpp/configure.bat
deleted file mode 100755
index e6a5d79d4a..0000000000
--- a/djgpp/configure.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-@echo off
-if exist configure.bat cd ..
-if exist djgpp\version.sed goto exist
- sed -n -f djgpp\mkver.sed < version.h > djgpp\version.sed
-:exist
-set _conv_=-f djgpp\config.sed -f djgpp\version.sed
-sed %_conv_% < Makefile.in > Makefile
-sed %_conv_% < djgpp\config.hin > config.h
-echo LFN check > 12345678
-sed -n /LFN/d 123456789 > nul
-if errorlevel 2 goto LFN
- copy missing\vsnprintf.c missing\vsnprint.c > nul
- copy djgpp\config.sed config.sta > nul
-goto end
-:LFN
- copy djgpp\config.sed config.status > nul
-:end
-set _conv_=
-del 12345678
-echo Now you must run a make.
diff --git a/djgpp/mkver.sed b/djgpp/mkver.sed
deleted file mode 100644
index f29b9ddd3e..0000000000
--- a/djgpp/mkver.sed
+++ /dev/null
@@ -1 +0,0 @@
-/RUBY_VERSION /s/^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/s,@MAJOR@,\1,;s,@MINOR@,\2,;s,@TEENY@,\3,/p
diff --git a/dln.c b/dln.c
index 24335dafda..8896d5f6b1 100644
--- a/dln.c
+++ b/dln.c
@@ -1715,9 +1715,6 @@ dln_find_1(const char *fname, const char *path, char *fbuf, int size,
static const char extension[][5] = {
#if defined(MSDOS)
".com", ".exe", ".bat",
-#if defined(DJGPP)
- ".btm", ".sh", ".ksh", ".pl", ".sed",
-#endif
#elif defined(__EMX__) || defined(_WIN32)
".exe", ".com", ".cmd", ".bat",
/* end of __EMX__ or _WIN32 */
diff --git a/ext/Setup.dj b/ext/Setup.dj
deleted file mode 100644
index 5276b125a1..0000000000
--- a/ext/Setup.dj
+++ /dev/null
@@ -1,33 +0,0 @@
-option nodynamic
-
-#Win32API
-bigdecimal
-curses
-dbm
-digest
-digest/md5
-digest/rmd160
-digest/sha1
-digest/sha2
-#dl
-etc
-enumerator
-fcntl
-gdbm
-#iconv
-#io/wait
-nkf
-#openssl
-#pty
-racc/cparse
-readline
-ripper
-sdbm
-#socket
-stringio
-strscan
-syck
-#syslog
-#tk
-#win32ole
-zlib
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index d1c4639530..efce2dba39 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -241,7 +241,7 @@ init_sock(VALUE sock, int fd)
MakeOpenFile(sock, fp);
fp->fd = fd;
fp->mode = FMODE_READWRITE|FMODE_DUPLEX;
-#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__EMX__)
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__EMX__)
fp->mode |= FMODE_BINMODE;
#endif
if (do_not_reverse_lookup) {
diff --git a/file.c b/file.c
index 1b4894d5cb..415c866eca 100644
--- a/file.c
+++ b/file.c
@@ -1989,7 +1989,7 @@ rb_file_chown(VALUE obj, VALUE owner, VALUE group)
o = NIL_P(owner) ? -1 : NUM2INT(owner);
g = NIL_P(group) ? -1 : NUM2INT(group);
GetOpenFile(obj, fptr);
-#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
+#if defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
if (NIL_P(fptr->pathv)) return Qnil;
if (chown(RSTRING_PTR(fptr->pathv), o, g) == -1)
rb_sys_fail_path(fptr->pathv);
@@ -2413,11 +2413,7 @@ rb_file_s_umask(int argc, VALUE *argv)
#endif
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
-# if defined(DJGPP)
-# define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
-# else
-# define CharNext(p) ((p) + 1)
-# endif
+# define CharNext(p) ((p) + 1)
#endif
#ifdef DOSISH_DRIVE_LETTER
diff --git a/gc.c b/gc.c
index a49ef70d16..ebfee1180f 100644
--- a/gc.c
+++ b/gc.c
@@ -1858,31 +1858,6 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
return 0;
}
-#ifdef __GNUC__
-#if defined(DJGPP)
-#undef rb_setjmp
-#undef rb_jmp_buf
-#if defined(DJGPP)
-typedef unsigned long rb_jmp_buf[6];
-__asm__ (".align 4\n\
-_rb_setjmp:\n\
- pushl %ebp\n\
- movl %esp,%ebp\n\
- movl 8(%ebp),%ebp\n\
- movl %eax,(%ebp)\n\
- movl %ebx,4(%ebp)\n\
- movl %ecx,8(%ebp)\n\
- movl %edx,12(%ebp)\n\
- movl %esi,16(%ebp)\n\
- movl %edi,20(%ebp)\n\
- popl %ebp\n\
- xorl %eax,%eax\n\
- ret");
-#endif
-int rb_setjmp (rb_jmp_buf);
-#endif /* DJGPP */
-#endif /* __GNUC__ */
-
#define GC_NOTIFY 0
void rb_vm_mark(void *ptr);
diff --git a/io.c b/io.c
index a72582e8c7..65470637e0 100644
--- a/io.c
+++ b/io.c
@@ -46,7 +46,7 @@
#endif
#include <sys/types.h>
-#if defined(HAVE_SYS_IOCTL_H) && !defined(DJGPP) && !defined(_WIN32)
+#if defined(HAVE_SYS_IOCTL_H) && !defined(_WIN32)
#include <sys/ioctl.h>
#endif
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
@@ -4195,9 +4195,6 @@ pipe_finalize(rb_io_t *fptr, int noraise)
}
fptr->fd = -1;
fptr->stdio_file = 0;
-#if defined DJGPP
- status <<= 8;
-#endif
rb_last_status_set(status, fptr->pid);
#else
fptr_finalize(fptr, noraise);
@@ -8418,7 +8415,7 @@ Init_IO(void)
rb_define_hooked_variable("$-i", &argf, opt_i_get, opt_i_set);
rb_define_hooked_variable("$*", &argf, argf_argv_getter, 0);
-#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__)
+#if defined (_WIN32) || defined(__CYGWIN__)
atexit(pipe_atexit);
#endif
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 83f1be82c5..1cdc7cff73 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -524,7 +524,7 @@ module FileUtils
OPT_TABLE['move'] = [:force, :noop, :verbose, :secure]
def rename_cannot_overwrite_file? #:nodoc:
- /djgpp|cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM
+ /cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM
end
private_module_function :rename_cannot_overwrite_file?
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 4de2836308..87a0cdf873 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -9,7 +9,7 @@ CONFIG = RbConfig::MAKEFILE_CONFIG
ORIG_LIBPATH = ENV['LIB']
CXX_EXT = %w[cc cxx cpp]
-if /mswin|bccwin|mingw|msdosdjgpp|os2/ !~ CONFIG['build_os']
+if /mswin|bccwin|mingw|os2/ !~ CONFIG['build_os']
CXX_EXT.concat(%w[C])
end
SRC_EXT = %w[c m] << CXX_EXT
@@ -1299,7 +1299,7 @@ def configuration(srcdir)
if CONFIG['target_os'] != 'cygwin'
vpath = vpath.map {|p| p.sub(/.*/, '$(shell cygpath -u \&)')}
end
- when 'msdosdjgpp', 'mingw32'
+ when 'mingw32'
CONFIG['PATH_SEPARATOR'] = ';'
end
end
diff --git a/process.c b/process.c
index b0c3250b6a..c2dfb61c37 100644
--- a/process.c
+++ b/process.c
@@ -28,9 +28,6 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef __DJGPP__
-#include <process.h>
-#endif
#include <time.h>
#include <ctype.h>
@@ -1004,12 +1001,12 @@ proc_exec_v(char **argv, const char *prog)
return -1;
}
-#if (defined(MSDOS) && !defined(DJGPP)) || defined(__EMX__) || defined(OS2)
+#if defined(MSDOS) || defined(__EMX__) || defined(OS2)
{
#if defined(__EMX__) || defined(OS2) /* OS/2 emx */
#define COMMAND "cmd.exe"
#endif
-#if (defined(MSDOS) && !defined(DJGPP))
+#if defined(MSDOS)
#define COMMAND "command.com"
#endif
char *extension;
@@ -2667,11 +2664,7 @@ rb_spawn_internal(int argc, VALUE *argv, int default_close_others)
# else
if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
status = system(StringValuePtr(prog));
-# if defined(__DJGPP__)
- rb_last_status_set(status == -1 ? 127 : status, 0);
-# else
rb_last_status_set((status & 0xff) << 8, 0);
-# endif
# endif
rb_run_exec_options(&sarg, NULL);
diff --git a/ruby.c b/ruby.c
index db2bd60087..462d45a2b9 100644
--- a/ruby.c
+++ b/ruby.c
@@ -186,7 +186,7 @@ translate_char(char *p, int from, int to)
}
#endif
-#if defined _WIN32 || defined __CYGWIN__ || defined __DJGPP__
+#if defined _WIN32 || defined __CYGWIN__
static VALUE
rubylib_mangled_path(const char *s, unsigned int l)
{
@@ -356,9 +356,6 @@ ruby_init_loadpath(void)
#if defined _WIN32 || defined __CYGWIN__
GetModuleFileName(libruby, libpath, sizeof libpath);
-#elif defined(DJGPP)
- extern char *__dos_argv0;
- strncpy(libpath, __dos_argv0, sizeof(libpath) - 1);
#elif defined(__EMX__)
_execname(libpath, sizeof(libpath) - 1);
#endif
diff --git a/signal.c b/signal.c
index 139a6f6518..a2bd3f5d48 100644
--- a/signal.c
+++ b/signal.c
@@ -44,11 +44,7 @@ typedef int rb_atomic_t;
#endif
#ifndef NSIG
-# ifdef DJGPP
-# define NSIG SIGMAX
-# else
-# define NSIG (_SIGMAX + 1) /* For QNX */
-# endif
+# define NSIG (_SIGMAX + 1) /* For QNX */
#endif
static const struct signals {
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 495a6273b2..83768805e1 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -16,11 +16,11 @@ Dir.mkdir tmproot unless File.directory?(tmproot)
Dir.chdir tmproot
def have_drive_letter?
- /djgpp|mswin(?!ce)|mingw|bcc|emx/ =~ RUBY_PLATFORM
+ /mswin(?!ce)|mingw|bcc|emx/ =~ RUBY_PLATFORM
end
def have_file_perm?
- /djgpp|mswin|mingw|bcc|wince|emx/ !~ RUBY_PLATFORM
+ /mswin|mingw|bcc|wince|emx/ !~ RUBY_PLATFORM
end
$fileutils_rb_have_symlink = nil
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index dd1ad806bf..65fd79fa8f 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -1,7 +1,7 @@
require 'test/unit'
class TestEnv < Test::Unit::TestCase
- IGNORE_CASE = /djgpp|bccwin|mswin|mingw/ =~ RUBY_PLATFORM
+ IGNORE_CASE = /bccwin|mswin|mingw/ =~ RUBY_PLATFORM
PATH_ENV = "PATH"
def setup
diff --git a/test/ruby/test_path.rb b/test/ruby/test_path.rb
index edb5459194..0489e7fe8c 100644
--- a/test/ruby/test_path.rb
+++ b/test/ruby/test_path.rb
@@ -45,7 +45,7 @@ class TestPath < Test::Unit::TestCase
end
def test_dirname
- if /(bcc|ms)win\d|mingw|cygwin|djgpp|emx/ =~ RUBY_PLATFORM
+ if /(bcc|ms)win\d|mingw|cygwin|emx/ =~ RUBY_PLATFORM
# DOSISH_DRIVE_LETTER
assert_equal('C:.', File.dirname('C:'))
assert_equal('C:.', File.dirname('C:a'))
@@ -101,7 +101,7 @@ class TestPath < Test::Unit::TestCase
assert_equal('/', File.dirname('/a/'))
assert_equal('/a', File.dirname('/a/b'))
- if /(bcc|ms|cyg)win|mingw|djgpp|emx/ =~ RUBY_PLATFORM
+ if /(bcc|ms|cyg)win|mingw|emx/ =~ RUBY_PLATFORM
# DOSISH_UNC
assert_equal('//', File.dirname('//'))
assert_equal('//a', File.dirname('//a'))
@@ -135,7 +135,7 @@ class TestPath < Test::Unit::TestCase
end
def test_basename
- if /(bcc|ms)win\d|mingw|cygwin|djgpp|emx/ =~ RUBY_PLATFORM
+ if /(bcc|ms)win\d|mingw|cygwin|emx/ =~ RUBY_PLATFORM
# DOSISH_DRIVE_LETTER
assert_equal('', File.basename('C:'))
assert_equal('a', File.basename('C:a'))
@@ -189,7 +189,7 @@ class TestPath < Test::Unit::TestCase
assert_equal('a', File.basename('/a/'))
assert_equal('b', File.basename('/a/b'))
- if /(bcc|ms|cyg)win|mingw|djgpp|emx/ =~ RUBY_PLATFORM
+ if /(bcc|ms|cyg)win|mingw|emx/ =~ RUBY_PLATFORM
# DOSISH_UNC
assert_equal('/', File.basename('//'))
assert_equal('/', File.basename('//a'))
diff --git a/util.c b/util.c
index 24841d6bef..95e2c0bfe8 100644
--- a/util.c
+++ b/util.c
@@ -283,15 +283,11 @@ ruby_add_suffix(VALUE str, const char *suffix)
rb_fatal("Cannot do inplace edit on long filename (%ld characters)",
RSTRING_LEN(str));
-#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32)
+#if defined(__CYGWIN32__) || defined(_WIN32)
/* Style 0 */
slen = RSTRING_LEN(str);
rb_str_cat(str, suffix, extlen);
-#if defined(DJGPP)
- if (_USE_LFN) return;
-#else
if (valid_filename(RSTRING_PTR(str))) return;
-#endif
/* Fooey, style 0 failed. Fix str before continuing. */
rb_str_resize(str, slen);
@@ -363,136 +359,6 @@ valid_filename(const char *s)
#endif
#endif
-#if defined __DJGPP__
-
-#include <dpmi.h>
-
-static char dbcs_table[256];
-
-int
-make_dbcs_table()
-{
- __dpmi_regs r;
- struct {
- unsigned char start;
- unsigned char end;
- } vec;
- int offset;
-
- memset(&r, 0, sizeof(r));
- r.x.ax = 0x6300;
- __dpmi_int(0x21, &r);
- offset = r.x.ds * 16 + r.x.si;
-
- for (;;) {
- int i;
- dosmemget(offset, sizeof vec, &vec);
- if (!vec.start && !vec.end)
- break;
- for (i = vec.start; i <= vec.end; i++)
- dbcs_table[i] = 1;
- offset += 2;
- }
-}
-
-int
-mblen(const char *s, size_t n)
-{
- static int need_init = 1;
- if (need_init) {
- make_dbcs_table();
- need_init = 0;
- }
- if (s) {
- if (n == 0 || *s == 0)
- return 0;
- else if (!s[1])
- return 1;
- return dbcs_table[(unsigned char)*s] + 1;
- }
- else
- return 1;
-}
-
-struct PathList {
- struct PathList *next;
- char *path;
-};
-
-struct PathInfo {
- struct PathList *head;
- int count;
-};
-
-static int
-push_element(const char *path, VALUE vinfo)
-{
- struct PathList *p;
- struct PathInfo *info = (struct PathInfo *)vinfo;
-
- p = ALLOC(struct PathList);
- MEMZERO(p, struct PathList, 1);
- p->path = ruby_strdup(path);
- p->next = info->head;
- info->head = p;
- info->count++;
-
- return 0;
-}
-
-#include <dirent.h>
-int __opendir_flags = __OPENDIR_PRESERVE_CASE;
-
-char **
-__crt0_glob_function(char *path)
-{
- int len = strlen(path);
- int i;
- char **rv;
- char path_buffer[PATH_MAX];
- char *buf = path_buffer;
- char *p;
- struct PathInfo info;
- struct PathList *plist;
-
- if (PATH_MAX <= len)
- buf = ruby_xmalloc(len + 1);
-
- strncpy(buf, path, len);
- buf[len] = '\0';
-
- for (p = buf; *p; p += mblen(p, RUBY_MBCHAR_MAXSIZE))
- if (*p == '\\')
- *p = '/';
-
- info.count = 0;
- info.head = 0;
-
- ruby_glob(buf, 0, push_element, (VALUE)&info);
-
- if (buf != path_buffer)
- ruby_xfree(buf);
-
- if (info.count == 0)
- return 0;
-
- rv = ruby_xmalloc((info.count + 1) * sizeof (char *));
-
- plist = info.head;
- i = 0;
- while (plist) {
- struct PathList *cur;
- rv[i] = plist->path;
- cur = plist;
- plist = plist->next;
- ruby_xfree(cur);
- i++;
- }
- rv[i] = 0;
- return rv;
-}
-
-#endif
/* mm.c */
diff --git a/vm_core.h b/vm_core.h
index a071f83cab..5975a72c1b 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -35,9 +35,7 @@
#include <signal.h>
#ifndef NSIG
-# ifdef DJGPP
-# define NSIG SIGMAX
-# elif defined MACOS_UNUSE_SIGNAL
+# if defined MACOS_UNUSE_SIGNAL
# define NSIG 1
# else
# define NSIG (_SIGMAX + 1) /* For QNX */