Commit graph

208 commits

Author SHA1 Message Date
usa
896e7a0654 * win32/win32.c (init_stdhandle): backport mistake of r29382.
some code are needless in ruby 1.8.
  [ruby-core:34579]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19 08:40:11 +00:00
usa
7b1b979b47 * win32/win32.c (init_stdhandle): redirect unopened IOs to NUL.
backport r11362 from trunk. [ruby-core:31445]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@29382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-01 06:13:32 +00:00
usa
f10f897bd1 * include/ruby/win32.h: include errno.h before defining errnos.
* include/ruby/win32.h: check definition existance before defining
  errno macros.

* win32/win32.c (errmap): define winsock errors mappings.
  these are VC++10 support, merge from trunk (r27236, r27258).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-07 09:20:12 +00:00
usa
e9f4ba613e * win32/win32.c (CreateChild): allocate temporary buffer and use it
instead of directly modify the passed string.  [ruby-dev:39635]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-05 02:33:14 +00:00
nobu
3f0d0b9398 * *.[chy]: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-22 01:00:18 +00:00
usa
bcda220352 * win32/win32.c (CreateChild): recognize escape characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16 07:43:33 +00:00
usa
b8457edd8a * win32/{setup.mak,Makefile.sub,win32.c} (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/branches/ruby_1_8@25178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 04:54:13 +00:00
usa
0c4419b514 * 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/branches/ruby_1_8@25176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 04:39:04 +00:00
usa
a39400330c * win32/win32.c (subtract): if the parameters are same value, should
return zero.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-24 03:31:50 +00:00
usa
1ee813417d * win32/win32.c (rb_w32_select): of course, need to initialize rest.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-24 03:02:29 +00:00
usa
4f8b15059b * win32/win32.c (rb_w32_select): wait specified time on select.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 05:44:49 +00:00
usa
a9f65bbd69 * win32/win32.c (rb_w32_select): on 1.8, we don't need to poll sockets,
because our select is never called from multiple threads.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 05:32:13 +00:00
usa
3e7ae68129 * 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/branches/ruby_1_8@24390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 13:15:50 +00:00
usa
9762d9ade7 * 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/branches/ruby_1_8@24369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03 08:24:56 +00:00
nobu
1fb1fb2b88 * win32/Makefile.sub (CRTDEFFLAGS): separated from DEFS.
* win32/win32.c (rtc_error_handler): ignores RTC errors.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-16 07:47:53 +00:00
nobu
255aa954f5 * win32/win32.c (_CrtDbgReportW): prevent from false positive
assertions in msvcrtd.  [ruby-core:22116]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-15 16:18:01 +00:00
nobu
cb190ce643 * win32/win32.c (open_dir_handle): extracted from rb_w32_opendir.
* win32/win32.c (winnt_stat): gets rid of strange behavior of
  GetFileAttributes().  [ruby-core:21269]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 07:45:31 +00:00
nobu
a07410c783 * win32/win32.c (init_env): use user profile folder than personal
folder.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 03:52:11 +00:00
usa
862d56d5f9 * win32/win32.c (rb_w32_read, rb_w32_write, rb_w32_isatty): check
whether fd is valid.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 09:14:12 +00:00
usa
523d90905d * win32/win32.c (waitpid): fix bug of checking child slot.
* win32/win32.c (FindChildSlotByHandle): new.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 03:52:06 +00:00
usa
9729b68721 * win32/win32.c (rb_w32_accept): secure fd before accept because if
error causes in securing, cannot restore the state of accepted
	  socket.
	  fixed [ruby-core:19728]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 08:54:07 +00:00
usa
3e70ba912c * win32/win32.c (ifs_open_socket): should retry without proto_buffer
if cannot find the suitable protocol. a patch from Heesob Park.
	  fixed [ruby-core:19713]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-10 00:57:49 +00:00
usa
3bd735314d * win32/win32.c (subtruct): check tv_sec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 10:50:42 +00:00
usa
c0e0e87b45 * win32/win32.c (filetime_to_timeval): new function, split from
gettimeofday().

	* win32/win32.c (gettimeofday): use above function.

	* win32/win32.c (filetime_to_unixtime): ditto. [ruby-dev:36135]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 10:30:53 +00:00
usa
82df70d08c * win32/win32.c (gettimeofday): tv_usec is usec, not msec.
[ruby-dev:36094]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 05:49:10 +00:00
usa
61ae1c9800 * win32/win32.c (gettimeofday): easier calculation. use the definition
of the Gregorian calender.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 01:52:46 +00:00
usa
d1f4a0fafa * win32/win32.c (gettimeofday): calc tv_sec and tv_usec from system
time by myself. [ruby-dev:36084]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 01:19:07 +00:00
usa
62921afc0f * win32/win32.c (gettimeofday): shouldn't use mktime(2) because it's
buggy about handling summer time.
	  reported by Yoshikawa <yoshixool AT gmail.com> at [ruby-dev:36071]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 09:31:53 +00:00
nobu
1ebc425e1c * win32/win32.c (rb_w32_seekdir): no need to rewind to seek forward.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 05:54:45 +00:00
nobu
10df2f8852 * win32/win32.c (rb_w32_telldir): just returns loc.
* win32/win32.c (rb_w32_rewinddir): needs to intialize loc.
  [ruby-core:18041]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 05:45:59 +00:00
nobu
73816cc871 * win32/win32.c (rb_w32_select): recalc the rest of timeout for each
iterations.  [ruby-core:18015]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 08:48:31 +00:00
nobu
9ed3d64d1d * suppress warnings on cygwin, mingw and mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01 19:55:25 +00:00
usa
3c4bc1dd1f * win32/win32.c (rb_w32_select): backport from trunk.
[ruby-talk:300743]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 03:38:06 +00:00
nobu
1c411796ef * win32/win32.c (rb_w32_cmdvector): terminate shrunken command line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-11 07:43:55 +00:00
nobu
6cb19dcbd9 * win32/win32.c (rb_w32_map_errno): exported.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-20 14:55:21 +00:00
nobu
0ced605434 * win32/win32.c (rb_w32_open_osfhandle): reverted to old definition.
[ ruby-Bugs-16948 ]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10 01:53:52 +00:00
usa
1901ca6a17 * win32/win32.c (make_cmdvector): adjust escaped successive
double-quote handling. (merge from trunk)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-02 12:21:03 +00:00
usa
b5aaf376b0 * win32/win32.c (init_env): initialize HOME and USER environment
variables unless set. [ruby-core:12328] (merge from trunk)

	* win32/win32.c (NtInitialize, getlogin): ditto.

	* configure.in, win32/Makefile.sub (LIBS): need to link shell32
	  library for SH* functions on mswin32 and mingw32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-02 12:18:35 +00:00
nobu
521da028b5 * bcc32/{Makefile.sub,configure.bat,setup.mak: configure_args
support.

* bcc32/setup.mak: check runtime version.

* win32/win32.c (rb_w32_open_osfhandle): prototype has changed
  in bcc 5.82.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-21 08:32:34 +00:00
nobu
f298a1a670 * ext/digest/digest.c (rb_digest_instance_update,
rb_digest_instance_finish, rb_digest_instance_reset,
  rb_digest_instance_block_length): %s in rb_raise() expects char*.
  [ruby-dev:31222]

* ext/openssl/ossl.h: include ossl_pkcs5.h.  [ruby-dev:31231]

* ext/openssl/ossl_pkcs5.h: new file for PKCS5.  [ruby-dev:31231]

* ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise()
  instead of rb_raise().  [ruby-dev:31222]

* ext/sdbm/_sdbm.c: DOSISH platforms need io.h.  [ruby-dev:31232]

* ext/syck/syck.h: include stdlib.h for malloc() and free().
  [ruby-dev:31232]

* ext/syck/syck.h (syck_parser_set_input_type): prototype added.
  [ruby-dev:31231]

* win32/win32.c: include mbstring.h for _mbspbrk().  [ruby-dev:31232]

* win32.h (rb_w32_getcwd): prototype added.  [ruby-dev:31232]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15 13:24:51 +00:00
nobu
5e862d6692 * win32/win32.c (CreateChild): enclose command line except for
command.com which can not handle quotes.  [ruby-talk:258939]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13 06:02:18 +00:00
nobu
84e3af3885 * win32/win32.c (rb_w32_opendir): store attributes of the second
entries or later too.

* win32/win32.c (rb_w32_opendir, rb_w32_readdir): eliminate magic
  numbers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 01:59:45 +00:00
nobu
ff964e8aa2 * win32/win32.c (move_to_next_entry): loc also must move forward.
[ruby-talk:251987]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-18 08:09:21 +00:00
usa
7f8f2a33d1 * win32/win32.c (init_stdhandle): stderr should be without buffering,
but mswin32 use buffering when stderr is not connected to tty.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-15 05:55:06 +00:00
usa
edac529177 * thread_win32.ci (w32_wait_events): check whether interrupt_event is
valid handle or not.

	* thread_win32.ci (native_thread_destroy): clear interrupt_event when
	  close it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-10 08:37:21 +00:00
usa
0dded0986d * win32/win32.c (set_pioinfo_extra): new function for VC++8 SP1
workaround. [ruby-core:10259]

* win32/win32.c (NtInitialize): call above function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 06:11:14 +00:00
usa
ae2370fb50 * signal.c (sighandler): need to tell to be interrupted to main
context when handler is installed.

* win32/win32.[ch] (rb_win32_interrupted): new function to listen
  interrupt.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 05:23:02 +00:00
knu
af44ff5ea8 * dir.c, win32/win32.c, win32/dir.h, ruby.h, intern.h: Bring
encoding aware globbing support in from trunk.  Dir.[] and
  Dir.glob() can now take many patterns in an array.  Minor fixes
  will follow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15 02:52:43 +00:00
nobu
d630684687 * dir.c (glob_helper): get rid of possible memory leak.
* win32/win32.c (cmdglob, rb_w32_cmdvector, rb_w32_opendir,
  rb_w32_get_environ): not to use GC before initialization.
  [ruby-core:09024]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30 14:23:46 +00:00
nobu
f4735faa34 * win32/win32.c (rb_w32_utime): allow NULL to set the current time.
[ruby-talk:219248]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-18 14:03:43 +00:00