summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-18 01:18:34 (GMT)
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-18 01:18:34 (GMT)
commit4ad2057f27e1b03870d2ebcab7f7dbfca4b368ef (patch)
tree4d2f5aef23ff2a14eba5a2c43ad0f7deac0b2e70
parent6803c4e2a8e48e8f2f855015e4933a9947913b92 (diff)
* ChangeLog: Good-bye OS/2.
* common.mk: ditto. * configure.in: ditto. * dln_find.c: ditto. * ext/Setup.emx: ditto. * ext/extmk.rb: ditto. * ext/socket/extconf.rb: ditto. * ext/zlib/extconf.rb: ditto. * file.c: ditto. * include/ruby/defines.h: ditto. * io.c: ditto. * lib/mkmf.rb: ditto. * missing/os2.c: ditto. * process.c: ditto. * ruby.c: ditto. * NEWS: announce OS/2 is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog19
-rw-r--r--NEWS1
-rw-r--r--common.mk2
-rw-r--r--configure.in16
-rw-r--r--dln_find.c2
-rw-r--r--ext/Setup.emx31
-rwxr-xr-xext/extmk.rb1
-rw-r--r--ext/socket/extconf.rb3
-rw-r--r--ext/zlib/extconf.rb3
-rw-r--r--file.c2
-rw-r--r--include/ruby/defines.h4
-rw-r--r--io.c5
-rw-r--r--lib/mkmf.rb1
-rw-r--r--missing/os2.c138
-rw-r--r--process.c43
-rw-r--r--ruby.c2
16 files changed, 27 insertions, 246 deletions
diff --git a/ChangeLog b/ChangeLog
index 10b9fa2..018adfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Sun Oct 18 10:01:40 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * ChangeLog: Good-bye OS/2.
+ * common.mk: ditto.
+ * configure.in: ditto.
+ * dln_find.c: ditto.
+ * ext/Setup.emx: ditto.
+ * ext/extmk.rb: ditto.
+ * ext/socket/extconf.rb: ditto.
+ * ext/zlib/extconf.rb: ditto.
+ * file.c: ditto.
+ * include/ruby/defines.h: ditto.
+ * io.c: ditto.
+ * lib/mkmf.rb: ditto.
+ * missing/os2.c: ditto.
+ * process.c: ditto.
+ * ruby.c: ditto.
+ * NEWS: announce OS/2 is no longer supported.
+
Sun Oct 18 08:50:15 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* include/ruby/defines.h (DOSISH): add comments.
diff --git a/NEWS b/NEWS
index 8a4141e..09bcae8 100644
--- a/NEWS
+++ b/NEWS
@@ -187,3 +187,4 @@ with all sufficient information, see the ChangeLog file.
=== Build system updates
=== Implementation changes
+* OS/2 is no longer supported \ No newline at end of file
diff --git a/common.mk b/common.mk
index cf4dca0..15c00d4 100644
--- a/common.mk
+++ b/common.mk
@@ -710,8 +710,6 @@ strstr.$(OBJEXT): {$(VPATH)}strstr.c
strtod.$(OBJEXT): {$(VPATH)}strtod.c
strtol.$(OBJEXT): {$(VPATH)}strtol.c
nt.$(OBJEXT): {$(VPATH)}nt.c
-os2.$(OBJEXT): {$(VPATH)}os2.c
-dl_os2.$(OBJEXT): {$(VPATH)}dl_os2.c
ia64.$(OBJEXT): {$(VPATH)}ia64.s
$(CC) $(CFLAGS) -c $<
diff --git a/configure.in b/configure.in
index 15f8182..df4e001 100644
--- a/configure.in
+++ b/configure.in
@@ -1135,8 +1135,6 @@ main()
AC_CHECK_FUNCS(_wfreopen_s)
AC_LIBOBJ([langinfo])
],
-[os2-emx*], [ LIBS="-lm $LIBS"
- ac_cv_lib_dir_opendir=no],
[bsdi*], [ LIBS="-lm $LIBS"
AC_DEFINE(BROKEN_SETREUID, 1)
AC_DEFINE(BROKEN_SETREGID, 1)
@@ -3120,8 +3118,6 @@ if test "$with_dln_a_out" != yes; then
[hiuxmpp], [ : ${LDSHARED='$(LD) -r'}],
[atheos*], [ : ${LDSHARED='$(CC) -shared'}
rb_cv_dlopen=yes],
- [os2-emx*], [ LDFLAGS="$LDFLAGS -Zomf"
- ],
[nacl], [ LDSHARED='$(CC) -shared' ],
[ : ${LDSHARED='$(LD)'}])
AC_MSG_RESULT($rb_cv_dlopen)
@@ -3318,9 +3314,6 @@ else
[darwin*], [
RUBY_APPEND_OPTION(XLDFLAGS, [-Wl,-u,_objc_msgSend])
DLEXT=bundle],
- [os2-emx*], [
- LOAD_RELATIVE=1
- DLEXT=dll],
[cygwin*|mingw*|*djgpp*], [
LOAD_RELATIVE=1
DLEXT=so],
@@ -3492,7 +3485,7 @@ LIBRUBYARG='$(LIBRUBYARG_STATIC)'
SOLIBS=
AS_CASE(["$target_os"],
- [cygwin*|mingw*|beos*|haiku*|darwin*|os2-emx*], [
+ [cygwin*|mingw*|beos*|haiku*|darwin*], [
: ${DLDLIBS=""}
],
[
@@ -3833,13 +3826,6 @@ AS_CASE(["$target_os"],
RUBY_APPEND_OPTION(XLDFLAGS, [-framework CoreFoundation])
RUBY_APPEND_OPTION(LIBRUBYARG_STATIC, [-framework CoreFoundation])
],
- [os2-emx], [
- AC_LIBOBJ([os2])
- CFLAGS="$CFLAGS -DOS2"
- LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'`
- LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'`
- LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'`
- ],
[osf*], [
if test "$GCC" != "yes" ; then
# compile something small: taint.c is fine for this.
diff --git a/dln_find.c b/dln_find.c
index bc83b65..b17b0d2 100644
--- a/dln_find.c
+++ b/dln_find.c
@@ -276,7 +276,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
}
goto next;
}
-#endif /* _WIN32 or __EMX__ */
+#endif
#ifndef S_ISREG
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
diff --git a/ext/Setup.emx b/ext/Setup.emx
deleted file mode 100644
index d976a18..0000000
--- a/ext/Setup.emx
+++ /dev/null
@@ -1,31 +0,0 @@
-# OS/2 environment w/ Autoconf 2.1x for EMX
-option platform os2-emx
-option nodynamic
-
-#Win32API
-bigdecimal
-#dbm
-digest
-digest/md5
-digest/rmd160
-digest/sha1
-digest/sha2
-enumerator
-etc
-fcntl
-#gdbm
-#io/wait
-nkf
-#openssl
-#pty
-racc/cparse
-#readline
-#ripper
-#sdbm
-socket
-stringio
-strscan
-#syslog
-#tk
-#win32ole
-#zlib
diff --git a/ext/extmk.rb b/ext/extmk.rb
index d8e9e86..ad01ff4 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -50,7 +50,6 @@ elsif !File.chardev?(@null = "/dev/null")
end
def sysquote(x)
- @quote ||= /os2/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
@quote ? x.quote : x
end
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 9a6af8b..459c10e 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -441,9 +441,6 @@ when /beos/
when /haiku/
test_func = "socket(0,0,0)"
have_library("network", "socket(0,0,0)", headers)
-when /i386-os2_emx/
- test_func = "socket(0,0,0)"
- have_library("socket", "socket(0,0,0)", headers)
else
test_func = "socket(0,0,0)"
have_library("nsl", 't_open("", 0, (struct t_info *)NULL)', headers) # SunOS
diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb
index b4348ce..4480d35 100644
--- a/ext/zlib/extconf.rb
+++ b/ext/zlib/extconf.rb
@@ -20,8 +20,6 @@ if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')
case RUBY_PLATFORM.split('-',2)[1]
when 'amigaos' then
os_code = 'AMIGA'
- when /\Aos2[\-_]emx\z/ then
- os_code = 'OS2'
when /mswin|mingw|bccwin/ then
# NOTE: cygwin should be regarded as Unix.
os_code = 'WIN32'
@@ -36,7 +34,6 @@ if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')
'OS_VMS' => 'VMS',
'OS_UNIX' => 'Unix',
'OS_ATARI' => 'Atari',
- 'OS_OS2' => 'OS/2',
'OS_MACOS' => 'MacOS',
'OS_TOPS20' => 'TOPS20',
'OS_WIN32' => 'Win32',
diff --git a/file.c b/file.c
index 784b003..f668820 100644
--- a/file.c
+++ b/file.c
@@ -2899,8 +2899,6 @@ rb_file_s_rename(VALUE klass, VALUE from, VALUE to)
#if defined DOSISH
switch (e) {
case EEXIST:
-#if defined (__EMX__)
- case EACCES:
#endif
if (chmod(dst, 0666) == 0 &&
unlink(dst) == 0 &&
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 88ab53f..0f6a68c 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -147,7 +147,7 @@ void xfree(void*);
#undef _WIN32
#endif
-#if defined(_WIN32) || defined(__EMX__)
+#if defined(_WIN32)
/*
DOSISH mean MS-Windows style filesystem.
But you should use more precise macros like DOSISH_DRIVE_LETTER, PATH_SEP,
@@ -225,7 +225,7 @@ void rb_ia64_flushrs(void);
#define PATH_ENV "PATH"
-#if defined(DOSISH) && !defined(__EMX__)
+#if defined(DOSISH)
#define ENV_IGNORECASE
#endif
diff --git a/io.c b/io.c
index 682f733..c530c0d 100644
--- a/io.c
+++ b/io.c
@@ -35,7 +35,7 @@
# include <sys/socket.h>
#endif
-#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__) || defined(__HAIKU__)
+#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__BEOS__) || defined(__HAIKU__)
# define NO_SAFE_RENAME
#endif
@@ -74,8 +74,7 @@
#include <sys/stat.h>
-/* EMX has sys/param.h, but.. */
-#if defined(HAVE_SYS_PARAM_H) && !(defined(__EMX__) || defined(__HIUX_MPP__))
+#if defined(HAVE_SYS_PARAM_H) || defined(__HIUX_MPP__))
# include <sys/param.h>
#endif
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 6a4c3c8..f0ece79 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -132,7 +132,6 @@ module MakeMakefile
$mingw = /mingw/ =~ RUBY_PLATFORM
$cygwin = /cygwin/ =~ RUBY_PLATFORM
$netbsd = /netbsd/ =~ RUBY_PLATFORM
- $os2 = /os2/ =~ RUBY_PLATFORM
$beos = /beos/ =~ RUBY_PLATFORM
$haiku = /haiku/ =~ RUBY_PLATFORM
$solaris = /solaris/ =~ RUBY_PLATFORM
diff --git a/missing/os2.c b/missing/os2.c
deleted file mode 100644
index 27dc2f1..0000000
--- a/missing/os2.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* os/2 compatibility functions -- follows Ruby's license */
-
-#include "ruby.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <process.h>
-#include <limits.h>
-#include <errno.h>
-
-#define INCL_DOS
-#include <os2.h>
-
-int
-chown(char *path, int owner, int group)
-{
- return 0;
-}
-
-#if 0
-int
-link(char *from, char *to)
-{
- return -1;
-}
-#endif
-
-#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD) \
- || defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR)
-#include <unistd.h>
-
-#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD)
-/* to handle the drive letter and DBCS characters within a given path */
-char *
-getcwd(char *path, size_t len)
-{
- return _getcwd2(path, (int)len);
-}
-#endif
-
-#if defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR)
-/* to handle the drive letter and DBCS characters within a given path */
-int
-chdir(__const__ char *path)
-{
- return _chdir2(path);
-}
-#endif
-#endif
-
-typedef char* CHARP;
-
-int
-do_spawn(cmd)
-char *cmd;
-{
- register char **a;
- register char *s;
- char **argv;
- char *shell, *sw, *cmd2;
- int status;
-
- if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') {
- s = shell;
- do
- *s = isupper(*s) ? tolower(*s) : *s;
- while (*++s);
- if (strstr(shell, "cmd") || strstr(shell, "4os2"))
- sw = "/c";
- else
- sw = "-c";
- } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') {
- s = shell;
- do
- *s = isupper(*s) ? tolower(*s) : *s;
- while (*++s);
- if (strstr(shell, "cmd") || strstr(shell, "4os2"))
- sw = "/c";
- else
- sw = "-c";
- } else if ((shell = getenv("COMSPEC")) != NULL && *shell != '\0') {
- s = shell;
- do
- *s = isupper(*s) ? tolower(*s) : *s;
- while (*++s);
- if (strstr(shell, "cmd") || strstr(shell, "4os2"))
- sw = "/c";
- else
- sw = "-c";
- }
- /* see if there are shell metacharacters in it */
- /*SUPPRESS 530*/
- /* for (s = cmd; *s && isalpha(*s); s++) ;
- if (*s == '=')
- goto doshell; */
- for (s = cmd; *s; s++) {
- if (*sw == '-' && *s != ' ' &&
- !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
- if (*s == '\n' && !s[1]) {
- *s = '\0';
- break;
- }
- goto doshell;
- } else if (*sw == '/' && *s != ' ' &&
- !isalpha(*s) && index("^()<>|&\n",*s)) {
- if (*s == '\n' && !s[1]) {
- *s = '\0';
- break;
- }
- doshell:
- status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL);
- return status;
- }
- }
- argv = ALLOC_N(CHARP,(strlen(cmd) / 2 + 2));
- cmd2 = ALLOC_N(char, (strlen(cmd) + 1));
- strcpy(cmd2, cmd);
- a = argv;
- for (s = cmd2; *s;) {
- while (*s && isspace(*s)) s++;
- if (*s)
- *(a++) = s;
- while (*s && !isspace(*s)) s++;
- if (*s)
- *s++ = '\0';
- }
- *a = NULL;
- if (argv[0]) {
- if ((status = spawnvp(P_WAIT, argv[0], argv)) == -1) {
- free(argv);
- free(cmd2);
- return -1;
- }
- }
- free(cmd2);
- free(argv);
- return status;
-}
diff --git a/process.c b/process.c
index 3a32848..2791299 100644
--- a/process.c
+++ b/process.c
@@ -60,10 +60,6 @@
#endif
#include "ruby/st.h"
-#ifdef __EMX__
-#undef HAVE_GETPGRP
-#endif
-
#include <sys/stat.h>
#if defined(__native_client__) && defined(NACL_NEWLIB)
# include <sys/unistd.h>
@@ -1249,9 +1245,6 @@ proc_exec_cmd(const char *prog, VALUE argv_str, VALUE envp_str)
#else
char **argv;
char **envp;
-# if defined(__EMX__) || defined(OS2)
- char **new_argv = NULL;
-# endif
argv = ARGVSTR2ARGV(argv_str);
@@ -1260,46 +1253,12 @@ proc_exec_cmd(const char *prog, VALUE argv_str, VALUE envp_str)
return -1;
}
-# if defined(__EMX__) || defined(OS2)
- {
-# define COMMAND "cmd.exe"
- char *extension;
-
- if ((extension = strrchr(prog, '.')) != NULL && STRCASECMP(extension, ".bat") == 0) {
- char *p;
- int n;
-
- for (n = 0; argv[n]; n++)
- /* no-op */;
- new_argv = ALLOC_N(char*, n + 2);
- for (; n > 0; n--)
- new_argv[n + 1] = argv[n];
- new_argv[1] = strcpy(ALLOC_N(char, strlen(argv[0]) + 1), argv[0]);
- for (p = new_argv[1]; *p != '\0'; p++)
- if (*p == '/')
- *p = '\\';
- new_argv[0] = COMMAND;
- argv = new_argv;
- prog = dln_find_exe_r(argv[0], 0, fbuf, sizeof(fbuf));
- if (!prog) {
- errno = ENOENT;
- return -1;
- }
- }
- }
-# endif /* __EMX__ */
envp = envp_str ? (char **)RSTRING_PTR(envp_str) : NULL;
if (envp_str)
execve(prog, argv, envp); /* async-signal-safe */
else
execv(prog, argv); /* async-signal-safe (since SUSv4) */
preserving_errno(try_with_sh(prog, argv, envp)); /* try_with_sh() is async-signal-safe. */
-# if defined(__EMX__) || defined(OS2)
- if (new_argv) {
- xfree(new_argv[0]);
- xfree(new_argv);
- }
-# endif
return -1;
#endif
}
@@ -1327,7 +1286,7 @@ proc_exec_sh(const char *str, VALUE envp_str)
rb_w32_uspawn(P_OVERLAY, (char *)str, 0);
return -1;
#else
-#if defined(__CYGWIN32__) || defined(__EMX__)
+#if defined(__CYGWIN32__)
{
char fbuf[MAXPATHLEN];
char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf));
diff --git a/ruby.c b/ruby.c
index 5b92d49..5c17f40 100644
--- a/ruby.c
+++ b/ruby.c
@@ -432,8 +432,6 @@ ruby_init_loadpath_safe(int safe_level)
sopath = rb_str_new(0, MAXPATHLEN);
libpath = RSTRING_PTR(sopath);
GetModuleFileName(libruby, libpath, MAXPATHLEN);
-#elif defined(__EMX__)
- _execname(libpath, sizeof(libpath) - 1);
#elif defined(HAVE_DLADDR)
sopath = dladdr_path((void *)(VALUE)expand_include_path);
libpath = RSTRING_PTR(sopath);