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

1160 Коммитов

Автор SHA1 Сообщение Дата
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
nobu 859f3d14ed never-NULL pointer check
* dir.c (ruby_glob0): no need to check never-NULL pointer.
  reported by Denis Denisov <denji0k AT gmail.com>.
* win32/file.c (rb_file_expand_path_internal): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26 05:51:36 +00:00
nobu ea9ff28f80 win32: realloc failures
* win32/file.c (code_page_i): handle realloc failure.
  reported by Denis Denisov <denji0k AT gmail.com>.
* win32/stub.c (stub_sysinit): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26 05:48:12 +00:00
nobu fa13cb050d win32: suppress warnings
* win32/file.c (home_dir, code_page_i): parenthesize to suppress
  warnings.

* win32/win32.c (is_command_com, join_argv, w32_cmdvector, kill),
  (constat_attr_color_reverse, constat_attr): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 10:18:35 +00:00
usa 396e3da75d * win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also
`cmd`, so must not free before using `cmd`.
  [ruby-core:66648] [Bug #10563]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 02:16:42 +00:00
nobu 15cfc9553a common.mk: rebuild verconf.h for each configure
* win32/Makefile.sub (verconf.h): so depends on verconf.mk, which
  is rebuilt by setup.mak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 08:20:45 +00:00
nobu 33ea2646b9 win32.c: use UTF-8 for argv
* ruby.c (ruby_set_argv): convert argv from UTF-8.
* win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert
  wide char command line to UTF-8 argv, and glob in UTF-8 so that
  metacharacters would match multibyte characters.
  [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 07:53:17 +00:00
nobu a35a256bad win32.c: convert by Win32 API
* win32/win32.c (win32_direct_conv, rb_w32_readdir): convert UTF-8
  and filesystem code page by using Win32 API directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29 01:49:26 +00:00
nobu e5df8e7bb3 common.mk: INITOBJS
* common.mk (INITOBJS): rename DMYEXT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 20:04:48 +00:00
nobu 28ad79fac3 dmyenc.c: separate
* dmyenc.c (Init_enc): separate from dmyext.c for statically
  linked extension excluding encoding libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 20:02:32 +00:00
nobu 2e7ed8032d win32.c: for non-standard console
* win32/win32.c (constat_reset): do nothing on non-standard
  console emurators.  [ruby-core:66471] [Bug #10546]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 10:54:35 +00:00
nobu 4ecdc8f545 common.mk: use PWD with nmake
* common.mk (ext/ripper/ripper.c): move MAKEDIR to Makefile.sub.

* win32/Makefile.sub (PWD): set to $(MAKEDIR), nmake built-in macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 15:58:35 +00:00
usa 539b39af23 * win32/Makefile.sub (top_srcdir): added because lacking this macro causes
build error at r48526.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 05:27:07 +00:00
usa 56d8b8701d * win32/win32.c (rb_w32_write): should set the error of
GetOverlappedResult()'s, not WriteFile()'s (it's always
  ERROR_IO_PENDING, of course).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18 22:46:13 +00:00
usa e9885185c4 * rb_w32_fstat{,i64}: speed up. adjuting timestamps in this function
is to get rid of the side effect of ENV["TZ"].  then, if ENV["TZ"] is
  not set, no need to adjust.  this change makes File#stat about 60%
  faster.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 03:18:00 +00:00
nobu 50ad0f58bb * win32/Makefile.sub (prelude.c): search from source directory,
not depending on VPATH, in parallel to r35135.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 10:29:00 +00:00
nobu 0d70c707ae win32.c: user name
* win32/win32.c (init_env): save USER environment variable in
  login name if it is set.  [ruby-core:66163] [Bug #10493]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 14:24:53 +00:00
usa 1b0cbb6ae0 * win32/win32.c (rb_w32_read): retry with reduced length if cannot to
write any data but no error occurs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 11:21:42 +00:00
usa fd9f6bde95 * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): new
function to support nonblock-mode of pipes.

* win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA
  if there is no data, but also returns it if remote-end is closed.

* win32/win32.c (rb_w32_write): if cannot to write any data, it may be
  blocking.

* io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows.

* ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when
  setting nonblock-mode.

* test/ruby/test_io.rb: test nonblock pipes on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 10:42:19 +00:00
nobu 6ccf3d68c2 win32.c: login name encoding
* ext/etc/etc.c (etc_getlogin): set login name encoding properly.
  [ruby-core:66163] [Bug #10493]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 08:24:36 +00:00
nobu 1cede1dab2 reaply r48278
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 10:53:04 +00:00
naruse 8d00496911 Revert r48278 "common.mk: update unicode data only if BASERUBY is available"
Moreover its error "make[1]: *** No rule to make target
`lib/unicode_normalize/tables.rb', needed by `srcs-lib'.  Stop." is not
a good error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 05:46:43 +00:00
nobu ef8139db13 common.mk: update unicode data only if BASERUBY is available
* common.mk (lib/unicode_normalize/tables.rb): do nothing unless
  BASERUBY is available.  MINIRUBY cannot load extension libraries,
  so cannot update Unicode data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05 05:11:33 +00:00
usa a12ca2113d * win32/setup.mak: $(APPEND) with some arguments insert a space before
the arguments, so it causes error if the arguments are expected to be
  a macro definition.  this fix resolve the build error introduced at
  r48210.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 08:25:07 +00:00
nobu 74ec76990a win32/setup.mak: get target architecture from the compiler
* win32/Makefile.sub, win32/setup.mak (MACHINE): get target
  architecture from the compiler, instead of environment variable
  at build time, which is irrelevant to runtime environment, and
  not set when running in cygwin sshd.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 08:07:50 +00:00
nobu 42ca978656 common.mk: UNICODE_FILES
* common.mk (UNICODE_FILES): revert the rule that Unicode data
  files depend on downloader target, and add missing dependency of
  lib/unicode_normalize/tables.rb

* common.mk (after-configure): removed as srcdir should be
  read-only after update.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 13:48:16 +00:00
nobu 4ae67d876a common.mk: after-configure
* common.mk (after-configure): update Unicode files after
  configure run.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 05:17:32 +00:00
nobu c88c049ed1 mkmf.rb: translate to assembler
* lib/mkmf.rb (create_makefile): add rules to translate to
  assembler sources.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 01:38:32 +00:00
nobu edae1c7200 win32/file.c: fix no user exception
* win32/file.c (append_wstr): set expanded length, not length of
  appended string.  fix "probable buffer overflow" bug.
  [ruby-core:65317] [Bug #10304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 13:54:50 +00:00
nobu 3558e886bd Makefile.sub: fix typo
* win32/Makefile.sub: fix typo, replace "ekse" with "else".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-19 07:04:35 +00:00
usa 2aa9658730 * win32/win32.c (VCSUP): nothing to do if this worktree is not under
any VCS (it means that the worktree may be from the release package).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-19 06:49:56 +00:00
nobu ccbeb0d6dc * win32/win32.c (cmdglob): use inline function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-23 13:32:32 +00:00
nobu 43b00d8a11 win32.c: manage reverse video
* win32/win32.c (constat_attr): manage reverse video internally
  since Windows console window does not manage it.  based on the
  patch by white leaf in [ruby-dev:48483].  [Bug #10158]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 08:10:34 +00:00
nobu 8f0543a364 win32/file.c: direct conversion
* win32/file.c (user_length_in_path): count user name length in
  path.

* win32/file.c (append_wstr): append WCHAR string to Ruby string
  directly without an intermediate buffer, if possible.

* win32/file.c (rb_file_expand_path_internal): use above functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09 11:50:13 +00:00
nobu b136c5cd48 win32/file.c: share functions with win32.c
* win32/file.c (rb_file_expand_path_internal, rb_file_load_ok):
  use functions defined in win32/win32.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09 10:10:11 +00:00
nobu 5b0ccdbc67 win32/configure.bat: revert a commit by accident
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-31 06:23:53 +00:00