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

338 Коммитов

Автор SHA1 Сообщение Дата
nobu 2c01a07bf4 * ext/etc/etc.c (etc_systmpdir): moved from ext/tmpdir.
* ext/etc/etc.c (etc_sysconfdir): added.

* lib/rubygems/config_file.rb, lib/tmpdir.rb: use etc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08 03:25:17 +00:00
wanabe a8209ffcc7 * win32/win32.c: add declaration of wstati64 for gcc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 21:45:33 +00:00
usa 6c28f99d88 * merge some patches from win32-uncode-test branch.
see #1685.

* file.c, include/ruby/intern.h (rb_str_encode_ospath): new function
  to convert encoding for pathname.

* win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename,
  rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir,
  rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to
  accept UTF-8 path.

* win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime,
  rb_w32_unlink): use WCHAR path internally.

* file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype,
  chmod_internal, rb_file_chmod, rb_file_chown, utime_internal,
  rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version
  functions on Win32.

* file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p,
  rb_file_readable_p, rb_file_writable_p, rb_file_executable_p,
  check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown,
  rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call
  rb_str_encode_ospath() before passing the path to system.

* io.c (rb_sysopen): ditto.

* dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 17:56:23 +00:00
usa b6847f7acc * win32/win32.c (rb_w32_wopen): shouldn't use FILE_FLAG_OVERLAPPED with
normal file.  #1807, #2510, #2549


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 16:49:39 +00:00
usa 727371f88a * include/ruby/win32.h: check definition existance before defining
errno macros.

* win32/win32.c (errmap): define winsock errors mappings.
  these are VC++10 support. see [ruby-core:29278]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 05:58:07 +00:00
usa 54da3ecbcb * include/ruby/win32.h, win32/win32.c (EWOULDBLOCK): VC10 already
defined EWOULDBLOCK.  based on a patch from Charlie Savage,
  see [ruby-core:29255]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-05 04:26:33 +00:00
usa c78dbcd131 * win32/win32.c (init_env): wrong calculation of the head of setenv
string.  [ruby-core:29216]
  a patch from Heesob Park in [ruby-core:29218]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02 02:57:05 +00:00
nobu b3a039a2cb * win32/win32.c (rb_w32_{read,write}): fix handle leaks. based on
a patch from Heesob Park in [ruby-core:28919].  [ruby-core:28833]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-25 05:50:08 +00:00
nobu cb2f56aaf4 * win32/win32.c (rb_w32_read): limit read size to 16KB if the file
seems to be console.  [ruby-core:28902]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-24 05:34:05 +00:00
nobu 3694f1dda7 * ext/tmpdir: split from lib/tmpdir.rb.
* win32/win32.c (rb_w32_system_tmpdir): extracted from init_env.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 06:20:23 +00:00
nobu 724f1f4a6e * win32/win32.c (rb_w32_getcwd): remvoed duplicated code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 05:48:07 +00:00
nobu 772acb9f1d * win32/win32.c (init_env): get rid of alloca() for outer string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-11 22:25:22 +00:00
wanabe 131f0a409b * win32/win32.c (signbit): allow x64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-10 16:36:18 +00:00
nobu 4bcae18e37 * io.c (pipe_open): suppressed a warning.
* win32/win32.c (rb_w32_map_errno, winnt_stat, rb_chsize): ditto.

* win32/win32.c (rb_w32_aspawn): get rid of overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-05 08:51:12 +00:00
nobu ee48a91993 * win32/win32.c (signbit): defined on mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-05 02:59:33 +00:00
nobu 35345f1c09 * win32/win32.c (signbig): defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-02 21:19:33 +00:00
usa 4301bbbe0f * win32/win32.c (init_env): use _wputenv() instead of
SetEnvironmentVariableW() because latter doesn't set msvcrt's environ
  work area, of course.
  [Bug #2552]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 05:54:47 +00:00
usa 3fb4d27a8d * win32/win32.c (CreateChild): force to inherit standard I/O handles.
this change fixes [ruby-core:27273], but other side effects might
  exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-28 14:01:12 +00:00
wanabe 754462d4f1 * win32/win32.c (overlapped_socket_io, recvmsg, sendmsg): pass handle
instead of pointer to CloseHandle().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-01 04:36:33 +00:00
usa b16e6a93ca * win32.c (recvmsg, sendmsg, link): shouldn't raise ruby's exceptions
in the functions expected as system API.  see [ruby-dev:39579] and
  [ruby-dev:39582]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30 04:15:54 +00:00
usa dd5c77f0c9 * win32/win32.c (rb_w32_spawn): `\'' is also quote character.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16 07:10:08 +00:00
usa 4e389756ec * win32/{setup.mak,Makefile.sub,win32.c},include/ruby/win32.h (RT_VER):
split compiler specification and runtime library specification.

* win32/Makefile.sub (LD_SHARED*, config.status): no need to embbed
  manifest if not exist.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-01 05:19:19 +00:00
usa a93b36b3e5 * win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()
instead of calling MSVCRT's getpid().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-01 04:23:59 +00:00
usa 51cefa387c * win32/wini32.c (LK_ERR): with overlapped I/O, LockFileEx() returns
ERROR_IO_PENDING if the file is locked.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 10:37:41 +00:00
usa d70e9a5568 * win32/win32.c, include/ruby/win32.h (rb_w32_access): new function to
replace MSVCRT's access().
  [ruby-core:25761]

* file.c (eaccess): workaround for recent MSVCRT is no longer needed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25 07:04:25 +00:00
usa 56e69d7109 * win32/win32.c (readdir_internal): free old temporary filename.
[ruby-core:24820]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-12 05:16:56 +00:00
usa f00babd1a6 * win32/win32.c (has_redirection): need to execute shell if commandline
includes newline.  cf. [ruby-core:24560]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 13:13:17 +00:00
usa fe038100d9 * win32/win32.c (rb_w32_connect): return value was broken when some
error occurred.
	  [ruby-core:24234]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03 07:30:19 +00:00
usa 87487a8c8a * win32/win32.c (rb_w32_{open,wopen}): fixed typos. these conditions
mean to call runtime's open() if textmode.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-23 05:36:57 +00:00
usa 681dce6bfe * win32/win32.c (WSABUF): get rid of compile error on VC9 and mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 01:01:27 +00:00
usa 9dd0d27156 * win32/win32.[ch] (recvmsg, sendmsg): new functions to support recvmsg/
sendmsg like UNIX. these functions are experimental and not tested
	  well. bug reports are welcome.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21 04:38:20 +00:00
nobu 2c772139b6 * win32/win32.c (rb_w32_spawn): use original command if not found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-23 05:32:26 +00:00
nobu 6a64e9e4ac * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): use NULL as
application name for batch files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-22 05:51:58 +00:00
nobu 564517840e * win32/win32.c (rb_w32_conv_from_wstr): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 23:22:34 +00:00
nobu ba1a12170b * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): omit program name
if actual program path is found.  [ruby-core:22960]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 23:17:42 +00:00
nobu 88db4af385 * win32/win32.c (errmap): added ERROR_MOD_NOT_FOUND.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 09:25:26 +00:00
nobu c8d40b9a3d * win32/win32.c (init_env): set TMPDIR if none of TMPDIR, TMP,
TEMP is set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 04:22:38 +00:00
nobu bf065f2e2e * win32/win32.c (rb_w32_telldir, rb_w32_seekdir): should use long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 04:16:56 +00:00
nobu 0032476a24 * win32/win32.c: suppress warnings. based on a patch from Charlie
Savage at [ruby-core:22804].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10 19:29:51 +00:00
nobu 90b0b8d437 * win32/win32.c (rb_w32_sysinit): initializes version info first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 05:52:51 +00:00
nobu b9e0c6ec08 * win32/win32.c (Win32System, Win32Version): moved before get_version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 04:38:23 +00:00
nobu f4259225d5 * win32/win32.c (rb_w32_osid): always define for binary compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 04:21:47 +00:00
nobu a8c4a7e44c * win32/win32.c (init_env): keeps wide chars as wide chars.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 03:22:14 +00:00
usa a898f0fb4b * io.c (sysopen_func, rb_sysopen_internal, rb_sysopen): open file
by UTF-16'ed filename on Windows.

	* io.c (rb_file_open_generic, rb_io_s_sysopen, rb_io_reopen,
	  argf_next_argv): follow above change.

	* io.c (rb_scan_open_args): no longer need to convert filepath here on
	  Windows.

	* win32/wio32.c (rb_w32_wopen): new function to open file by UTF-16'ed
	  filename.

	* win32/win32.c (rb_w32_open): call rb_w32_open().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 08:36:45 +00:00
nobu 1e5de389da * debug.c (set_debug_option): added rtc_error option.
* win32/Makefile.sub (CRTDEFFLAGS): separated from DEFS.

* win32/win32.c (rtc_error_handler): ignores RTC errors unless
  rtc_error debug option is given.

* win32/win32.c (rb_w32_sysinit): suppress useless CRT assertions.
  [ruby-core:22116]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-16 07:46:24 +00:00
nobu 82fa04e212 * win32/win32.c (_CrtDbgReportW): prevent from false positive
assertions in msvcrtd.  [ruby-core:22116]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-15 16:18:01 +00:00
usa 7e1050e604 * win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertion
when ASCII-8BIT is passed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 09:18:46 +00:00
usa 6343c99a2e * win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function to
read entry with specified enc.

	* win32/win32.c (readdir_internal): extract from rb_w32_opendir().

	* win32/win32.c (opendir_internal): extract from rb_w32_readdir().

	* dir.c (dir_read, dir_each): use new READDIR macro instead of readdir()
	  to pass enc for special version of readdir, such as above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 08:23:00 +00:00
nobu 209cfdcfb5 * win32/win32.c (rb_w32_write): use of cast expressions as lvalues
is deprecated.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:01:43 +00:00
usa 41e770944e * win32/win32.c (open_dir_handle, rb_w32_opendir, move_to_next_entry,
rb_w32_readdir, check_valid_dir): change backend API from A to W.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 01:59:05 +00:00