Граф коммитов

1495 Коммитов

Автор SHA1 Сообщение Дата
usa de59178aaf * win32/win32.c (winnt_stat): use `numberof` macro instead of constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 08:13:42 +00:00
usa 5d6ace6121 Fixed potentially buffer overrun.
* win32/win32.c (winnt_stat): the return value of `get_final_path` is the
  expected buffer length, not the actuall filled length.

* win32/win32.c (winnt_stat): `finalname` may be accessed in the outer block of
  its definition via `path`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 07:50:14 +00:00
usa ca25a970d6 Fixed link error with VC14.
* win32/mkexports.rb (Exports::Mswin#each_exports): should ignore `vsprintf_s_l`
  and the like just like `vsprintf_l`.
  [ruby-dev:49899] [Bug #13033]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14 17:49:26 +00:00
nobu 9db0b2d7ee win32.c: suppress warning
* win32/win32.c (rb_w32_home_dir): suppress sequence-point
  warning, REALLOC_N re-assigns the variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 03:19:33 +00:00
usa 3826f17790 const pointer is not able to be free.
* win32/file.c (rb_default_home_dir): should not be marked as const.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 02:03:40 +00:00
nobu 6b88dd2698 file.c: home directory from system
* file.c (rb_default_home_dir): resolve home directory from the
  system database when HOME is not set.  [Feature #12695]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 11:37:01 +00:00
nobu 58742627af win32.c: special folders as home dir
* win32/win32.c (rb_w32_home_dir): move from win32/file.c to try
  special folders.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26 11:37:01 +00:00
nobu 79ca0925b4 install-static-library option [ci skip]
* win32/configure.bat: add option to enable/disable to install
  static ruby library.  defaulted to "no".  [Feature #12845]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-17 07:20:39 +00:00
usa c82d87444b * win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets
errno internally, then should not set it here.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-30 17:03:48 +00:00
usa a334693422 * win32/Makefile.sub (config.h): fixed compile error with VC introduced
by previous commit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-16 10:47:54 +00:00
usa ee0a79b37f * win32/win32.c (rb_w32_write_console): should set writen length as the
return value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-11 10:08:01 +00:00
nobu 8e0601b7e5 win32/file.c: use ALLOC_N
* win32/file.c (home_dir, replace_to_long_name): use ALLOC_N
  instead of casted xmalloc with multiplication.

win32/file.c (rb_file_expand_path_internal): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-25 02:57:41 +00:00
nobu 70d840afd5 win32/file.h: rb_w32_filecp
* win32/file.h (rb_w32_filecp): add declaration.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-25 02:11:19 +00:00
nobu 638f67211b win32/file.c: remove a codepage argument
* win32/file.c (append_wstr): remove a codepage argument, and use
  INVALID_CODE_PAGE for conversion by econv.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-24 15:42:33 +00:00
nobu b34321a221 win32/file.c: fix result length
* win32/file.c (append_wstr): exclude the terminator from the
  result length when input len == -1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-24 15:39:52 +00:00
nobu a3b84cff15 win32/file.c: use enum
* win32/file.c (home_dir): use enum instead of magic numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-24 13:04:36 +00:00
nobu 9b454bfaf3 rubystub
* rubystub.c: generalize win32/stub.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-20 02:20:34 +00:00
nobu 51d30645a2 win32.c: no newline for rb_fatal
* win32/win32.c (StartSockets): rb_fatal does not need a newline
  at the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-20 02:19:19 +00:00
nobu c6bf047267 Revert r55968 "scriptbin on cygwin"
win32/stub.c only works with malloced argv as win32/win32.c, to
realloc it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-19 08:32:16 +00:00
nobu 7f7e809a45 scriptbin on cygwin
* cygwin/GNUmakefile.in (scriptbin): enable on cygwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-19 08:01:20 +00:00
nobu 2e11bf259c common.mk: MAKE_ENC
* common.mk (MAKE_ENC): arguments for enc.mk

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 08:41:59 +00:00
nobu 743c279d70 win32.c: initialize with an impossible value
* win32/win32.c (getifaddrs, rb_w32_getppid): initialize the API
  pointers with an impossible value not to try everytime on old
  platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:31:23 +00:00
nobu 518af61ba6 win32.c: static API pointers
* win32/win32.c (rb_w32_inet_ntop, rb_w32_inet_): make the
  API pointers static not to get the address everytime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:28:03 +00:00
nobu bd46ad2195 win32.c: call get_final_path pointer
* win32/win32.c (get_final_path): initialize this pointer without
  further comparisons.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:22:35 +00:00
usa 441cbf59f5 * win32/win32.c (set_pioinfo_extra): use more reliable way to search
the position of pioinfo of VC14, and also support debug library of it.
  patched by davispuh AT gmail.com
  [ruby-core:76644] [Bug #12644]
  this fixes also [Bug #12631]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-01 19:12:28 +00:00
nobu a325876ad3 Fix Issues reported by PVS-Studio static analyzer
* vm.c (vm_set_main_stack): remove unnecessary check.  toplevel
  binding must be initialized.  [Bug #12611] (N1)
* win32/win32.c (w32_symlink): fix return type.  [Bug #12611] (N3)
* string.c (rb_str_split_m): simplify the condition.
  [Bug #12611](N4)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 10:55:22 +00:00
nobu ba1d0ea6a8 common.mk: INCFLAGS
* common.mk (INCFLAGS): move from Makefile.in.

* win32/Makefile.sub (XCFLAGS): missing directory is not
  neccessary as an include path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-16 12:41:23 +00:00
nobu 35ff4064e8 Makefile.sub: update enc/unicode/name2ctype.h
* win32/Makefile.sub (enc/unicode/name2ctype.h): remove stale recipe.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 10:45:33 +00:00
svn e4a27f25c5 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-11 16:30:04 +00:00
usa 5e1ee25ad8 * configure.in, lib/mkmf.rb, win32/Makefile.sub (CSRCFLAG): make the
compiler option replacable in Makefile.

* win32/Makefile.sub (OUTFLAG, COUTFLAG): ditto.

* win32/Makeile.sub, win32/setup.mak (CC): should not append `-nologo`
  option forcely.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-11 16:30:03 +00:00
nobu 8361dab9cb VC6 error
* win32/win32.c (GetSystemWindowsDirectoryW): use
  GetWindowsDirectoryW for VC6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-29 04:37:14 +00:00
nobu 6e6a8c02af Fix calling convention
* win32/win32.c (get_special_folder): fix calling convention of
  SHGetPathFromIDListEx, which should be WINAPI.  pointed out by
  @arton at http://twitter.com/arton/status/744884064277016576

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-20 15:56:49 +00:00
nobu f4d18f524c ifchange.bat: drop old systems
* win32/ifchange.bat: drop support for command.com used on old
  systems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-09 06:31:11 +00:00
nobu 5820c6a3ce win32.c: use PATH_MAX
* win32/win32.c: unify MAX_PATH, _MAX_PATH, and MAXPATHLEN to
  PATH_MAX, except for MAX_PATH in get_special_folder for an API
  limit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-04 01:38:41 +00:00
nobu f0ead75ff1 win32.c: fail before getting ITEMIDLIST
* win32/win32.c (get_special_folder): fail before getting
  ITEMIDLIST if the buffer is less than 260 word which
  SHGetPathFromIDListW requires.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-03 13:38:27 +00:00
usa b30bbc38fc * win32/win32.c (get_special_folder): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-03 08:52:03 +00:00
nobu 0661411671 win32.c: use SHGetPathFromIDListEx
* win32/win32.c (get_special_folder): use SHGetPathFromIDListEx if
  available instead of old SHGetPathFromIDListW, to check the
  buffer size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02 12:18:12 +00:00
nobu a8bfa9bdf1 use system crypt
* configure.in: revert r55237.  replace crypt, not crypt_r, and
  check if crypt is broken more.
* missing/crypt.c: move crypt_r.c
* string.c (rb_str_crypt): use crypt_r if provided by the system.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01 06:58:21 +00:00
usa b9e0cd4899 * win32/Makefile.sub (MISSING): fixed build error introduced at r55237.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01 02:35:36 +00:00
nobu 0d123232e5 win32.c: RUBY_CRITICAL
* win32/win32.c (RUBY_CRITICAL): removed the argument but make
  just a block which does nothing, so that debuggers can step into
  the block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-29 04:10:28 +00:00
naruse ceea7ecef9 * configure.in (ALWAYS_INLINE): force compilers the function inlined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21 13:24:32 +00:00
nobu d6d8ea91e9 win32: qsort_s
* win32/Makefile.sub (HAVE_QSORT_S): disable on VS2012 too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 16:39:24 +00:00
usa 98c084b8ba * win32/Makefile.sub (HAVE_QSORT_S): use qsort_s only for Visual Studio
2012 or later, because VS2010 seems to causes a SEGV in
  test/ruby/test_enum.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 15:21:49 +00:00
nobu be4b1c1e2c util.c: qsort_s
* util.c (ruby_qsort): use qsort_s if available, for Microsoft
  Visual Studio 2005 (msvcr80.dll) and mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 08:18:56 +00:00
usa 3e5dc499a8 * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements new
truncate alternative which accepts UTF-8 path.

* file.c (truncate): use above function.
  [Bug #12340]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-02 14:05:19 +00:00
usa 54916154a0 * win32/win32.c: drop Win2K support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 12:00:35 +00:00
usa 62b6e90d58 * cont.c, hash.c, random.c, win32/win32.c: cleanup some Win9x/ME/NT4
support leftovers.
  [fix GH-1328] patched by @cremno


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 11:42:41 +00:00
nobu f9602ee315 win32/win32.c: remove unnecessary declaration
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-29 00:56:44 +00:00
nobu 9ef7c87d67 win32/file.c: fix reallocation threshold
* win32/file.c (replace_to_long_name): fix reallocation threshold.
  dereferenced size of a pointer is not same as the buffer size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-28 06:54:05 +00:00
nobu 1e775c18e5 win32/file.c: remove unnecessary code
* win32/file.c (replace_to_long_name): remove unnecessary backward
  scan for the last directory separator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-28 06:54:03 +00:00
nobu cc0ffc5517 win32.c: suppress warnings
* win32/win32.c (set_pioinfo_extra): remove "/*" within comment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-24 01:10:29 +00:00
naruse 9afc312b4f Support MSVC14 and 15 [Bug #11118]
Search _pioinfo which is not exported after MSVC14.
[Bug #12014] [GH-884]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-23 18:46:26 +00:00
hsbt 48d22f8360 * file.c, win32/file.c: Removed obsoleted safe level checks.
[fix GH-1327] Patch by @cremno

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-22 01:43:31 +00:00
nobu 75dc429f3e win32/file.c: fix free
* win32/file.c (rb_file_expand_path_internal): should free wpath,
  but not xfree, corresponding to rb_w32_mbstr_to_wstr which
  allocates by malloc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-10 07:30:42 +00:00
nobu a3239b5bec win32.c: call w32_wopen directly
* win32/win32.c (rb_w32_uopen): call w32_wopen directly instead of
  variadic rb_w32_wopen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-07 12:14:29 +00:00
usa 96e0b7d45f * win32/win32.c (rb_w32_write_console): remove unused variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-08 23:00:32 +00:00
usa b0b2df253f * win32/win32.c (rb_w32_write_console): now no need to check
ERROR_CALL_NOT_IMPLEMENTED because it is for old Win9X.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-08 08:34:35 +00:00
usa 693b335326 * win32/win32.c (rb_w32_write_console): stop the VT100 emulation if the
console supports it natively.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-08 07:55:48 +00:00
nobu 59d92b548b update-rubyspec: show latest commit
* Makefile.in, win32/Makefile.sub (update-mspec, update-rubyspec):
  ensure the latest commits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-07 06:24:46 +00:00
nobu eee616315d win32.c: reuse fullpath buffer
* win32/win32.c (open_dir_handle): reuse the fullpath buffer
  instead of allocating another buffer for copy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02 05:43:44 +00:00
nobu 0f19e79b87 win32.c: w32_wopendir
* win32/win32.c (w32_wopendir): remove filename parameter, and
  check the drive letter in wpath instead.  rename from
  opendir_internal.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01 15:06:17 +00:00
nobu 94cfa2893c win32.c: volume_prefix_len
* win32/win32.c (rb_w32_read_reparse_point): name the prefix
  length to be dropped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01 12:08:08 +00:00
nobu 19162d268b win32.c: suffix should be alnum
* win32/win32.c (fileattr_to_unixmode): built-in executable
  suffixes are alpha-numeric only, no needs to scan whole path,
  especially path separators.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01 08:14:03 +00:00
nobu 1664a4ca03 win32.c: move counting length
* win32/win32.c (opendir_internal): defer counting the length just
  before the loop where it is used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01 06:25:21 +00:00
nobu ec943ac668 win32/file.c: drop garbage
* win32/file.c (rb_readlink): drop garbage after the substitute
  name, as rb_w32_read_reparse_point returns the expected buffer
  size but "\??\" prefix is dropped from the result.
* win32/win32.c (w32_readlink): ditto, including NUL-terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 08:41:10 +00:00
usa 47f6196cf0 * win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
mount point should be treated as directory, not symlink.
  [ruby-core:72483] [Bug #11874]

* win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
  a volume mount point or not.

* win32/file.c (rb_readlink): follow above change (but this pass won't
  be used).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 08:13:42 +00:00
nobu ac55501368 configure.bat: put a space
* win32/configure.bat: put a space after replaced string to get
  rid of something weird sometimes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-23 02:15:56 +00:00
shugo d735054a07 * win32/configure.bat: set svn:eol-style to CRLF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 15:49:49 +00:00
svn 7ceffa0259 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 15:13:17 +00:00
nobu cf8e95cc6e configure.bat: fix strange goto
* win32/configure.bat: get rid of wrong goto destination by
  putting something before LF.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 15:13:16 +00:00
svn bd4930686b * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 14:40:48 +00:00
nobu 1d9cb2191f configure.bat: set eol-style
* win32/configure.bat: should be CRLF eol-style.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 14:40:47 +00:00
svn ba7f85f833 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 14:28:33 +00:00
nobu 98eae5d71e configure.bat: --with-libdir
* win32/configure.bat: add --with-libdir option for basename of
  libdir.  on Windows it must be placed under exec_prefix always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-22 14:28:31 +00:00
nobu e48375c112 common.mk: update-remote
* common.mk (update-remote): update by downloading remote files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-19 02:30:17 +00:00
nobu 445e11da50 probes.h including dummy header
* Makefile.in, win32/Makefile.sub (probes.h): include dummy header
  instead of copying.

* common.mk (probes.dmyh): add nmake VPATH prefix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 03:32:43 +00:00
nobu a4c091a697 fix rc files conflict in parallel build
* cygwin/GNUmakefile.in (%.rc): generate .rc files separately to
  get rid of conflict in parallel build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 02:46:31 +00:00
nobu d43ef66b12 RUBY_PROGRAM_VERSION from RUBY_VERSION
* configure.in, win32/setup.mak: extract RUBY_PROGRAM_VERSION from
  RUBY_VERSION in version.h instead of RUBY_API_VERSION numbers in
  include/ruby/version.h, and cut it into version numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 01:44:56 +00:00
nobu 1fbfa7180b RUBY_RELEASE_DATE in verconf.mk
* win32/setup.mak (verconf.mk): extract RUBY_RELEASE_DATE without
  quotation marks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 00:23:04 +00:00
nobu 34b1c7ddd6 fix library teeny
* configure.in, win32/Makefile.sub: fix teeny of library version
  to 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 00:20:46 +00:00
nobu bc8a7f9ab7 revert r53459, r53427, r53314
Revert "* tool/make-snapshot: fix for the changes of version.h in r53314."
Revert "* version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of"
Revert "program version from API version"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-09 00:19:16 +00:00
nobu 8c327b7f3a program version from API version
* configure.in, version.h (RUBY_PROGRAM_VERSION): extract version
  numbers from API version in include/ruby/version.h except for
  TEENY, to save matz job next year.
* win32/setup.mak (-version-): use program version.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-25 16:24:43 +00:00
nobu 00a47cf678 setup.mak: split release date
* win32/setup.mak (verconf.mk): split release date into year,
  month, and day.

* common.mk (RUBY_RELEASE_DATE): move from Makefile.in to share
  with win32/setup.mak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-25 15:02:14 +00:00
nobu 59fc842601 setup.mak: follow up r53310
* win32/setup.mak (verconf.mk): no longer appends, and escape
  dollar.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-25 14:50:26 +00:00
nobu fd236be28f setup.mak: follow up r53303
* win32/setup.mak (verconf.mk): follow up r53303.  needs STRINGIZE
  now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-25 14:46:27 +00:00
nobu bf52a8b6c4 Fix cross build
* tool/fake.rb: Fix cross build when srcdir is an absolute path.
* Makefile.in: PREP dependency is needed when cross build too, not
  "-r$(arch)-fake" to be  used before created.  [Fix GH-1125]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05 08:48:28 +00:00
nobu 9fcfaa8da4 win32.c: fix argument type
* win32/win32.c (dupfd): promote argument type for old VC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01 04:25:06 +00:00
nobu 24dcb1285d explicit_bzero.c: needs windows.h
* missing/explicit_bzero.c, random.c (explicit_bzero):
  SecureZeroMemory() needs windows.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01 03:52:20 +00:00
usa 2e865ba81e * win32/win32.c (finish_overlapped_socket): return value of this
function should be only 0 or SOCKET_ERROR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 05:16:13 +00:00
usa 01a54cf40f * win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input,
because POSIX platforms just do so.  fixes test errors revealed by
  r52647.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 04:59:50 +00:00
usa 508addd7e0 * win32/win32.c (fstat): declare for mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 10:50:28 +00:00
kosaki 3a48e12607 * numeric.c: Good-by Borland-C.
* include/ruby/backward/rubyio.h: ditto.
* include/ruby/backward/st.h: ditto.
* include/ruby/backward/util.h: ditto.
* include/ruby/backward/rubysig.h: ditto.
* include/ruby/backward/classext.h: ditto.
* dln.c: ditto.
* gc.c: ditto.
* win32/resource.rb: ditto.
* win32/dir.h: ditto.
* ext/tk/tcltklib.c: ditto.
* NEWS: announce that Borland-C is no longer supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:10:34 +00:00
nobu abf832f435 file.c: non-blocking open
* file.c (rb_file_load_ok): open in non-blocking mode withoout
  releasing GVL.  don't care about others than regular files and
  directories.  [ruby-dev:49272] [Bug #11559]
* ruby.c (load_file_internal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-16 06:54:38 +00:00
nobu f213f5044e win32.c: fallback to WCHAR-version in MSVCRT
* win32/win32.c (rb_w32_open): should not fallback to ANSI-version
  in MSVCRT, fallback to WCHAR-version in rb_w32_wopen instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-22 11:59:47 +00:00
nobu 70b2af3b21 win32.c: no xmalloc at sys_init
* win32/win32.c (rb_w32_sysinit, rb_w32_readdir): compare by
  encoding index to get rid of encoding initialization before VM
  object space allocation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-15 06:15:44 +00:00
nobu 9c9d555e7f win32.c: encindex.h
* win32/win32.c: needs encindex.h for encoding indexes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-15 06:03:37 +00:00
nobu f6d77bf560 win32.c: fix dup2 return value
* win32/win32.c (rb_w32_dup2): should return the new fd on
  success, while msvcrt returns 0 wrongly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 10:09:03 +00:00
nobu f150a381db win32.c: more fcntl
* win32/win32.c (fcntl): implement F_GETFD, F_SETFD, and
  F_DUPFD_CLOEXEC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 05:23:22 +00:00
usa 49cbfc8359 * win32/win32.c (rb_w32_read_reparse_point): return correct required
buffer size for IO_REPARSE_TAG_MOUNT_POINT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-08 03:06:10 +00:00
nobu 4e43e7ad0d win32.c: use plain strdup
* win32/win32.c (insert): should use plain strdup() instead of
  ruby_strdup() at startup time, and plain free()ed in cmdglob().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-07 13:05:31 +00:00
nobu 649016bdb1 win32.c: suppress a warning
* win32/win32.c (get_attr_vsn): assume GetLastError() never return
  0, to suppress a maybe-uninitialized warning in wrename().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 23:14:25 +00:00
nobu 441de1b376 Makefile.sub: more warnig flags
* win32/Makefile.sub (WARNFLAGS): disable some too verbose
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 01:38:50 +00:00
nobu f9ac2106bf file.c: use filesystem encoding
* file.c (rb_realpath_internal): use filesystem encoding if the
  argument is in ASCII encodings.
* win32/file.c (rb_readlink): needs the result encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 07:58:24 +00:00
nobu 6bbd9104cb win32: use ALLOCV
* win32/file.c (rb_readlink): use ALLOCV to get rid potential
  memory leak by NoMemoryError in ALLOCV.

* win32/win32.c (w32_readlink): allocate WCHAR path name and
  reparse buffer together.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 04:14:42 +00:00
nobu d93855e6ef win32.c: suppress warnings
* win32/win32.c (fchmod): put braces to suppress missing-braces
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 11:35:09 +00:00
nobu b072900780 win32.c: suppress warnings
* win32/win32.c (wrename): fix type of attributes to suppress
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 11:34:53 +00:00
nobu 262b10210f win32.c: fchmod
* win32/win32.c (fchmod): implement by using
  SetFileInformationByHandle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 04:01:37 +00:00
nobu a2da0f7e42 win32.c: get attributes and VSN at once
* win32/win32.c (wrename): get attributes and VSN at once for each
  path names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 03:58:10 +00:00
nobu f64d6357b6 win32.c: open_special
* win32/win32.c (open_special): extract to open existing file with
  backup semantics.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 03:57:56 +00:00
nobu b79d7910f5 win32.c: use backslashes
* win32/win32.c (w32_symlink): must use backslashes instead of
  slashes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 17:24:32 +00:00
nobu 8504c817e3 win32.c: ELOOP at wrename
* win32/win32.c (wrename): fail with ELOOP if failed to resolve
  the old path name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 16:22:56 +00:00
nobu a25de2c6e1 win32.c: fix return value of reparse_symlink
* win32/win32.c (reparse_symlink): return raw Windows error code
  since r51676.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 16:01:48 +00:00
nobu 91f5ee89ef win32.c: unlink symlinkd
* win32/win32.c (wunlink): SYMLINKD has to be removed as a
  directory but not a file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 14:46:29 +00:00
nobu 14ae6199bf win32.c: fix for old platforms
* win32/win32.c (open_dir_handle): fix for old platforms where
  GetFinalPathNameByHandleW is not supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 14:12:43 +00:00
nobu 8e6259e0d9 win32.c: find by final path
* win32/win32.c (open_dir_handle): find by final path name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 08:11:33 +00:00
nobu dd67521bd1 win32.c: ELOOP by _wopen
* win32/win32.c (rb_w32_wopen): map the exact error for ELOOP when
  EINVAL is returned by _wopen of vc runtime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 06:53:32 +00:00
nobu 597da7b2d0 win32.c: fake lchown
* win32/win32.c (lchown, rb_w32_ulchown): fake lchown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 05:21:41 +00:00
nobu f4b66d24bb win32.c: ELOOP
* win32/win32.c (errmap): map ERROR_CANT_RESOLVE_FILENAME to
  ELOOP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 04:47:37 +00:00
nobu 14aed229ea win32.c: fix offset
* win32/win32.c (opendir_internal): fix offset not to overwrite a
  backslash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-25 05:11:35 +00:00
nobu 2f6fdd3aeb win32.c: rb_w32_reparse
* win32/win32.c (rb_w32_reparse): read reparse point in a dynamic
  buffer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-25 05:11:19 +00:00
nobu 2e5c105ff2 win32.c: symlink
* win32/win32.c (w32_symlink): implement symlink().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-24 21:34:45 +00:00
nobu 457ca4dc29 win32.c: licenses
* win32/win32.c (rb_w32_wreadlink, rb_w32_wopen): add missing
  licenses.  [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-24 08:55:09 +00:00
nobu 18d8ba2594 Makefile.sub: link libraries for extensions
* win32/Makefile.sub ($(LIBRUBY_SO)): needs additional libraries
  for extension libraries to link statically.
  [ruby-core:70499] [Feature #9018]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 10:48:19 +00:00
nobu 82da3da5ac win32.c: support known reparse points only
* dir.c (replace_real_basename), win32/win32.c (opendir_internal):
  check reparse point tags and treat supported tags only as
  symbolic links.  [ruby-core:70454] [Bug #11462]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 23:31:19 +00:00
nobu 006fad3fe3 win32.c: support known reparse points only
* win32/win32.c (winnt_lstat): check reparse point tags and treat
  supported tags only as symbolic links.
  [ruby-core:70454] [Bug #11462]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 14:48:09 +00:00
nobu 3c402604db win32.c: use ruby_strdup
* win32/win32.c (getifaddrs): use ruby_strdup instead of
  combination ruby_xmalloc, lstrlen and lstrcpy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-10 05:19:25 +00:00
nobu e60d35e302 win32/file.c: use allocv buffer and API
* win32/file.c (rb_freopen): convert path name into allocv buffer
  and get rid of conversion failure in the case non-terminated
  string.  [ruby-core:69780] [Bug #11320]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-02 05:15:02 +00:00
nobu 1f22556040 internal.h: moved RClass
* internal.h (struct RClass): moved from ruby/ruby.h to hide the
  internals.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-28 01:32:15 +00:00
nobu 9a26485e40 Makefile.sub: fix clean-ext
* win32/Makefile.sub (clean-ext): fix usage of for /R, and adjust
  messages as other platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-27 01:55:58 +00:00
nobu 4c4d0389f5 ruby.h: ASSUME
* include/ruby/ruby.h (ASSUME): hint for optimization, the
  expression is assumed to be true always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22 11:27:46 +00:00
nobu e9cb9d1060 Makefile.sub: UNREACHABLE
* win32/Makefile.sub (config.h): define UNREACHABLE by __assume.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21 11:29:12 +00:00
nobu 613d97c525 win32.c: symlink constants fallback
* win32/win32.c (rb_w32_wreadlink): define symlink constants for
  VC6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21 10:51:56 +00:00
nobu 4ba1038af3 rtname.cmd: extract at once
* win32/rtname.cmd: extract runtime DLL names at once, and other
  refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 08:13:18 +00:00
usa b3544b2551 * win32/win32.c (waitpid): fixed return value of previous commit. thanks, nobu!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-09 06:38:16 +00:00
usa fcb79d5324 * win32/win32.c (waitpid): return immediately if interrupted.
reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-09 06:10:47 +00:00
nobu 3e5988b29d file.c: _wfreopen_s on mingw
* win32/file.c: some mingw compilers need a tweek for the
  declarations of _wfreopen_s.  [Bug #11320]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-03 05:30:21 +00:00
nobu 24a72a177d file.c: not xfree
* win32/file.c (rb_freopen): should free rb_w32_mbstr_to_wstr
  result instead of xfree.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 14:04:00 +00:00
usa b4718bf4f0 * win32/file.c (rb_freopen): remove debug code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 09:41:40 +00:00
usa 3e01334fae * win32/file.c (rb_freopen): need to terminate by NUL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 09:38:51 +00:00
nobu 93446fedd3 io.c: reopen OS encoding path
* io.c (rb_io_reopen): freopen(3) with OS encoding path.
  [ruby-core:69780] [Bug #11320]
* win32/file.c (rb_freopen): wrapper of wchar version freopen(3).
  use _wfreopen_s() if available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 08:28:28 +00:00
nobu a2cd78a559 win32.c: use numberof
* win32/win32.c (open_dir_handle): use numberof() macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22 00:21:34 +00:00
hsbt 5d6ca9e950 * include/ruby/ruby.h: $SAFE=2 is now obsolete.
* dir.c, ext/fiddle/handle.c, ext/socket/basicsocket.c, file.c
  gc.c, io.c, process.c, safe.c, signal.c, win32/file.c:
  removed code for $SAFE=2
* test/erb/test_erb.rb, test/fiddle/test_handle.rb
  test/ruby/test_env.rb: removed tests for $SAFE=2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18 14:21:03 +00:00
nobu 0b3ef899f2 file.c: open without gvl
* file.c (rb_file_load_ok): try opening file without gvl not to
  lock entire process.  [Bug #11060]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14 08:20:43 +00:00
naruse 4ff07119e9 * file.c (rb_stat_ino): get inode from the interval of struct st.
* win32/win32.c (stati64_set_inode): get nFilIndexHigh/Low, and set it
  to the interval of struct st as inode.

* win32/win32.c (stati64_set_inode_handle): call stati64_set_inode.

* win32/win32.c (rb_w32_fstati64): call stati64_set_inode_handle.

* win32/win32.c (stati64_handle): call stati64_set_inode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13 11:46:38 +00:00
usa 2bc2802096 * file.c (File::SHARE_DELETE): new flag to be able to delete opened file
on Windows.

* include/win32/win32.c (O_SHARE_DELETE): new pseudo file mode flag.

* win32/win32.c (rb_w32_{w,}open): support above flag.  [EXPERIMENTAL]

* NEWS: mention about this feature.
  [Feature #11218] [ruby-dev:49022]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12 12:14:06 +00:00
naruse d4bafbb45f * win32/win32.c (setup_overlapped): seek to the file end only when
writing (mode:a), not reading (mode:a+, read).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-25 02:35:31 +00:00
nobu 8b5ffc3683 win32.c: suppress a warning
* win32/win32.c (rb_w32_write_console): fix the type to suppress a
  warning of difference in signedness.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 11:07:18 +00:00
usa 7ceb9ecc31 * win32/win32.c (rb_w32_write_console): should return the count of
actually eaten characters, include escape sequences.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22 18:13:32 +00:00
usa 3f4aab1621 * win32/win32.c (constat_apply): fixed comment. [skip ci]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22 17:37:15 +00:00
nobu c4d216793b intern.h: rb_f_notimplement for ext on Windows
* include/ruby/intern.h (rb_f_notimplement): should not respond to
  not-implemented methods.  as the address inside a DLL and the
  imported address are different on Windows, use an exported
  variable to share the same address.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18 06:31:42 +00:00
usa 4eb4f1fd7e * win32/win32.c (rb_w32_accept): simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16 11:00:07 +00:00
nobu 75319221a2 dln.c: fix EXTERNAL_PREFIX
* configure.in (EXPORT_PREFIX): revert r50410.

* dln.c (EXTERNAL_PREFIX): define by predefined macros.
  configured EXPORT_PREFIX is different thing.

* win32/Makefile.sub: r50414-50415.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-01 07:27:03 +00:00
nobu e15f8b2273 Makefile.sub: EXPORT_PREFIX
* win32/Makefile.sub (config.h): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-01 06:57:17 +00:00
nobu 3f5daebcb8 Makefile.sub: EXPORT_PREFIX
* win32/Makefile.sub (config.h): add EXPORT_PREFIX for r50410.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-01 06:46:59 +00:00
usa 347d44ca41 * win32/win32.c: restore a license comment accidentally removed at r50381.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24 14:48:24 +00:00
nobu d6d393d268 win32.c: fix for mingw
* win32/win32.c (_pioinfo): necessary on mingw too.

* win32/win32.c (init_stdhandle): remove stale function for
  Borland C.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24 04:16:13 +00:00
usa c15a74f3d0 * win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for old
ruby (before 1.8), but not now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24 01:44:12 +00:00
naruse 7bf5ba1b49 * win32/win32.c: remove bcc related code.
* include/ruby/win32.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23 23:41:16 +00:00
naruse 9892a4b1ae * win32/win32.c (rb_acrt_lowio_lock_fh): wrap _pioinfo(i)->lock.
* win32/win32.c (rb_acrt_lowio_unlock_fh): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23 23:41:10 +00:00
naruse 3446537f1a * win32/win32.c (_filbuf): msvc14 doesn't have it, use _fgetc_nolock.
* win32/win32.c (_flsbuf): msvc14 doesn't have it, use _fputc_nolock.

* win32/win32.c (vcruntime_file): define vcruntime_file on msvc14
  because it doesn't export FILE's internal structure.

* win32/win32.c (FILE_COUNT): added to abstract FILE->_cnt.

* win32/win32.c (FILE_READPTR): added to abstract FILE->_ptr.

* win32/win32.c (FILE_FILENO): added to abstract FILE->_file.

* win32/win32.c (init_stdhandle): use FILE_FILENO.

* win32/win32.c (rb_w32_getc): use FILE_COUNT and FILE_READPTR.

* win32/win32.c (rb_w32_putc): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23 22:58:11 +00:00
naruse cc622e2ac5 * win32/win32.c (dupfd): use _set_osfhnd.
* win32/win32.c (rb_w32_wopen): use _set_osflags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23 22:58:05 +00:00
naruse 1e4172467f * win32/Makefile.sub: MSVC14 have struct timespec.
* win32/rtname.cmd: support vcruntime140.dll.

* time.c (localtime_with_gmtoff_zone): MSVC14 doesn't have tzname and
  daylight but have _tzname and _daylight.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23 19:51:18 +00:00
usa b38a8d287c * win32/win32.c (rb_w32_wreadlink): follow the official format of
REPARSE_DATA_BUFFER structure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20 14:48:09 +00:00
usa 596f081d68 * win32/win32.c (rb_w32_wreadlink): fixed a bug that a junktion misses
its drive letter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20 06:04:28 +00:00
nobu aceb11dff4 mkmf.rb: fix werror option
* lib/mkmf.rb (try_compile): pass the given werror flag to try_do
  to check if stderr is empty.
* lib/mkmf.rb (try_cflags, try_ldflags): default werror to true.
* win32/Makefile.sub (WERRORFLAG): remove useless option.  VC does
  not make warnings of unknown command option an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 13:29:23 +00:00
usa 9a968078bc * win32/Makefile.sub (WERRORFLAG): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 04:37:00 +00:00
nobu 54264f534a ext/date: reject unknown compiler option
* ext/date/extconf.rb: check warnings.
* lib/mkmf.rb (try_cflags): pass options to try_compile.
* win32/Makefile.sub (WERRORFLAG): make unknown command line
  options an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 02:44:12 +00:00
usa d7abb533e2 * win32/win32.c (rb_w32_wreadlink): should treat junctions like as
symlinks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-08 05:58:34 +00:00
nobu 34c83a37c2 stub.o: under win32
* cygwin/GNUmakefile.in, win32/Makefile.sub (stub.o): make under
  win32 directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 01:02:51 +00:00
nobu 8bead23815 stub.c: utf-8
* win32/stub.c (stub_sysinit): encode in UTF-8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 01:01:17 +00:00
nobu 8fb5a1aceb stub.c: use argv[0] unchanged
* win32/stub.c (stub_sysinit): use argv[0] unchanged and just
  insert full path name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 01:00:45 +00:00
nobu 921bca8969 win32.c: symlink than directory
* win32/win32.c (fileattr_to_unixmode, winnt_lstat): deal with
  symbolic link than directory, and set executable bits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30 05:42:44 +00:00
nobu 5dc51d821e file.c: include terminator
* win32/file.c (rb_readlink): include the terminator, since
  rb_w32_mbstr_to_wstr appends a terminator only when the length
  is not given explicitly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30 05:27:21 +00:00
nobu 2ffb87995a file.c: move rb_readlink on Windows
* win32/file.c (rb_readlink): move from file.c for better buffer
  allocation and the result encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 12:22:10 +00:00
nobu c57932f782 win32.c: readlink
* win32/win32.c (wreadlink, rb_w32_ureadlink): implement readlink().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 08:36:04 +00:00
nobu d503d6c7ae win32.c: fix DLL name
* win32/win32.c (winnt_stat): fix DLL name to "kernel32".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 06:44:44 +00:00
nobu f5b96e594c win32.c: w32_lstati64
* win32/win32.c (winnt_stat): stat with following symbolic links.
* win32/win32.c (winnt_lstat): rename old winnt_stat, which does
  not follow symbolic links.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 05:40:48 +00:00
nobu cfa3ebf47c file.c: check arguments lengths
* win32/file.c (rb_file_expand_path_internal): check arguments
  lengths and should not loose preci quielty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22 04:54:35 +00:00
nobu 0109f86871 win32.c: path_drive
* win32/win32.c (path_drive): extract from winnt_stat, return the
  drive number in the path, or the current drive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22 02:26:54 +00:00
nobu d26965fcdb win32.c: stat_by_find
* win32/win32.c (stat_by_find): extract from winnt_stat.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22 02:26:28 +00:00
nobu 8670fc560b win32.c: stati64_handle
* win32/win32.c (stati64_handle): extract from rb_w32_fstati64.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22 02:23:21 +00:00
nobu c6985abdd1 win32.c: name_for_stat
* win32/win32.c (name_for_stat): extract from rb_w32_stat.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22 02:23:03 +00:00
nobu 5155a402ab win32.c: S_IFLNK
* win32/win32.c (fileattr_to_unixmode): set symlink for reparse
  points.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-19 02:38:02 +00:00
nobu e2853f5d81 win32.c: no S_IWGRP and S_IWOTH
* win32/win32.c (fileattr_to_unixmode): do not set S_IWGRP and
  S_IWOTH reset in wstati64.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-19 02:37:59 +00:00
nobu 00f7db376c dir.h: direct::d_type
* dir.c (glob_helper): use d_type to reduce lstat system calls.
* win32/dir.h (struct direct): add d_type instead of d_isdir and
  d_isrep.  SYMLINKD is unreliable, since the target can be
  replaced after a link was created.
* win32/win32.c (readdir_internal): set d_type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-14 03:23:56 +00:00
nobu 5b06e83345 dir.c: glob short names
* dir.c (glob_helper): match patterns against legacy short names
  too, not only ordinary names.  [ruby-core:67954] [Bug #10819]
* win32/dir.h (struct direct): add short name members.
* win32/win32.c (opendir_internal, readdir_internal): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 07:57:38 +00:00
nobu db24cb705d miniinit.c: minimum built-in encodings in miniruby
* common.mk (MINIOBJS): no longer need dmyenc.o.

* miniinit.c (Init_enc): declare minimum built-in encodings so
  that these Encoding constants will be available in miniruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 06:30:32 +00:00
nobu 65f2103b46 Makefile.sub: RUBY_PROGRAM_VERSION
* win32/Makefile.sub (config.status): now RUBY_PROGRAM_VERSION is
  necessary for fake.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 02:25:26 +00:00
nobu cdcae92de9 common.mk: same fake.rb
* common.mk (fake.rb): generate from same template on all
  platforms including win32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:24 +00:00
nobu aa68fd85b9 expand-config.rb: without fake.rb
* win32/Makefile.sub (ruby_pc): without fake.rb.

* tool/expand-config.rb: no longer depends on fake.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:18 +00:00
nobu 6268830ba8 mkconfig.rb: without fake.rb
* tool/mkconfig.rb: use arguments instead of built-in constants
  to work without fake.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:11 +00:00
nobu e9f3a59e85 configure.in: BOOTSTRAPRUBY
* configure.in (BOOTSTRAPRUBY): baseruby if cross compiling or
  miniruby, anyway runnable ruby command.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:06 +00:00
nobu c8141a8158 win32.c: reduce memory size
* win32/win32.c (szInternalCmds): reduce memory size, from 506 on
  32bit and 702 on 64bit to 490 bytes, and remove relocations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 04:51:39 +00:00
nobu 556515bf69 Makefile.in: make static IDs symbols local
* Makefile.in (LIBRUBY_SO): make symbols for static IDs which
  begin with ruby_static_id_ local too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-23 07:05:23 +00:00
nobu a75668a202 win32.c: volume serial numbers
* win32/win32.c (different_device_p): compare by volume serial
  numbers, not by path names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20 08:19:26 +00:00
nobu 0998c2dd06 win32/file.c: fix drive letter
* win32/file.c (rb_file_expand_path_internal): neither the drive
  of base directory nor the current drive are involved in the
  result if different than the drive of path.
  [ruby-core:68130] [Bug #10858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-18 16:58:13 +00:00
nobu cc7e5eb7d9 win32.c: EXDEV for directory
* win32/win32.c (wrename): return EXDEV if moving a directory to
  another drive, since MoveFileExW does not set proper error code.
  [ruby-core:68162] [Bug #10865]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-18 01:48:58 +00:00
nobu f7a73f3e8b win32/file.c: fix drive letter
* win32/file.c (rb_file_expand_path_internal): do not make invalid
  (or ADS) path if the path has a drive letter, the result also
  should have be under it.  [ruby-core:68130] [Bug #10858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 01:53:32 +00:00
nobu c73f2d28b4 rmdirs.bat: remove last "."
* win32/rmdirs.bat: remove last "." since rmdir fails to remove it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-22 00:14:40 +00:00
nobu fbbf3afc11 builtin encodings and transcoder locations
* Makefile.in (VPATH, NEWLINE_C), common.mk (common-srcs): make
  and use newline.c under enc/trans directory, not toplevel.  no
  longer search enc directory implicitly.
* configure.in, enc/Makefile.in (BUILTIN_ENCS, BUILTIN_TRANSES):
  prefix respective directory names to builtin encodings and
  transcoder source names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-18 03:56:52 +00:00