[前][次][番号順一覧][スレッド一覧]

ruby-changes:40080

From: kosaki <ko1@a...>
Date: Sun, 18 Oct 2015 10:18:43 +0900 (JST)
Subject: [ruby-changes:40080] kosaki:r52161 (trunk): * ChangeLog: Good-bye OS/2.

kosaki	2015-10-18 10:18:34 +0900 (Sun, 18 Oct 2015)

  New Revision: 52161

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52161

  Log:
    * 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.

  Removed files:
    trunk/ext/Setup.emx
    trunk/missing/os2.c
  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/common.mk
    trunk/configure.in
    trunk/dln_find.c
    trunk/ext/extmk.rb
    trunk/ext/socket/extconf.rb
    trunk/ext/zlib/extconf.rb
    trunk/file.c
    trunk/include/ruby/defines.h
    trunk/io.c
    trunk/lib/mkmf.rb
    trunk/process.c
    trunk/ruby.c
Index: dln_find.c
===================================================================
--- dln_find.c	(revision 52160)
+++ dln_find.c	(revision 52161)
@@ -276,7 +276,7 @@ dln_find_1(const char *fname, const char https://github.com/ruby/ruby/blob/trunk/dln_find.c#L276
 	    }
 	    goto next;
 	}
-#endif /* _WIN32 or __EMX__ */
+#endif
 
 #ifndef S_ISREG
 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 52160)
+++ include/ruby/defines.h	(revision 52161)
@@ -147,7 +147,7 @@ void xfree(void*); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L147
 #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); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L225
 
 #define PATH_ENV "PATH"
 
-#if defined(DOSISH) && !defined(__EMX__)
+#if defined(DOSISH)
 #define ENV_IGNORECASE
 #endif
 
Index: configure.in
===================================================================
--- configure.in	(revision 52160)
+++ configure.in	(revision 52161)
@@ -1135,8 +1135,6 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.in#L1135
 		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 https://github.com/ruby/ruby/blob/trunk/configure.in#L3118
 	[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 https://github.com/ruby/ruby/blob/trunk/configure.in#L3314
     [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)' https://github.com/ruby/ruby/blob/trunk/configure.in#L3485
 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"], https://github.com/ruby/ruby/blob/trunk/configure.in#L3826
 	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.
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52160)
+++ ChangeLog	(revision 52161)
@@ -1,3 +1,22 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Oct 18 10:01:40 2015  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
 
 	* include/ruby/defines.h (DOSISH): add comments.
Index: io.c
===================================================================
--- io.c	(revision 52160)
+++ io.c	(revision 52161)
@@ -35,7 +35,7 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L35
 # 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 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L74
 
 #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
 
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 52160)
+++ lib/mkmf.rb	(revision 52161)
@@ -132,7 +132,6 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L132
   $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
Index: common.mk
===================================================================
--- common.mk	(revision 52160)
+++ common.mk	(revision 52161)
@@ -710,8 +710,6 @@ strstr.$(OBJEXT): {$(VPATH)}strstr.c https://github.com/ruby/ruby/blob/trunk/common.mk#L710
 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 $<
 
Index: process.c
===================================================================
--- process.c	(revision 52160)
+++ process.c	(revision 52161)
@@ -60,10 +60,6 @@ https://github.com/ruby/ruby/blob/trunk/process.c#L60
 #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 ar https://github.com/ruby/ruby/blob/trunk/process.c#L1245
 #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 ar https://github.com/ruby/ruby/blob/trunk/process.c#L1253
 	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 https://github.com/ruby/ruby/blob/trunk/process.c#L1286
     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));
Index: ext/Setup.emx
===================================================================
--- ext/Setup.emx	(revision 52160)
+++ ext/Setup.emx	(revision 52161)
@@ -1,31 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/ext/Setup.emx#L0
-# 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
Index: ext/zlib/extconf.rb
===================================================================
--- ext/zlib/extconf.rb	(revision 52160)
+++ ext/zlib/extconf.rb	(revision 52161)
@@ -20,8 +20,6 @@ if %w'z libz zlib1 zlib zdll zlibwapi'.f https://github.com/ruby/ruby/blob/trunk/ext/zlib/extconf.rb#L20
     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'.f https://github.com/ruby/ruby/blob/trunk/ext/zlib/extconf.rb#L34
     'OS_VMS'     => 'VMS',
     'OS_UNIX'    => 'Unix',
     'OS_ATARI'   => 'Atari',
-    'OS_OS2'     => 'OS/2',
     'OS_MACOS'   => 'MacOS',
     'OS_TOPS20'  => 'TOPS20',
     'OS_WIN32'   => 'Win32',
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 52160)
+++ ext/socket/extconf.rb	(revision 52161)
@@ -441,9 +441,6 @@ when /beos/ https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L441
 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
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 52160)
+++ ext/extmk.rb	(revision 52161)
@@ -50,7 +50,6 @@ elsif !File.chardev?(@null = "/dev/null" https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L50
 end
 
 def sysquote(x)
-  @quote ||= /os2/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
   @quote ? x.quote : x
 end
 
Index: NEWS
===================================================================
--- NEWS	(revision 52160)
+++ NEWS	(revision 52161)
@@ -187,3 +187,4 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L187
 === Build system updates
 
 === Implementation changes
+* OS/2 is no longer supported
\ No newline at end of file
Index: ruby.c
===================================================================
--- ruby.c	(revision 52160)
+++ ruby.c	(revision 52161)
@@ -432,8 +432,6 @@ ruby_init_loadpath_safe(int safe_level) https://github.com/ruby/ruby/blob/trunk/ruby.c#L432
     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);
Index: file.c
===================================================================
--- file.c	(revision 52160)
+++ file.c	(revision 52161)
@@ -2899,8 +2899,6 @@ rb_file_s_rename(VALUE klass, VALUE from https://github.com/ruby/ruby/blob/trunk/file.c#L2899
 #if defined DOSISH
 	switch (e) {
 	  case EEXIST:
-#if defined (__EMX__)
-	  case EACCES:
 #endif
 	    if (chmod(dst, 0666) == 0 &&
 		unlink(dst) == 0 &&
Index: missing/os2.c
===================================================================
--- missing/os2.c	(revision 52160)
+++ missing/os2.c	(revision 52161)
@@ -1,138 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/missing/os2.c#L0
-/* 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;
-}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]