1047 lines
37 KiB
Diff
1047 lines
37 KiB
Diff
diff -Naur ruby-2.0.0-p353/configure ruby-2.0.0-p353-msys2/configure
|
|
--- ruby-2.0.0-p353/configure 2013-11-22 08:23:39.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/configure 2013-11-24 19:28:43.413620300 +0400
|
|
@@ -3172,7 +3172,7 @@
|
|
nacl_cv_os_nick=linux ;; #(
|
|
darwin*) :
|
|
nacl_cv_os_nick=mac ;; #(
|
|
- cygwin*|mingw*) :
|
|
+ cygwin*|msys*|mingw*) :
|
|
nacl_cv_os_nick=win ;; #(
|
|
*) :
|
|
nacl_cv_os_nick=$build_os ;;
|
|
@@ -4616,7 +4616,7 @@
|
|
|
|
|
|
case "$host_os" in #(
|
|
- cygwin*) :
|
|
+ cygwin*|msys*) :
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingw32 environment" >&5
|
|
$as_echo_n "checking for mingw32 environment... " >&6; }
|
|
@@ -5650,7 +5650,7 @@
|
|
|
|
|
|
case "$target_os" in #(
|
|
- cygwin*|mingw*) :
|
|
+ cygwin*|msys*|mingw*) :
|
|
ac_cv_prog_ac_ct_OBJCOPY=":" ;; #(
|
|
*) :
|
|
;;
|
|
@@ -5859,7 +5859,7 @@
|
|
|
|
|
|
case "$target_os" in #(
|
|
- cygwin*|mingw*) :
|
|
+ cygwin*|msys*|mingw*) :
|
|
|
|
if test -n "$ac_tool_prefix"; then
|
|
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
|
|
@@ -7515,7 +7515,7 @@
|
|
# comments. We bypass ANSI C mode for them. Otherwise
|
|
# extension libs cannot include those headers.
|
|
;; #(
|
|
- cygwin*|darwin*|netbsd*) :
|
|
+ cygwin*|msys*|darwin*|netbsd*) :
|
|
|
|
# need lgamma_r(), finite()
|
|
;; #(
|
|
@@ -8171,7 +8171,7 @@
|
|
esac
|
|
LIBS="$LIBS" # m lib is include in root under BeOS/Haiku
|
|
;; #(
|
|
- cygwin*) :
|
|
+ cygwin*|msys*) :
|
|
ac_cv_header_langinfo_h=yes
|
|
for ac_func in cygwin_conv_path
|
|
do :
|
|
@@ -15835,7 +15835,7 @@
|
|
setjmp_prefix=_
|
|
elif test "$ac_cv_func_sigsetjmp" = yes; then
|
|
case $target_os in #(
|
|
- solaris*|cygwin*) :
|
|
+ solaris*|cygwin*|msys*) :
|
|
setjmp_prefix= ;; #(
|
|
*) :
|
|
setjmp_prefix=sig ;;
|
|
@@ -17347,7 +17347,7 @@
|
|
*) :
|
|
CCDLFLAGS="$CCDLFLAGS -fno-common" ;;
|
|
esac ;; #(
|
|
- bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*) :
|
|
+ bsdi*|beos*|haiku*|cygwin*|msys*|mingw*|aix*|interix*) :
|
|
;; #(
|
|
*) :
|
|
|
|
@@ -17534,10 +17534,10 @@
|
|
: ${LDSHARED='$(LD) -Bshareable -x'}
|
|
LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
|
|
rb_cv_dlopen=yes ;; #(
|
|
- cygwin*|mingw*) :
|
|
+ cygwin*|msys*|mingw*) :
|
|
|
|
: ${LDSHARED='$(CC) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)'}
|
|
- XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
|
|
+ XLDFLAGS="$XLDFLAGS -Xlinker --stack -Xlinker 0x00200000,0x00040000 -Xlinker --enable-auto-import"
|
|
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
|
|
: ${LIBPATHENV=""}
|
|
rb_cv_dlopen=yes ;; #(
|
|
@@ -17842,7 +17842,7 @@
|
|
|
|
LOAD_RELATIVE=1
|
|
DLEXT=dll ;; #(
|
|
- cygwin*|mingw*|*djgpp*) :
|
|
+ cygwin*|msys*|mingw*|*djgpp*) :
|
|
|
|
LOAD_RELATIVE=1
|
|
DLEXT=so ;; #(
|
|
@@ -18125,7 +18125,7 @@
|
|
SOLIBS=
|
|
|
|
case "$target_os" in #(
|
|
- cygwin*|mingw*|beos*|haiku*|darwin*|os2-emx*) :
|
|
+ cygwin*|msys*|mingw*|beos*|haiku*|darwin*|os2-emx*) :
|
|
|
|
: ${DLDLIBS=""}
|
|
;; #(
|
|
@@ -18350,7 +18350,7 @@
|
|
|
|
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
|
|
;; #(
|
|
- mingw*|cygwin*|mswin*) :
|
|
+ mingw*|cygwin*|msys*|mswin*) :
|
|
|
|
LIBRUBY_RELATIVE=yes
|
|
;; #(
|
|
@@ -18813,7 +18813,7 @@
|
|
esac
|
|
CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
|
|
;; #(
|
|
- cygwin*|mingw*) :
|
|
+ cygwin*|msys*|mingw*) :
|
|
|
|
RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)$(TEENY)'
|
|
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
|
|
@@ -18825,6 +18825,13 @@
|
|
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
|
|
fi
|
|
;; #(
|
|
+ msys*) :
|
|
+
|
|
+ if test x"$enable_shared" = xyes; then
|
|
+ LIBRUBY_SO='msys-$(RUBY_SO_NAME)'.dll
|
|
+ LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
|
|
+ fi
|
|
+ ;; #(
|
|
mingw*) :
|
|
|
|
RUBY_SO_NAME="${rb_cv_msvcrt}-${RUBY_SO_NAME}"
|
|
@@ -19167,7 +19174,7 @@
|
|
|
|
RUBY_INSTALL_NAME="${ri_prefix}"'$(RUBY_BASE_NAME)'"${ri_suffix}"
|
|
case "$target_os" in #(
|
|
- cygwin*|mingw*) :
|
|
+ cygwin*|msys*|mingw*) :
|
|
|
|
RUBYW_INSTALL_NAME="${ri_prefix}"'$(RUBYW_BASE_NAME)'"${ri_suffix}"
|
|
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
|
diff -Naur ruby-2.0.0-p353/configure.in ruby-2.0.0-p353-msys2/configure.in
|
|
--- ruby-2.0.0-p353/configure.in 2013-11-12 18:31:59.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/configure.in 2013-11-24 19:28:43.455622700 +0400
|
|
@@ -48,7 +48,7 @@
|
|
|
|
AC_DEFUN([RUBY_MINGW32],
|
|
[AS_CASE(["$host_os"],
|
|
-[cygwin*], [
|
|
+[cygwin*|msys*], [
|
|
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
|
|
[AC_TRY_CPP([
|
|
#ifndef __MINGW32__
|
|
@@ -95,7 +95,7 @@
|
|
AS_CASE(["$build_os"],
|
|
[linux*], [nacl_cv_os_nick=linux],
|
|
[darwin*], [nacl_cv_os_nick=mac],
|
|
- [cygwin*|mingw*], [nacl_cv_os_nick=win],
|
|
+ [cygwin*|msys*|mingw*], [nacl_cv_os_nick=win],
|
|
[nacl_cv_os_nick=$build_os])
|
|
|
|
host="$host_cpu-chromium-$host_os-"
|
|
@@ -460,14 +460,14 @@
|
|
ASFLAGS=$ASFLAGS
|
|
AC_SUBST(ASFLAGS)
|
|
|
|
-AS_CASE(["$target_os"],[cygwin*|mingw*], [ac_cv_prog_ac_ct_OBJCOPY=":"])
|
|
+AS_CASE(["$target_os"],[cygwin*|msys*|mingw*], [ac_cv_prog_ac_ct_OBJCOPY=":"])
|
|
|
|
# BSD's ports and MacPorts prefix GNU binutils with 'g'
|
|
AC_CHECK_TOOLS(OBJDUMP, [objdump gobjdump])
|
|
AC_CHECK_TOOLS(OBJCOPY, [objcopy gobjcopy])
|
|
|
|
AS_CASE(["$target_os"],
|
|
-[cygwin*|mingw*], [
|
|
+[cygwin*|msys*|mingw*], [
|
|
AC_CHECK_TOOL(WINDRES, windres)
|
|
AC_CHECK_TOOL(DLLWRAP, dllwrap)
|
|
target=`echo $target | sed "s/^$target_cpu-/-/"`
|
|
@@ -717,7 +717,7 @@
|
|
# comments. We bypass ANSI C mode for them. Otherwise
|
|
# extension libs cannot include those headers.
|
|
],
|
|
- [cygwin*|darwin*|netbsd*], [
|
|
+ [cygwin*|msys*|darwin*|netbsd*], [
|
|
# need lgamma_r(), finite()
|
|
],
|
|
[haiku], [
|
|
@@ -893,7 +893,7 @@
|
|
[haiku*], [ ac_cv_func_shutdown=no])
|
|
LIBS="$LIBS" # m lib is include in root under BeOS/Haiku
|
|
],
|
|
-[cygwin*], [ ac_cv_header_langinfo_h=yes
|
|
+[cygwin*|msys*], [ ac_cv_header_langinfo_h=yes
|
|
AC_CHECK_FUNCS(cygwin_conv_path)
|
|
AC_LIBOBJ([langinfo])
|
|
],
|
|
@@ -1685,7 +1685,7 @@
|
|
elif test "$ac_cv_func__setjmp" = yes; then
|
|
setjmp_prefix=_
|
|
elif test "$ac_cv_func_sigsetjmp" = yes; then
|
|
- AS_CASE([$target_os],[solaris*|cygwin*],[setjmp_prefix=],[setjmp_prefix=sig])
|
|
+ AS_CASE([$target_os],[solaris*|cygwin*|msys*],[setjmp_prefix=],[setjmp_prefix=sig])
|
|
else
|
|
setjmp_prefix=
|
|
fi
|
|
@@ -2255,7 +2255,7 @@
|
|
# mkmf.rb's have_header() to fail if the desired resource happens to be
|
|
# installed in the /usr/local tree.
|
|
RUBY_APPEND_OPTION(CCDLFLAGS, -fno-common)],
|
|
- [bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*], [ ],
|
|
+ [bsdi*|beos*|haiku*|cygwin*|msys*|mingw*|aix*|interix*], [ ],
|
|
[
|
|
RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)])
|
|
else
|
|
@@ -2390,9 +2390,9 @@
|
|
: ${LDSHARED='$(LD) -Bshareable -x'}
|
|
LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
|
|
rb_cv_dlopen=yes],
|
|
- [cygwin*|mingw*], [
|
|
+ [cygwin*|msys*|mingw*], [
|
|
: ${LDSHARED='$(CC) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)'}
|
|
- XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
|
|
+ XLDFLAGS="$XLDFLAGS -Xlinker --stack -Xlinker 0x00200000,0x00040000 -Xlinker --enable-auto-import"
|
|
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
|
|
: ${LIBPATHENV=""}
|
|
rb_cv_dlopen=yes],
|
|
@@ -2507,9 +2507,9 @@
|
|
[os2-emx*], [
|
|
LOAD_RELATIVE=1
|
|
DLEXT=dll],
|
|
- [cygwin*|mingw*|*djgpp*], [
|
|
+ [cygwin*|msys*|mingw*|*djgpp*], [
|
|
LOAD_RELATIVE=1
|
|
- DLEXT=so],
|
|
+ DLEXT=dll],
|
|
[
|
|
DLEXT=so])
|
|
fi
|
|
@@ -2647,7 +2647,7 @@
|
|
SOLIBS=
|
|
|
|
AS_CASE(["$target_os"],
|
|
- [cygwin*|mingw*|beos*|haiku*|darwin*|os2-emx*], [
|
|
+ [cygwin*|msys*|mingw*|beos*|haiku*|darwin*|os2-emx*], [
|
|
: ${DLDLIBS=""}
|
|
],
|
|
[
|
|
@@ -2780,7 +2780,7 @@
|
|
[interix*], [
|
|
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
|
|
],
|
|
- [mingw*|cygwin*|mswin*], [
|
|
+ [mingw*|cygwin*|msys*|mswin*], [
|
|
LIBRUBY_RELATIVE=yes
|
|
])
|
|
], [
|
|
@@ -2975,7 +2975,7 @@
|
|
AS_CASE(["$target_cpu"],[powerpc*], [CFLAGS="$CFLAGS -relax_pointers"])
|
|
CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
|
|
],
|
|
- [cygwin*|mingw*], [
|
|
+ [cygwin*|msys*|mingw*], [
|
|
RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)$(TEENY)'
|
|
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
|
|
AS_CASE(["$target_os"],
|
|
@@ -2985,6 +2985,12 @@
|
|
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
|
|
fi
|
|
],
|
|
+ [msys*], [
|
|
+ if test x"$enable_shared" = xyes; then
|
|
+ LIBRUBY_SO='msys-$(RUBY_SO_NAME)'.dll
|
|
+ LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
|
|
+ fi
|
|
+ ],
|
|
[mingw*], [
|
|
RUBY_SO_NAME="${rb_cv_msvcrt}-${RUBY_SO_NAME}"
|
|
if test x"${target_cpu}" != xi386; then
|
|
@@ -3210,7 +3216,7 @@
|
|
|
|
RUBY_INSTALL_NAME="${ri_prefix}"'$(RUBY_BASE_NAME)'"${ri_suffix}"
|
|
AS_CASE(["$target_os"],
|
|
- [cygwin*|mingw*], [
|
|
+ [cygwin*|msys*|mingw*], [
|
|
RUBYW_INSTALL_NAME="${ri_prefix}"'$(RUBYW_BASE_NAME)'"${ri_suffix}"
|
|
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
|
])
|
|
diff -Naur ruby-2.0.0-p353/cygwin/GNUmakefile.in ruby-2.0.0-p353-msys2/cygwin/GNUmakefile.in
|
|
--- ruby-2.0.0-p353/cygwin/GNUmakefile.in 2012-11-05 18:00:35.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/cygwin/GNUmakefile.in 2013-11-24 19:28:43.459622900 +0400
|
|
@@ -6,6 +6,8 @@
|
|
|
|
ifeq (@target_os@,cygwin)
|
|
DLL_BASE_NAME := $(LIBRUBY_SO:.dll=)
|
|
+else ifeq (@target_os@,msys)
|
|
+ DLL_BASE_NAME := $(LIBRUBY_SO:.dll=)
|
|
else
|
|
DLL_BASE_NAME := $(RUBY_SO_NAME)
|
|
DLLWRAP += -mno-cygwin
|
|
@@ -103,6 +105,12 @@
|
|
$(ECHO) generating $@
|
|
$(Q) @DLLWRAP@ -s --def=$(RUBYDEF) -o $@
|
|
endif
|
|
+
|
|
+ifeq (@target_os@,msys)
|
|
+msys2-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY).dll: $(LIBRUBY_A) $(RUBYDEF)
|
|
+ $(ECHO) generating $@
|
|
+ $(Q) @DLLWRAP@ -s --def=$(RUBYDEF) -o $@
|
|
+endif
|
|
|
|
clean-local::
|
|
@$(RM) $(RUBY_EXP) $(RCFILES:.rc=.res.@OBJEXT@)
|
|
diff -Naur ruby-2.0.0-p353/ext/dl/win32/extconf.rb ruby-2.0.0-p353-msys2/ext/dl/win32/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/dl/win32/extconf.rb 2012-12-11 07:02:04.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/dl/win32/extconf.rb 2013-11-24 19:28:43.462623100 +0400
|
|
@@ -1,3 +1,3 @@
|
|
-if compiled?('dl') and !compiled?('fiddle') and $mswin||$bccwin||$mingw||$cygwin
|
|
+if compiled?('dl') and !compiled?('fiddle') and $mswin||$bccwin||$mingw||$cygwin||$msys
|
|
create_makefile('win32')
|
|
end
|
|
diff -Naur ruby-2.0.0-p353/ext/etc/extconf.rb ruby-2.0.0-p353-msys2/ext/etc/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/etc/extconf.rb 2010-09-16 03:27:48.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/etc/extconf.rb 2013-11-24 19:28:43.465623200 +0400
|
|
@@ -22,7 +22,7 @@
|
|
$defs.push("-DPW_AGE2VAL="+f)
|
|
end
|
|
have_struct_member('struct passwd', 'pw_class', 'pwd.h')
|
|
- have_struct_member('struct passwd', 'pw_comment', 'pwd.h') unless /cygwin/ === RUBY_PLATFORM
|
|
+ have_struct_member('struct passwd', 'pw_comment', 'pwd.h') unless /cygwin|msys/ === RUBY_PLATFORM
|
|
have_struct_member('struct passwd', 'pw_expire', 'pwd.h')
|
|
have_struct_member('struct passwd', 'pw_passwd', 'pwd.h')
|
|
have_struct_member('struct group', 'gr_passwd', 'grp.h')
|
|
diff -Naur ruby-2.0.0-p353/ext/fiddle/win32/extconf.rb ruby-2.0.0-p353-msys2/ext/fiddle/win32/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/fiddle/win32/extconf.rb 2012-12-10 13:03:17.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/fiddle/win32/extconf.rb 2013-11-24 19:28:43.467623400 +0400
|
|
@@ -1,3 +1,3 @@
|
|
-if compiled?('fiddle') and $mswin||$mingw||$cygwin
|
|
+if compiled?('fiddle') and $mswin||$mingw||$cygwin||$msys
|
|
create_makefile('win32')
|
|
end
|
|
diff -Naur ruby-2.0.0-p353/ext/readline/extconf.rb ruby-2.0.0-p353-msys2/ext/readline/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/readline/extconf.rb 2013-02-01 09:37:29.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/readline/extconf.rb 2013-11-24 19:28:43.470623500 +0400
|
|
@@ -25,7 +25,7 @@
|
|
dir_config("readline")
|
|
enable_libedit = enable_config("libedit")
|
|
|
|
-have_library("user32", nil) if /cygwin/ === RUBY_PLATFORM
|
|
+have_library("user32", nil) if /cygwin|msys/ === RUBY_PLATFORM
|
|
have_library("ncurses", "tgetnum") ||
|
|
have_library("termcap", "tgetnum") ||
|
|
have_library("curses", "tgetnum")
|
|
diff -Naur ruby-2.0.0-p353/ext/socket/extconf.rb ruby-2.0.0-p353-msys2/ext/socket/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/socket/extconf.rb 2013-06-15 20:31:06.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/socket/extconf.rb 2013-11-24 19:28:43.474623800 +0400
|
|
@@ -6,7 +6,7 @@
|
|
when /(ms|bcc)win(32|64)|mingw/
|
|
test_func = "WSACleanup"
|
|
have_library("ws2_32", "WSACleanup")
|
|
-when /cygwin/
|
|
+when /cygwin|msys/
|
|
test_func = "socket"
|
|
when /beos/
|
|
test_func = "socket"
|
|
@@ -41,7 +41,7 @@
|
|
end
|
|
|
|
ipv6 = false
|
|
-default_ipv6 = /cygwin|beos|haiku/ !~ RUBY_PLATFORM
|
|
+default_ipv6 = /cygwin|msys|beos|haiku/ !~ RUBY_PLATFORM
|
|
if enable_config("ipv6", default_ipv6)
|
|
if checking_for("ipv6") {try_link(<<EOF)}
|
|
#include <sys/types.h>
|
|
@@ -116,7 +116,7 @@
|
|
$defs[-1] = "-DHAVE_SA_LEN "
|
|
end
|
|
|
|
-have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
|
|
+have_header("netinet/tcp.h") if /cygwin|msys/ !~ RUBY_PLATFORM # for cygwin 1.1.5
|
|
have_header("netinet/udp.h")
|
|
|
|
if !have_macro("IPPROTO_IPV6", headers) && have_const("IPPROTO_IPV6", headers)
|
|
diff -Naur ruby-2.0.0-p353/ext/tk/extconf.rb ruby-2.0.0-p353-msys2/ext/tk/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/tk/extconf.rb 2013-08-04 05:30:46.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/tk/extconf.rb 2013-11-24 19:28:43.478624000 +0400
|
|
@@ -107,7 +107,7 @@
|
|
# fuctions
|
|
##############################################################
|
|
def is_win32?
|
|
- /mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM
|
|
+ /mswin|mingw|bccwin/ =~ RUBY_PLATFORM
|
|
end
|
|
|
|
def is_macosx?
|
|
@@ -605,7 +605,7 @@
|
|
#puts "check #{file} #{$1} #{tclfunc} #{tcldir}"
|
|
#find_library($1, tclfunc, tcldir)
|
|
if (tclconf && tclconf["TCL_SHARED_BUILD"] == "0") ||
|
|
- (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"
|
|
+ (!tclconf && ((ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"))
|
|
# static link
|
|
tcllibs = $libs + " -DSTATIC_BUILD " + file.quote
|
|
|
|
@@ -648,7 +648,7 @@
|
|
#puts "check #{file} #{$1} #{tkfunc} #{tkdir}"
|
|
# find_library($1, tkfunc, tkdir)
|
|
if (tkconf && tkconf["TCL_SHARED_BUILD"] == "0") ||
|
|
- (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"
|
|
+ (!tkconf && ((ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"))
|
|
# static link
|
|
tklibs = " -DSTATIC_BUILD " + file.quote
|
|
|
|
@@ -1787,7 +1787,6 @@
|
|
print("\n") # progress
|
|
end
|
|
$CPPFLAGS ||= ""
|
|
-$CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
|
|
|
|
# Does ruby have nativethread ?
|
|
TkLib_Config["ruby_with_thread"] =
|
|
diff -Naur ruby-2.0.0-p353/ext/tk/lib/tk.rb ruby-2.0.0-p353-msys2/ext/tk/lib/tk.rb
|
|
--- ruby-2.0.0-p353/ext/tk/lib/tk.rb 2011-05-27 03:36:33.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/tk/lib/tk.rb 2013-11-24 19:28:43.496625000 +0400
|
|
@@ -1180,7 +1180,7 @@
|
|
if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!!
|
|
# *** NEED TO FIX ***
|
|
case RUBY_PLATFORM
|
|
- when /cygwin/
|
|
+ when /cygwin|msys/
|
|
RUN_EVENTLOOP_ON_MAIN_THREAD = true
|
|
when /darwin/ # MacOS X
|
|
=begin
|
|
diff -Naur ruby-2.0.0-p353/ext/tk/old-extconf.rb ruby-2.0.0-p353-msys2/ext/tk/old-extconf.rb
|
|
--- ruby-2.0.0-p353/ext/tk/old-extconf.rb 2009-07-13 06:43:44.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/tk/old-extconf.rb 2013-11-24 19:28:43.508625700 +0400
|
|
@@ -2,7 +2,7 @@
|
|
|
|
require 'mkmf'
|
|
|
|
-is_win32 = (/mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM)
|
|
+is_win32 = (/mswin|mingw|cygwin|msys|bccwin/ =~ RUBY_PLATFORM)
|
|
#is_macosx = (/darwin/ =~ RUBY_PLATFORM)
|
|
|
|
have_func("ruby_native_thread_p", "ruby.h")
|
|
@@ -405,7 +405,7 @@
|
|
find_tcl(tcllib, stubs, tclver, *tcl_ldir_list) &&
|
|
find_tk(tklib, stubs, tkver, *tk_ldir_list) ) )
|
|
$CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
|
|
- $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
|
|
+ $CPPFLAGS += ' -D_WIN32' if /cygwin|msys/ =~ RUBY_PLATFORM
|
|
|
|
if tcltk_framework
|
|
if tcl_framework_header
|
|
diff -Naur ruby-2.0.0-p353/ext/tk/stubs.c ruby-2.0.0-p353-msys2/ext/tk/stubs.c
|
|
--- ruby-2.0.0-p353/ext/tk/stubs.c 2012-07-09 19:52:49.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/tk/stubs.c 2013-11-24 19:28:43.512625900 +0400
|
|
@@ -71,7 +71,7 @@
|
|
|
|
#if defined USE_TCL_STUBS && defined USE_TK_STUBS
|
|
|
|
-#if defined _WIN32 || defined __CYGWIN__
|
|
+#if defined _WIN32
|
|
# ifdef HAVE_RUBY_RUBY_H
|
|
# include "ruby/util.h"
|
|
# else
|
|
@@ -100,6 +100,10 @@
|
|
# undef DLEXT
|
|
# define DLEXT ".dylib"
|
|
# endif
|
|
+# if defined(__CYGWIN__)
|
|
+# undef DLEXT
|
|
+# define DLEXT ".dll"
|
|
+# endif
|
|
#endif
|
|
|
|
static DL_HANDLE tcl_dll = (DL_HANDLE)0;
|
|
diff -Naur ruby-2.0.0-p353/ext/win32ole/extconf.rb ruby-2.0.0-p353-msys2/ext/win32ole/extconf.rb
|
|
--- ruby-2.0.0-p353/ext/win32ole/extconf.rb 2013-01-18 06:23:37.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/ext/win32ole/extconf.rb 2013-11-24 19:28:43.516626200 +0400
|
|
@@ -5,7 +5,7 @@
|
|
require 'mkmf'
|
|
|
|
case RUBY_PLATFORM
|
|
-when /cygwin/
|
|
+when /cygwin|msys/
|
|
inc = nil
|
|
lib = '/usr/lib/w32api'
|
|
end
|
|
diff -Naur ruby-2.0.0-p353/file.c ruby-2.0.0-p353-msys2/file.c
|
|
--- ruby-2.0.0-p353/file.c 2013-04-24 19:43:05.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/file.c 2013-11-24 19:28:43.521626400 +0400
|
|
@@ -4181,7 +4181,6 @@
|
|
|
|
#ifdef __CYGWIN__
|
|
#include <winerror.h>
|
|
-extern unsigned long __attribute__((stdcall)) GetLastError(void);
|
|
#endif
|
|
|
|
static VALUE
|
|
diff -Naur ruby-2.0.0-p353/lib/fileutils.rb ruby-2.0.0-p353-msys2/lib/fileutils.rb
|
|
--- ruby-2.0.0-p353/lib/fileutils.rb 2013-07-13 18:32:56.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/lib/fileutils.rb 2013-11-24 19:28:43.535627200 +0400
|
|
@@ -539,7 +539,7 @@
|
|
OPT_TABLE['move'] = [:force, :noop, :verbose, :secure]
|
|
|
|
def rename_cannot_overwrite_file? #:nodoc:
|
|
- /cygwin|mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
|
|
+ /cygwin|msys|mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
|
|
end
|
|
private_module_function :rename_cannot_overwrite_file?
|
|
|
|
diff -Naur ruby-2.0.0-p353/lib/mkmf.rb ruby-2.0.0-p353-msys2/lib/mkmf.rb
|
|
--- ruby-2.0.0-p353/lib/mkmf.rb 2013-08-03 18:08:18.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/lib/mkmf.rb 2013-11-24 19:39:11.633552400 +0400
|
|
@@ -120,7 +120,7 @@
|
|
$mswin = /mswin/ =~ RUBY_PLATFORM
|
|
$bccwin = /bccwin/ =~ RUBY_PLATFORM
|
|
$mingw = /mingw/ =~ RUBY_PLATFORM
|
|
- $cygwin = /cygwin/ =~ RUBY_PLATFORM
|
|
+ $cygwin = /cygwin|msys/ =~ RUBY_PLATFORM
|
|
$netbsd = /netbsd/ =~ RUBY_PLATFORM
|
|
$os2 = /os2/ =~ RUBY_PLATFORM
|
|
$beos = /beos/ =~ RUBY_PLATFORM
|
|
@@ -1774,6 +1774,12 @@
|
|
IO.popen(["cygpath", "-u", path], &:read).chomp
|
|
end
|
|
end
|
|
+ when 'msys'
|
|
+ if CONFIG['target_os'] != 'msys'
|
|
+ def mkintpath(path)
|
|
+ IO.popen(["cygpath", "-u", path], &:read).chomp
|
|
+ end
|
|
+ end
|
|
end
|
|
end
|
|
unless method_defined?(:mkintpath)
|
|
@@ -1790,7 +1796,7 @@
|
|
SHELL = /bin/sh
|
|
|
|
# V=0 quiet, V=1 verbose. other values don't work.
|
|
-V = 0
|
|
+V = 1
|
|
Q1 = $(V:1=)
|
|
Q = $(Q1:0=@)
|
|
ECHO1 = $(V:1=@#{CONFIG['NULLCMD']})
|
|
diff -Naur ruby-2.0.0-p353/lib/rake/application.rb ruby-2.0.0-p353-msys2/lib/rake/application.rb
|
|
--- ruby-2.0.0-p353/lib/rake/application.rb 2012-11-29 23:16:46.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/lib/rake/application.rb 2013-11-24 19:28:43.555628400 +0400
|
|
@@ -291,7 +291,7 @@
|
|
end
|
|
|
|
def unix?
|
|
- RbConfig::CONFIG['host_os'] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
|
|
+ RbConfig::CONFIG['host_os'] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|msys|solaris|irix|hpux)/i
|
|
end
|
|
|
|
def windows?
|
|
diff -Naur ruby-2.0.0-p353/lib/resolv.rb ruby-2.0.0-p353-msys2/lib/resolv.rb
|
|
--- ruby-2.0.0-p353/lib/resolv.rb 2011-10-31 16:03:49.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/lib/resolv.rb 2013-11-24 19:28:43.558628600 +0400
|
|
@@ -923,7 +923,7 @@
|
|
if File.exist? filename
|
|
config_hash = Config.parse_resolv_conf(filename)
|
|
else
|
|
- if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
|
|
+ if /mswin|cygwin|msys|mingw|bccwin/ =~ RUBY_PLATFORM
|
|
require 'win32/resolv'
|
|
search, nameserver = Win32::Resolv.get_resolv_info
|
|
config_hash = {}
|
|
diff -Naur ruby-2.0.0-p353/lib/rubygems/platform.rb ruby-2.0.0-p353-msys2/lib/rubygems/platform.rb
|
|
--- ruby-2.0.0-p353/lib/rubygems/platform.rb 2013-07-22 20:33:18.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/lib/rubygems/platform.rb 2013-11-24 19:28:43.561628700 +0400
|
|
@@ -68,6 +68,7 @@
|
|
@os, @version = case os
|
|
when /aix(\d+)?/ then [ 'aix', $1 ]
|
|
when /cygwin/ then [ 'cygwin', nil ]
|
|
+ when /msys/ then [ 'msys', nil ]
|
|
when /darwin(\d+)?/ then [ 'darwin', $1 ]
|
|
when /^macruby$/ then [ 'macruby', nil ]
|
|
when /freebsd(\d+)?/ then [ 'freebsd', $1 ]
|
|
diff -Naur ruby-2.0.0-p353/lib/rubygems.rb ruby-2.0.0-p353-msys2/lib/rubygems.rb
|
|
--- ruby-2.0.0-p353/lib/rubygems.rb 2013-11-13 06:59:08.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/lib/rubygems.rb 2013-11-24 19:28:43.566629000 +0400
|
|
@@ -120,6 +120,7 @@
|
|
WIN_PATTERNS = [
|
|
/bccwin/i,
|
|
/cygwin/i,
|
|
+ /msys/i,
|
|
/djgpp/i,
|
|
/mingw/i,
|
|
/mswin/i,
|
|
diff -Naur ruby-2.0.0-p353/test/dbm/test_dbm.rb ruby-2.0.0-p353-msys2/test/dbm/test_dbm.rb
|
|
--- ruby-2.0.0-p353/test/dbm/test_dbm.rb 2012-02-19 18:44:36.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/dbm/test_dbm.rb 2013-11-24 19:28:43.572629400 +0400
|
|
@@ -21,6 +21,13 @@
|
|
raise 'cannot get system name' if uname.call(utsname) == -1
|
|
|
|
utsname.unpack('A20' * 5)[0]
|
|
+ when 'msys'
|
|
+ require 'Win32API'
|
|
+ uname = Win32API.new('msys-2.0', 'uname', 'P', 'I')
|
|
+ utsname = ' ' * 100
|
|
+ raise 'cannot get system name' if uname.call(utsname) == -1
|
|
+
|
|
+ utsname.unpack('A21' * 5)[0]
|
|
else
|
|
RbConfig::CONFIG['target_os']
|
|
end
|
|
diff -Naur ruby-2.0.0-p353/test/dl/test_base.rb ruby-2.0.0-p353-msys2/test/dl/test_base.rb
|
|
--- ruby-2.0.0-p353/test/dl/test_base.rb 2013-10-09 19:20:42.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/dl/test_base.rb 2013-11-24 19:28:43.575629500 +0400
|
|
@@ -9,6 +9,9 @@
|
|
when /cygwin/
|
|
libc_so = "cygwin1.dll"
|
|
libm_so = "cygwin1.dll"
|
|
+when /msys/
|
|
+ libc_so = "msys-2.0.dll"
|
|
+ libm_so = "msys-2.0.dll"
|
|
when /x86_64-linux/
|
|
libc_so = "/lib64/libc.so.6"
|
|
libm_so = "/lib64/libm.so.6"
|
|
diff -Naur ruby-2.0.0-p353/test/fiddle/helper.rb ruby-2.0.0-p353-msys2/test/fiddle/helper.rb
|
|
--- ruby-2.0.0-p353/test/fiddle/helper.rb 2013-10-09 19:20:42.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/fiddle/helper.rb 2013-11-24 19:28:43.578629700 +0400
|
|
@@ -10,6 +10,9 @@
|
|
when /cygwin/
|
|
libc_so = "cygwin1.dll"
|
|
libm_so = "cygwin1.dll"
|
|
+when /msys/
|
|
+ libc_so = "msys-2.0.dll"
|
|
+ libm_so = "msys-2.0.dll"
|
|
when /x86_64-linux/
|
|
libc_so = "/lib64/libc.so.6"
|
|
libm_so = "/lib64/libm.so.6"
|
|
diff -Naur ruby-2.0.0-p353/test/gdbm/test_gdbm.rb ruby-2.0.0-p353-msys2/test/gdbm/test_gdbm.rb
|
|
--- ruby-2.0.0-p353/test/gdbm/test_gdbm.rb 2012-07-25 10:49:35.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/gdbm/test_gdbm.rb 2013-11-24 19:28:43.581629900 +0400
|
|
@@ -21,6 +21,13 @@
|
|
raise 'cannot get system name' if uname.call(utsname) == -1
|
|
|
|
utsname.unpack('A20' * 5)[0]
|
|
+ when 'msys'
|
|
+ require 'Win32API'
|
|
+ uname = Win32API.new('msys-2.0', 'uname', 'P', 'I')
|
|
+ utsname = ' ' * 100
|
|
+ raise 'cannot get system name' if uname.call(utsname) == -1
|
|
+
|
|
+ utsname.unpack('A21' * 5)[0]
|
|
else
|
|
RbConfig::CONFIG['target_os']
|
|
end
|
|
diff -Naur ruby-2.0.0-p353/test/ruby/test_argf.rb ruby-2.0.0-p353-msys2/test/ruby/test_argf.rb
|
|
--- ruby-2.0.0-p353/test/ruby/test_argf.rb 2012-12-24 04:45:26.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/ruby/test_argf.rb 2013-11-24 19:28:43.584630100 +0400
|
|
@@ -54,7 +54,7 @@
|
|
end
|
|
|
|
def no_safe_rename
|
|
- /cygwin|mswin|mingw|bccwin/ =~ RUBY_PLATFORM
|
|
+ /cygwin|msys|mswin|mingw|bccwin/ =~ RUBY_PLATFORM
|
|
end
|
|
|
|
def assert_src_expected(line, src, args = nil)
|
|
diff -Naur ruby-2.0.0-p353/test/ruby/test_file_exhaustive.rb ruby-2.0.0-p353-msys2/test/ruby/test_file_exhaustive.rb
|
|
--- ruby-2.0.0-p353/test/ruby/test_file_exhaustive.rb 2013-10-17 21:09:07.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/ruby/test_file_exhaustive.rb 2013-11-24 19:28:43.589630300 +0400
|
|
@@ -128,7 +128,7 @@
|
|
assert_nothing_raised { File.stat(File.basename(prefix)) }
|
|
end
|
|
end
|
|
- end if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
|
|
+ end if /mswin|mingw|cygwin|msys/ =~ RUBY_PLATFORM
|
|
|
|
def test_directory_p
|
|
assert(File.directory?(@dir))
|
|
@@ -176,7 +176,7 @@
|
|
end
|
|
|
|
def test_readable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0200, @file)
|
|
assert(!(File.readable?(@file)))
|
|
@@ -186,7 +186,7 @@
|
|
end
|
|
|
|
def test_readable_real_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0200, @file)
|
|
assert(!(File.readable_real?(@file)))
|
|
@@ -196,7 +196,7 @@
|
|
end
|
|
|
|
def test_world_readable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0006, @file)
|
|
assert(File.world_readable?(@file))
|
|
File.chmod(0060, @file)
|
|
@@ -207,7 +207,7 @@
|
|
end
|
|
|
|
def test_writable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0400, @file)
|
|
assert(!(File.writable?(@file)))
|
|
@@ -217,7 +217,7 @@
|
|
end
|
|
|
|
def test_writable_real_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0400, @file)
|
|
assert(!(File.writable_real?(@file)))
|
|
@@ -227,7 +227,7 @@
|
|
end
|
|
|
|
def test_world_writable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0006, @file)
|
|
assert(File.world_writable?(@file))
|
|
File.chmod(0060, @file)
|
|
@@ -238,7 +238,7 @@
|
|
end
|
|
|
|
def test_executable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0100, @file)
|
|
assert(File.executable?(@file))
|
|
File.chmod(0600, @file)
|
|
@@ -247,7 +247,7 @@
|
|
end
|
|
|
|
def test_executable_real_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0100, @file)
|
|
assert(File.executable_real?(@file))
|
|
File.chmod(0600, @file)
|
|
@@ -276,7 +276,7 @@
|
|
end
|
|
|
|
def test_owned_p ## xxx
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
assert(File.owned?(@file))
|
|
assert(File.grpowned?(@file))
|
|
end
|
|
@@ -337,7 +337,7 @@
|
|
end
|
|
|
|
def test_chmod
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
assert_equal(1, File.chmod(0444, @file))
|
|
assert_equal(0444, File.stat(@file).mode % 01000)
|
|
assert_equal(0, File.open(@file) {|f| f.chmod(0222)})
|
|
@@ -347,7 +347,7 @@
|
|
end
|
|
|
|
def test_lchmod
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
assert_equal(1, File.lchmod(0444, @file))
|
|
assert_equal(0444, File.stat(@file).mode % 01000)
|
|
File.lchmod(0600, @file)
|
|
@@ -406,7 +406,7 @@
|
|
end
|
|
|
|
def test_umask
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
prev = File.umask(0777)
|
|
assert_equal(0777, File.umask)
|
|
open(@nofile, "w") { }
|
|
@@ -418,7 +418,7 @@
|
|
|
|
def test_expand_path
|
|
assert_equal(@file, File.expand_path(File.basename(@file), File.dirname(@file)))
|
|
- if /cygwin|mingw|mswin|bccwin/ =~ RUBY_PLATFORM
|
|
+ if /cygwin|msys|mingw|mswin|bccwin/ =~ RUBY_PLATFORM
|
|
assert_equal(@file, File.expand_path(@file + " "))
|
|
assert_equal(@file, File.expand_path(@file + "."))
|
|
assert_equal(@file, File.expand_path(@file + "::$DATA"))
|
|
@@ -742,7 +742,7 @@
|
|
assert_equal("foo", File.basename("foo", ".ext"))
|
|
assert_equal("foo", File.basename("foo.ext", ".ext"))
|
|
assert_equal("foo", File.basename("foo.ext", ".*"))
|
|
- if /cygwin|mingw|mswin|bccwin/ =~ RUBY_PLATFORM
|
|
+ if /cygwin|msys|mingw|mswin|bccwin/ =~ RUBY_PLATFORM
|
|
basename = File.basename(@file)
|
|
assert_equal(basename, File.basename(@file + " "))
|
|
assert_equal(basename, File.basename(@file + "."))
|
|
@@ -791,7 +791,7 @@
|
|
infixes = ["", " ", "."]
|
|
infixes2 = infixes + [".ext "]
|
|
appendixes = [""]
|
|
- if /cygwin|mingw|mswin|bccwin/ =~ RUBY_PLATFORM
|
|
+ if /cygwin|msys|mingw|mswin|bccwin/ =~ RUBY_PLATFORM
|
|
appendixes << " " << "." << "::$DATA" << "::$DATA.bar"
|
|
end
|
|
prefixes.each do |prefix|
|
|
@@ -925,7 +925,7 @@
|
|
assert_equal(true, test(?=, @file, @file))
|
|
assert_equal(false, test(?>, @file, @file))
|
|
assert_equal(false, test(?<, @file, @file))
|
|
- unless /cygwin/ =~ RUBY_PLATFORM
|
|
+ unless /cygwin|msys/ =~ RUBY_PLATFORM
|
|
assert_equal(false, test(?=, @file, @file + "2"))
|
|
assert_equal(false, test(?>, @file, @file + "2"))
|
|
assert_equal(true, test(?>, @file + "2", @file))
|
|
@@ -1019,7 +1019,7 @@
|
|
end
|
|
|
|
def test_stat_readable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0200, @file)
|
|
assert(!(File::Stat.new(@file).readable?))
|
|
@@ -1028,7 +1028,7 @@
|
|
end
|
|
|
|
def test_stat_readable_real_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0200, @file)
|
|
assert(!(File::Stat.new(@file).readable_real?))
|
|
@@ -1037,7 +1037,7 @@
|
|
end
|
|
|
|
def test_stat_world_readable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0006, @file)
|
|
assert(File::Stat.new(@file).world_readable?)
|
|
File.chmod(0060, @file)
|
|
@@ -1047,7 +1047,7 @@
|
|
end
|
|
|
|
def test_stat_writable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0400, @file)
|
|
assert(!(File::Stat.new(@file).writable?))
|
|
@@ -1056,7 +1056,7 @@
|
|
end
|
|
|
|
def test_stat_writable_real_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
return if Process.euid == 0
|
|
File.chmod(0400, @file)
|
|
assert(!(File::Stat.new(@file).writable_real?))
|
|
@@ -1065,7 +1065,7 @@
|
|
end
|
|
|
|
def test_stat_world_writable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0006, @file)
|
|
assert(File::Stat.new(@file).world_writable?)
|
|
File.chmod(0060, @file)
|
|
@@ -1075,7 +1075,7 @@
|
|
end
|
|
|
|
def test_stat_executable_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0100, @file)
|
|
assert(File::Stat.new(@file).executable?)
|
|
File.chmod(0600, @file)
|
|
@@ -1083,7 +1083,7 @@
|
|
end
|
|
|
|
def test_stat_executable_real_p
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
File.chmod(0100, @file)
|
|
assert(File::Stat.new(@file).executable_real?)
|
|
File.chmod(0600, @file)
|
|
@@ -1108,7 +1108,7 @@
|
|
end
|
|
|
|
def test_stat_owned_p ## xxx
|
|
- return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ return if /cygwin|msys|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
|
|
assert(File::Stat.new(@file).owned?)
|
|
assert(File::Stat.new(@file).grpowned?)
|
|
end
|
|
diff -Naur ruby-2.0.0-p353/test/ruby/test_path.rb ruby-2.0.0-p353-msys2/test/ruby/test_path.rb
|
|
--- ruby-2.0.0-p353/test/ruby/test_path.rb 2011-10-26 10:24:29.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/ruby/test_path.rb 2013-11-24 19:28:43.609631500 +0400
|
|
@@ -47,7 +47,7 @@
|
|
end
|
|
|
|
def test_dirname
|
|
- if /(bcc|ms)win\d|mingw|cygwin|emx/ =~ RUBY_PLATFORM
|
|
+ if /(bcc|ms)win\d|mingw|cygwin|msys|emx/ =~ RUBY_PLATFORM
|
|
# DOSISH_DRIVE_LETTER
|
|
assert_equal('C:.', File.dirname('C:'))
|
|
assert_equal('C:.', File.dirname('C:a'))
|
|
@@ -103,7 +103,7 @@
|
|
assert_equal('/', File.dirname('/a/'))
|
|
assert_equal('/a', File.dirname('/a/b'))
|
|
|
|
- if /(bcc|ms|cyg)win|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ if /(bcc|ms|cyg)win|msys|mingw|emx/ =~ RUBY_PLATFORM
|
|
# DOSISH_UNC
|
|
assert_equal('//', File.dirname('//'))
|
|
assert_equal('//a', File.dirname('//a'))
|
|
@@ -137,7 +137,7 @@
|
|
end
|
|
|
|
def test_basename
|
|
- if /(bcc|ms)win\d|mingw|cygwin|emx/ =~ RUBY_PLATFORM
|
|
+ if /(bcc|ms)win\d|mingw|cygwin|msys|emx/ =~ RUBY_PLATFORM
|
|
# DOSISH_DRIVE_LETTER
|
|
assert_equal('', File.basename('C:'))
|
|
assert_equal('a', File.basename('C:a'))
|
|
@@ -193,7 +193,7 @@
|
|
|
|
assert_equal("..", File.basename("..", ".*"))
|
|
|
|
- if /(bcc|ms|cyg)win|mingw|emx/ =~ RUBY_PLATFORM
|
|
+ if /(bcc|ms|cyg)win|msys|mingw|emx/ =~ RUBY_PLATFORM
|
|
# DOSISH_UNC
|
|
assert_equal('/', File.basename('//'))
|
|
assert_equal('/', File.basename('//a'))
|
|
diff -Naur ruby-2.0.0-p353/test/rubygems/test_gem_platform.rb ruby-2.0.0-p353-msys2/test/rubygems/test_gem_platform.rb
|
|
--- ruby-2.0.0-p353/test/rubygems/test_gem_platform.rb 2012-11-29 10:52:18.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/rubygems/test_gem_platform.rb 2013-11-24 19:28:43.612631700 +0400
|
|
@@ -45,6 +45,7 @@
|
|
'universal-darwin9' => ['universal', 'darwin', '9'],
|
|
'universal-macruby' => ['universal', 'macruby', nil],
|
|
'i386-cygwin' => ['x86', 'cygwin', nil],
|
|
+ 'i386-msys' => ['x86', 'msys', nil],
|
|
'i686-darwin' => ['x86', 'darwin', nil],
|
|
'i686-darwin8.4.1' => ['x86', 'darwin', '8'],
|
|
'i386-freebsd4.11' => ['x86', 'freebsd', '4'],
|
|
diff -Naur ruby-2.0.0-p353/test/socket/test_addrinfo.rb ruby-2.0.0-p353-msys2/test/socket/test_addrinfo.rb
|
|
--- ruby-2.0.0-p353/test/socket/test_addrinfo.rb 2012-10-30 04:40:54.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/socket/test_addrinfo.rb 2013-11-24 19:28:43.615631800 +0400
|
|
@@ -6,7 +6,7 @@
|
|
require "test/unit"
|
|
|
|
class TestSocketAddrinfo < Test::Unit::TestCase
|
|
- HAS_UNIXSOCKET = defined?(UNIXSocket) && /cygwin/ !~ RUBY_PLATFORM
|
|
+ HAS_UNIXSOCKET = defined?(UNIXSocket) && /cygwin|msys/ !~ RUBY_PLATFORM
|
|
|
|
def tcp_unspecified_to_loopback(addrinfo)
|
|
if addrinfo.ipv4? && addrinfo.ip_address == "0.0.0.0"
|
|
diff -Naur ruby-2.0.0-p353/test/socket/test_unix.rb ruby-2.0.0-p353-msys2/test/socket/test_unix.rb
|
|
--- ruby-2.0.0-p353/test/socket/test_unix.rb 2013-01-31 08:59:31.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/socket/test_unix.rb 2013-11-24 19:28:43.618632000 +0400
|
|
@@ -598,4 +598,4 @@
|
|
assert(s0.closed?)
|
|
end
|
|
|
|
-end if defined?(UNIXSocket) && /cygwin/ !~ RUBY_PLATFORM
|
|
+end if defined?(UNIXSocket) && /cygwin|msys/ !~ RUBY_PLATFORM
|
|
diff -Naur ruby-2.0.0-p353/test/webrick/test_cgi.rb ruby-2.0.0-p353-msys2/test/webrick/test_cgi.rb
|
|
--- ruby-2.0.0-p353/test/webrick/test_cgi.rb 2013-08-16 19:39:43.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/test/webrick/test_cgi.rb 2013-11-24 19:31:24.031807100 +0400
|
|
@@ -20,7 +20,7 @@
|
|
end
|
|
},
|
|
}
|
|
- if RUBY_PLATFORM =~ /mswin|mingw|cygwin|bccwin32/
|
|
+ if RUBY_PLATFORM =~ /mswin|mingw|cygwin|msys|bccwin32/
|
|
config[:CGIPathEnv] = ENV['PATH'] # runtime dll may not be in system dir.
|
|
end
|
|
TestWEBrick.start_httpserver(config){|server, addr, port, log|
|
|
@@ -40,7 +40,7 @@
|
|
req = Net::HTTP::Get.new("/webrick.cgi/%A4%DB%A4%B2/%A4%DB%A4%B2")
|
|
# Path info of res.body is passed via ENV.
|
|
# ENV[] returns different value on Windows depending on locale.
|
|
- unless RUBY_PLATFORM =~ /mswin|mingw|cygwin|bccwin32/ &&
|
|
+ unless RUBY_PLATFORM =~ /mswin|mingw|cygwin|msys|bccwin32/ &&
|
|
Encoding.find("locale") != Encoding.find("filesystem")
|
|
http.request(req){|res|
|
|
assert_equal("/\xA4\xDB\xA4\xB2/\xA4\xDB\xA4\xB2", res.body, log.call)}
|
|
diff -Naur ruby-2.0.0-p353/tool/config.guess ruby-2.0.0-p353-msys2/tool/config.guess
|
|
--- ruby-2.0.0-p353/tool/config.guess 2012-01-29 17:50:18.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/tool/config.guess 2013-11-24 19:28:43.627632500 +0400
|
|
@@ -846,6 +846,9 @@
|
|
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
|
echo x86_64-unknown-cygwin
|
|
exit ;;
|
|
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
|
|
+ echo x86_64-unknown-msys
|
|
+ exit ;;
|
|
p*:CYGWIN*:*)
|
|
echo powerpcle-unknown-cygwin
|
|
exit ;;
|
|
diff -Naur ruby-2.0.0-p353/win32/mkexports.rb ruby-2.0.0-p353-msys2/win32/mkexports.rb
|
|
--- ruby-2.0.0-p353/win32/mkexports.rb 2012-11-12 09:29:52.000000000 +0400
|
|
+++ ruby-2.0.0-p353-msys2/win32/mkexports.rb 2013-11-24 19:28:43.633632900 +0400
|
|
@@ -158,6 +158,30 @@
|
|
end
|
|
end
|
|
|
|
+class Exports::Msys < Exports
|
|
+ def self.nm
|
|
+ @@nm ||= RbConfig::CONFIG["NM"]
|
|
+ end
|
|
+
|
|
+ def exports(*)
|
|
+ super()
|
|
+ end
|
|
+
|
|
+ def each_line(objs, &block)
|
|
+ IO.foreach("|#{self.class.nm} --extern --defined #{objs.join(' ')}", &block)
|
|
+ end
|
|
+
|
|
+ def each_export(objs)
|
|
+ symprefix = RbConfig::CONFIG["SYMBOL_PREFIX"]
|
|
+ symprefix.strip! if symprefix
|
|
+ re = /\s(?:(T)|[[:upper:]])\s#{symprefix}((?!Init_|.*_threadptr_|DllMain\b).*)$/
|
|
+ objdump(objs) do |l|
|
|
+ next if /@.*@/ =~ l
|
|
+ yield $2, !$1 if re =~ l
|
|
+ end
|
|
+ end
|
|
+end
|
|
+
|
|
class Exports::Mingw < Exports::Cygwin
|
|
def each_export(objs)
|
|
super
|