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

1329 Коммитов

Автор SHA1 Сообщение Дата
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