mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
6803c4e2a8
commit
4ad2057f27
16 changed files with 27 additions and 246 deletions
19
ChangeLog
19
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.
|
||||
|
|
1
NEWS
1
NEWS
|
@ -187,3 +187,4 @@ with all sufficient information, see the ChangeLog file.
|
|||
=== Build system updates
|
||||
|
||||
=== Implementation changes
|
||||
* OS/2 is no longer supported
|
|
@ -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 $<
|
||||
|
||||
|
|
16
configure.in
16
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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
2
file.c
2
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 &&
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
5
io.c
5
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
138
missing/os2.c
138
missing/os2.c
|
@ -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;
|
||||
}
|
43
process.c
43
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));
|
||||
|
|
2
ruby.c
2
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue