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

ruby-changes:8149

From: yugui <ko1@a...>
Date: Sat, 4 Oct 2008 22:12:47 +0900 (JST)
Subject: [ruby-changes:8149] Ruby:r19677 (trunk): * x68/_dtos18.c: removed. Ruby no longer supports human68k.

yugui	2008-10-04 22:12:13 +0900 (Sat, 04 Oct 2008)

  New Revision: 19677

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

  Log:
    * x68/_dtos18.c: removed. Ruby no longer supports human68k.
    
    * x68/_round.c: ditto.
    
    * x68/fconvert.c: ditto.
    
    * x68/select.c: ditto.
    
    * ext/Setup.x68: ditto.
    
    * missing/x68.c: ditto.
    
    * dln.c (dln_find_exe_r): removed human68k supports.
      (dln_find_1): ditto.
    
    * lib/mkmf.rb: ditto.
    
    * ext/extmk.rb (Init_ext): ditto.
    
    * ext/socket/socket.c (init_sock): ditto.
    
    * gc.c (GC_MALLOC_LIMIT): ditto.
      (rb_setjmp, rb_jmpbuf): ditto.
      (mark_current_machine_context): ditto.
    
    * include/ruby/defines.h (PATH_ENV): ditto.
    
    * io.c: ditto.
    
    * process.c: ditto.
    
    * ruby.c: ditto.
    
    * test/ruby/test_env.rb: ditto.
    
    * test/ruby/test_path.rb: ditto.
    
    * LEGAL

  Removed directories:
    trunk/x68/
  Removed files:
    trunk/ext/Setup.x68
    trunk/missing/x68.c
  Modified files:
    trunk/ChangeLog
    trunk/LEGAL
    trunk/common.mk
    trunk/dln.c
    trunk/ext/extmk.rb
    trunk/ext/socket/socket.c
    trunk/gc.c
    trunk/include/ruby/defines.h
    trunk/io.c
    trunk/lib/mkmf.rb
    trunk/process.c
    trunk/ruby.c
    trunk/test/ruby/test_env.rb
    trunk/test/ruby/test_path.rb

Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 19676)
+++ include/ruby/defines.h	(revision 19677)
@@ -103,7 +103,7 @@
 #undef _WIN32
 #endif
 
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#if defined(MSDOS) || defined(_WIN32) || defined(__EMX__)
 #define DOSISH 1
 #ifndef _WIN32_WCE
 # define DOSISH_DRIVE_LETTER
@@ -252,13 +252,9 @@
 #endif
 #define PATH_SEP_CHAR PATH_SEP[0]
 
-#if defined(__human68k__)
-#define PATH_ENV "path"
-#else
 #define PATH_ENV "PATH"
-#endif
 
-#if defined(DOSISH) && !defined(__human68k__) && !defined(__EMX__)
+#if defined(DOSISH) && !defined(__EMX__)
 #define ENV_IGNORECASE
 #endif
 
Index: LEGAL
===================================================================
--- LEGAL	(revision 19676)
+++ LEGAL	(revision 19677)
@@ -171,7 +171,6 @@
     email: matumoto@m...
 
 st.[ch]:
-x68/*:
 missing/alloca.c:
 missing/dup2.c:
 missing/finite.c:
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19676)
+++ ChangeLog	(revision 19677)
@@ -1,3 +1,44 @@
+Sat Oct  4 21:59:39 2008  Yuki Sonoda (Yugui)  <yugui@y...>
+
+	* x68/_dtos18.c: removed. Ruby no longer supports human68k.
+
+	* x68/_round.c: ditto.
+
+	* x68/fconvert.c: ditto.
+
+	* x68/select.c: ditto.
+
+	* ext/Setup.x68: ditto.
+
+	* missing/x68.c: ditto.
+
+	* dln.c (dln_find_exe_r): removed human68k supports.
+	  (dln_find_1): ditto.
+
+	* lib/mkmf.rb: ditto.
+
+	* ext/extmk.rb (Init_ext): ditto.
+
+	* ext/socket/socket.c (init_sock): ditto.
+
+	* gc.c (GC_MALLOC_LIMIT): ditto.
+	  (rb_setjmp, rb_jmpbuf): ditto.
+	  (mark_current_machine_context): ditto.
+
+	* include/ruby/defines.h (PATH_ENV): ditto.
+
+	* io.c: ditto.
+
+	* process.c: ditto.
+
+	* ruby.c: ditto.
+
+	* test/ruby/test_env.rb: ditto.
+
+	* test/ruby/test_path.rb: ditto.
+
+	* LEGAL
+
 Sat Oct  4 19:02:36 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* lib/date/format.rb: no need to require the "lib/rational.rb".
Index: io.c
===================================================================
--- io.c	(revision 19676)
+++ io.c	(revision 19677)
@@ -29,7 +29,7 @@
 # include <sys/socket.h>
 #endif
 
-#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
+#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__)
 # define NO_SAFE_RENAME
 #endif
 
@@ -46,7 +46,7 @@
 #endif
 
 #include <sys/types.h>
-#if defined(HAVE_SYS_IOCTL_H) && !defined(DJGPP) && !defined(_WIN32) && !defined(__human68k__)
+#if defined(HAVE_SYS_IOCTL_H) && !defined(DJGPP) && !defined(_WIN32)
 #include <sys/ioctl.h>
 #endif
 #if defined(HAVE_FCNTL_H) || defined(_WIN32)
@@ -6400,7 +6400,7 @@
 
 }
 
-#if !defined(MSDOS) && !defined(__human68k__)
+#if !defined(MSDOS)
 static int
 io_cntl(int fd, int cmd, long narg, int io_p)
 {
@@ -6425,7 +6425,7 @@
 static VALUE
 rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
 {
-#if !defined(MSDOS) && !defined(__human68k__)
+#if !defined(MSDOS)
     int cmd = NUM2ULONG(req);
     rb_io_t *fptr;
     long len = 0;
@@ -6768,10 +6768,6 @@
 static VALUE
 rb_io_s_pipe(int argc, VALUE *argv, VALUE klass)
 {
-#ifdef __human68k__
-    rb_notimplement();
-    return Qnil;		/* not reached */
-#else
     int pipes[2], state;
     VALUE r, w, args[3], v1, v2;
     VALUE opt;
@@ -6804,7 +6800,6 @@
     rb_io_synchronized(RFILE(w)->fptr);
 
     return rb_assoc_new(r, w);
-#endif
 }
 
 struct foreach_arg {
@@ -8423,7 +8418,7 @@
     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__) || defined(__human68k__)
+#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__)
     atexit(pipe_atexit);
 #endif
 
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 19676)
+++ lib/mkmf.rb	(revision 19677)
@@ -9,7 +9,7 @@
 ORIG_LIBPATH = ENV['LIB']
 
 CXX_EXT = %w[cc cxx cpp]
-if /mswin|bccwin|mingw|msdosdjgpp|human|os2/ !~ CONFIG['build_os']
+if /mswin|bccwin|mingw|msdosdjgpp|os2/ !~ CONFIG['build_os']
   CXX_EXT.concat(%w[C])
 end
 SRC_EXT = %w[c m] << CXX_EXT
@@ -59,7 +59,6 @@
 $bccwin = /bccwin/ =~ RUBY_PLATFORM
 $mingw = /mingw/ =~ RUBY_PLATFORM
 $cygwin = /cygwin/ =~ RUBY_PLATFORM
-$human = /human/ =~ RUBY_PLATFORM
 $netbsd = /netbsd/ =~ RUBY_PLATFORM
 $os2 = /os2/ =~ RUBY_PLATFORM
 $beos = /beos/ =~ RUBY_PLATFORM
Index: common.mk
===================================================================
--- common.mk	(revision 19676)
+++ common.mk	(revision 19677)
@@ -424,7 +424,6 @@
 strtod.$(OBJEXT): {$(VPATH)}strtod.c
 strtol.$(OBJEXT): {$(VPATH)}strtol.c
 nt.$(OBJEXT): {$(VPATH)}nt.c
-x68.$(OBJEXT): {$(VPATH)}x68.c
 os2.$(OBJEXT): {$(VPATH)}os2.c
 dl_os2.$(OBJEXT): {$(VPATH)}dl_os2.c
 ia64.$(OBJEXT): {$(VPATH)}ia64.s
Index: gc.c
===================================================================
--- gc.c	(revision 19676)
+++ gc.c	(revision 19677)
@@ -75,7 +75,7 @@
 #endif /* __GNUC__ */
 
 #ifndef GC_MALLOC_LIMIT
-#if defined(MSDOS) || defined(__human68k__)
+#if defined(MSDOS)
 #define GC_MALLOC_LIMIT 200000
 #else
 #define GC_MALLOC_LIMIT 8000000
@@ -1859,18 +1859,9 @@
 }
 
 #ifdef __GNUC__
-#if defined(__human68k__) || defined(DJGPP)
+#if defined(DJGPP)
 #undef rb_setjmp
 #undef rb_jmp_buf
-#if defined(__human68k__)
-typedef unsigned long rb_jmp_buf[8];
-__asm__ (".even\n\
-_rb_setjmp:\n\
-	move.l	4(sp),a0\n\
-	movem.l	d3-d7/a3-a5,(a0)\n\
-	moveq.l	#0,d0\n\
-	rts");
-#else
 #if defined(DJGPP)
 typedef unsigned long rb_jmp_buf[6];
 __asm__ (".align 4\n\
@@ -1888,9 +1879,8 @@
 	xorl	%eax,%eax\n\
 	ret");
 #endif
-#endif
 int rb_setjmp (rb_jmp_buf);
-#endif /* __human68k__ or DJGPP */
+#endif /* DJGPP */
 #endif /* __GNUC__ */
 
 #define GC_NOTIFY 0
@@ -1932,7 +1922,7 @@
 #ifdef __ia64
     rb_gc_mark_locations(th->machine_register_stack_start, th->machine_register_stack_end);
 #endif
-#if defined(__human68k__) || defined(__mc68000__)
+#if defined(__mc68000__)
     mark_locations_array((VALUE*)((char*)STACK_END + 2),
 			 (STACK_START - STACK_END));
 #endif
Index: dln.c
===================================================================
--- dln.c	(revision 19676)
+++ dln.c	(revision 19677)
@@ -1581,7 +1581,7 @@
     }
 
     if (!path) {
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
+#if defined(MSDOS) || defined(_WIN32) || defined(__MACOS__)
 	path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
 #else
 	path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
@@ -1721,9 +1721,6 @@
 #elif defined(__EMX__) || defined(_WIN32)
 		".exe", ".com", ".cmd", ".bat",
 /* end of __EMX__ or _WIN32 */
-#else
-		".r", ".R", ".x", ".X", ".bat", ".BAT",
-/* __human68k__ */
 #endif
 	    };
 	    int j;
@@ -1747,7 +1744,7 @@
 	    }
 	    goto next;
 	}
-#endif /* MSDOS or _WIN32 or __human68k__ or __EMX__ */
+#endif /* MSDOS or _WIN32 or __EMX__ */
 
 #ifndef __MACOS__
 	if (stat(fbuf, &st) == 0) {
Index: process.c
===================================================================
--- process.c	(revision 19676)
+++ process.c	(revision 19677)
@@ -1004,11 +1004,8 @@
 	return -1;
     }
 
-#if (defined(MSDOS) && !defined(DJGPP)) || defined(__human68k__) || defined(__EMX__) || defined(OS2)
+#if (defined(MSDOS) && !defined(DJGPP)) || defined(__EMX__) || defined(OS2)
     {
-#if defined(__human68k__)
-#define COMMAND "command.x"
-#endif
 #if defined(__EMX__) || defined(OS2) /* OS/2 emx */
 #define COMMAND "cmd.exe"
 #endif
@@ -1040,7 +1037,7 @@
 	    }
 	}
     }
-#endif /* MSDOS or __human68k__ or __EMX__ */
+#endif /* MSDOS or __EMX__ */
     before_exec();
     execv(prog, argv);
     preserving_errno(after_exec());
@@ -1098,7 +1095,7 @@
 	    after_exec();
 	    if (status != -1)
 		exit(status);
-#elif defined(__human68k__) || defined(__CYGWIN32__) || defined(__EMX__)
+#elif defined(__CYGWIN32__) || defined(__EMX__)
 	    char fbuf[MAXPATHLEN];
 	    char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf));
 	    int status = -1;
@@ -1158,30 +1155,6 @@
     if (!prog)
 	return -1;
 
-#if defined(__human68k__)
-    if ((extension = strrchr(prog, '.')) != NULL && STRCASECMP(extension, ".bat") == 0) {
-	char **new_argv;
-	char *p;
-	int n;
-
-	for (n = 0; argv[n]; n++)
-	    /* no-op */;
-	new_argv = ALLOCA_N(char*, n + 2);
-	for (; n > 0; n--)
-	    new_argv[n + 1] = argv[n];
-	new_argv[1] = strcpy(ALLOCA_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
     before_exec();
     status = spawnv(P_WAIT, prog, argv);
     rb_last_status_set(status == -1 ? 127 : status, 0);
@@ -2694,7 +2667,7 @@
 # else
     if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
     status = system(StringValuePtr(prog));
-#  if defined(__human68k__) || defined(__DJGPP__)
+#  if defined(__DJGPP__)
     rb_last_status_set(status == -1 ? 127 : status, 0);
 #  else
     rb_last_status_set((status & 0xff) << 8, 0);
Index: ext/Setup.x68
===================================================================
--- ext/Setup.x68	(revision 19676)
+++ ext/Setup.x68	(revision 19677)
@@ -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
Index: ext/socket/socket.c
===================================================================
--- ext/socket/socket.c	(revision 19676)
+++ ext/socket/socket.c	(revision 19677)
@@ -241,7 +241,7 @@
     MakeOpenFile(sock, fp);
     fp->fd = fd;
     fp->mode = FMODE_READWRITE|FMODE_DUPLEX;
-#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
+#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__EMX__)
     fp->mode |= FMODE_BINMODE;
 #endif
     if (do_not_reverse_lookup) {
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 19676)
+++ ext/extmk.rb	(revision 19677)
@@ -39,7 +39,7 @@
 require 'optparse/shellwords'
 
 def sysquote(x)
-  @quote ||= /human|os2|macos/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
+  @quote ||= /os2|macos/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
   @quote ? x.quote : x
 end
 
@@ -507,7 +507,7 @@
   end
 
   $extobjs = "ext/#{extinit.o} #{$extobjs}"
-  if RUBY_PLATFORM =~ /m68k-human|beos/
+  if RUBY_PLATFORM =~ /beos/
     $extflags.delete("-L/usr/local/lib")
   end
   $extpath.delete("$(topdir)")
Index: ruby.c
===================================================================
--- ruby.c	(revision 19676)
+++ ruby.c	(revision 19677)
@@ -359,9 +359,6 @@
 #elif defined(DJGPP)
     extern char *__dos_argv0;
     strncpy(libpath, __dos_argv0, sizeof(libpath) - 1);
-#elif defined(__human68k__)
-    extern char **_argv;
-    strncpy(libpath, _argv[0], sizeof(libpath) - 1);
 #elif defined(__EMX__)
     _execname(libpath, sizeof(libpath) - 1);
 #endif
Index: test/ruby/test_env.rb
===================================================================
--- test/ruby/test_env.rb	(revision 19676)
+++ test/ruby/test_env.rb	(revision 19677)
@@ -2,7 +2,7 @@
 
 class TestEnv < Test::Unit::TestCase
   IGNORE_CASE = /djgpp|bccwin|mswin|mingw/ =~ RUBY_PLATFORM
-  PATH_ENV = /human68k/ =~ RUBY_PLATFORM ? "path" : "PATH"
+  PATH_ENV = "PATH"
 
   def setup
     @verbose = $VERBOSE
Index: test/ruby/test_path.rb
===================================================================
--- test/ruby/test_path.rb	(revision 19676)
+++ test/ruby/test_path.rb	(revision 19677)
@@ -45,7 +45,7 @@
   end
 
   def test_dirname
-    if /(bcc|ms)win\d|mingw|cygwin|djgpp|human|emx/ =~ RUBY_PLATFORM
+    if /(bcc|ms)win\d|mingw|cygwin|djgpp|emx/ =~ RUBY_PLATFORM
       # DOSISH_DRIVE_LETTER
       assert_equal('C:.', File.dirname('C:'))
       assert_equal('C:.', File.dirname('C:a'))
@@ -101,7 +101,7 @@
     assert_equal('/', File.dirname('/a/'))
     assert_equal('/a', File.dirname('/a/b'))
 
-    if /(bcc|ms|cyg)win|mingw|djgpp|human|emx/ =~ RUBY_PLATFORM
+    if /(bcc|ms|cyg)win|mingw|djgpp|emx/ =~ RUBY_PLATFORM
       # DOSISH_UNC
       assert_equal('//', File.dirname('//'))
       assert_equal('//a', File.dirname('//a'))
@@ -135,7 +135,7 @@
   end
 
   def test_basename
-    if /(bcc|ms)win\d|mingw|cygwin|djgpp|human|emx/ =~ RUBY_PLATFORM
+    if /(bcc|ms)win\d|mingw|cygwin|djgpp|emx/ =~ RUBY_PLATFORM
       # DOSISH_DRIVE_LETTER
       assert_equal('', File.basename('C:'))
       assert_equal('a', File.basename('C:a'))
@@ -189,7 +189,7 @@
     assert_equal('a', File.basename('/a/'))
     assert_equal('b', File.basename('/a/b'))
 
-    if /(bcc|ms|cyg)win|mingw|djgpp|human|emx/ =~ RUBY_PLATFORM
+    if /(bcc|ms|cyg)win|mingw|djgpp|emx/ =~ RUBY_PLATFORM
       # DOSISH_UNC
       assert_equal('/', File.basename('//'))
       assert_equal('/', File.basename('//a'))
Index: missing/x68.c
===================================================================
--- missing/x68.c	(revision 19676)
+++ missing/x68.c	(revision 19677)
@@ -1,40 +0,0 @@
-/* x68 compatibility functions -- follows Ruby's license */
-
-#include "ruby/config.h"
-
-#if !HAVE_SELECT
-#include "x68/select.c"
-#endif
-#if MISSING__DTOS18
-#include "x68/_dtos18.c"
-#endif
-#if MISSING_FCONVERT
-#include "x68/_round.c"
-#include "x68/fconvert.c"
-#endif
-
-/* missing some basic syscalls */
-int
-link(const char *src, const char *dst)
-{
-    return symlink(src, dst);
-}
-
-#ifndef HAVE_GETTIMEOFDAY
-#include <time.h>
-#include <sys/time.h>
-
-struct timezone {
-    int tz_minuteswest;
-    int tz_dsttime;
-};
-
-int
-gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-    tv->tv_sec = (long)time((time_t*)0);
-    tv->tv_usec = 0;
-
-    return 0;
-}
-#endif

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

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