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

195 Коммитов

Автор SHA1 Сообщение Дата
nobu edcb8975ac * configure.in, bcc32/Makefile.sub, win32/Makefile.sub, win32/dir.h,
win32/win32.c, win32/win32.h: large file support for win32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-12 06:56:09 +00:00
usa 2982c52892 * win32/win32.c (exit_handler): new function; release winsock and
environment work area.

* win32/win32.c (NTInitialize): setup exit_handler.

* win32/win32.c (StartSockets): use exit_handler.
  exit handler.

* win32/win32.c (rb_w32_getenv): use GetEnvironmentStrings() instead
  of GetEnvironmentVariable(), because the latter cannot distinguish
  wheather a null environment variable exists or not.
  fixed: [ruby-talk:205123]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-31 07:58:34 +00:00
usa 1921fbce45 * win32/win32.c (open_ifs_socket): should not use plain malloc.
* win32/win32.c (rb_w32_opendir): should not use plain realloc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18 14:13:07 +00:00
usa da617f7f79 * win32/win32.[ch] (rb_w32_read, rb_w32_write): new functions.
use recv() and send() when fd is socket. fixed: [ruby-dev:28694]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-08 05:01:51 +00:00
usa 301f4076f8 * win32/win32.c (errmap): add some winsock errors.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-07 05:53:46 +00:00
nobu da7472ee99 * win32/win32.c (rb_w32_cmdvector): backslashes inside single-quotes
no longer has special meanings.  fixed: [ruby-list:42311]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-01 10:13:41 +00:00
usa e4602e1d27 * win32/win32.c (rb_w32_getcwd): runtime's getcwd() will not success
if the length of the cwd is longer than MAX_PATH.
  fixed [ruby-list:42335]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-01 07:18:12 +00:00
usa f85ebe0963 * win32/win32.c (rb_w32_getcwd): set errno if not set.
fixed [ruby-list:42346]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-01 02:34:30 +00:00
ocean be70a6ebec * win32/win32.c (filetime_to_unixtime): should set tm_isdst to -1.
stat() didn't treat daylight saving time property on WinNT.
  [ruby-talk:182100]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-02 04:01:31 +00:00
usa 20f3ea3f6c * win32/win32.c (NtInitialize): need to set a handler for VC++8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-24 02:19:44 +00:00
usa f0ab5bdea2 * win32/win32.c (rb_w32_utime): drop read-only attribute before
changing file time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-14 04:49:01 +00:00
usa f0432871fd * win32/win32.c (LK_ERR): ERROR_NOT_LOCKED is not an error.
In such situation, flock() should return 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-04 12:21:55 +00:00
ocean 88a3caaafe * win32/win32.c (rb_w32_seekdir): should not segfault even if passed
the location which rb_w32_telldir didn't return. (and should change
  `bits' position) [ruby-core:7035]

* win32/dir.h: ditto. (stores `loc' instead of `bitpos')

* test/ruby/test_dir.rb: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-01 05:49:01 +00:00
ocean c43a23d49e * win32/win32.c (rb_w32_strerror): remove all CR and LF. (avoid broken
error message on bccwin32 + winsock)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-28 04:24:26 +00:00
nobu 4ef75249df * file.c (test_identical): test if two files are identical.
* file.c (rb_f_test): support DOSISH systems where st_ino is not
  reliable.  fixed: [ruby-core:06672]

* win32.h, win32.c (rb_w32_osid): check the running platform.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22 16:26:39 +00:00
ocean abcbaa5c6f * win32/win32.c (winnt_stat): set mapped errno instead of ENOENT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22 09:42:09 +00:00
ocean 886f33e199 * win32/win32.c (rb_w32_stat): Dir.chdir('//server/shared');
p Dir.glob('*') should work on WinNT. (implemented our own
  stat(2) on WinNT) [ruby-list:41552] [ruby-dev:27711]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22 04:32:39 +00:00
nobu 49775b88e9 * configure.in, cygwin/GNUmakefile.in (mingw): use def file to alias
symbols.  [ruby-dev:27532]

* bcc32/mkexports.rb, win32/mkexports.rb: make aliases in DLL.

* win32/win32.c, win32/win32.h: replace symbols only when RUBY_EXPORT
  is defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-05 04:43:46 +00:00
usa b367743e92 * win32/win32.c (ioctl): should set errno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-14 13:09:11 +00:00
usa 1110e7123c * win32/win32.c (do_select, rb_w32_select): brush up.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-01 14:57:06 +00:00
ocean fb5dd968ec * win32/win32.c (rb_w32_select): documented problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17 21:44:24 +00:00
ocean f2107f2ec1 * win32/win32.c (rb_w32_select): fixed deadlock bug.
because select(2) modifies its fd_set arguments, it must be
  restored sometimes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17 12:20:07 +00:00
ocean f0bcbbef67 * win32/win32.c (rb_w32_select): I hope performance problem was
solved.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17 05:22:33 +00:00
ocean aa21055faf * win32/win32.c (rb_w32_select): console support is back.
but still has performance problem because I loosely took 1 second
  for wait time. I'll fix it later. (The reason I drastically changed
  the code is that I wanted to implement the fileset management as
  single function, and I was worried that if pipe or console
  was always available, socket may not be processed any time)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17 04:53:26 +00:00
ocean 846b1c35e5 * win32/win32.c (rb_w32_select): select for socket didn't work.
this caused deadlock in drb test. this happened because GetFileType
  for socket handle returns FILE_TYPE_PIPE. Of course, it's not a
  pipe. So socket handle didn't reach winsock's select function.

* win32/win32.c (rb_w32_select): read for pipe still kept brocking
  even if writer handle was closed.

    r,w = IO.pipe

    Thread.new {
      sleep 3; puts "------- 1"
      w.puts("foo")
      sleep 3; puts "------- 2"
      w.puts("boo")
      sleep 3; puts "------- 3"
      w.close
    }

    until r.eof? # should break by w.close but didn't.
      puts r.gets
    end

* win32/win32.c (rb_w32_select): temprary reverted console support
  but it'll be back soon.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17 02:42:59 +00:00
nobu 5a2f770fb1 * dir.c (rb_push_glob): fix delimiter bug. fixed: [ruby-dev:27105]
* dir.c (dir_s_aref, dir_s_glob): allow multiple patterns.
  [ruby-dev:27110]

* win32/win32.c (cmdglob): enable brace expansion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-16 13:46:05 +00:00
usa 7c5eaf70a3 * win32/win32.c (rb_w32_pipe_exec): remove unnecessary CloseHandle().
* win32/win32.c (extract_console_fd, peek_console): new functions.

* win32/win32.c (rb_w32_select): check consoles by polling them.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-15 02:03:43 +00:00
usa e2472dafa0 * win32/win32.c (collect_file_fd): rename from extract_file_fd.
* win32/win32.c (extract_pipe_fd, peek_pipe): new functions.

* win32/win32.c (rb_w32_select): check pipes by polling them.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 14:30:37 +00:00
nobu 9d2b69a273 * dir.c (ruby_glob): glob function not using ruby exception system.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 13:41:02 +00:00
ocean bf102e8a35 * win32/win32.[hc] (rb_w32_argv_size, ...): reverted my latest change
to avoid incompatible pointer warning. (mingw32)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12 11:40:40 +00:00
ocean 8955a2d930 * win32/win32.[hc] (rb_w32_utime): constified.
* win32/win32.h (rb_w32_stat): added prototype.

* win32/win32.[hc] (rb_w32_argv_size,rb_w32_join_argv,rb_w32_aspawn):
  changed `char *const *' to `const char *const *'. (constify string)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-07 00:37:53 +00:00
usa e67d73e0f3 * win32/win32.c (socketpair_internal): need to call open_ifs_socket()
to create sockets instead of winsock's socket().
  fixed: [yarv-dev:581]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-18 02:07:28 +00:00
usa ce8d9b4a0d * configure.in, {bcc32,win32,wince}/Makefile.sub (HAVE_SNPRINTF,
HAVE_VSNPRINTF): use win32/win32.c's implementation instead of
  missing/vsnprintf.c's.

* win32/win32.[ch] (rb_w32_snprintf, rb_w32_vsnprintf): reverted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-03 01:21:20 +00:00
usa 528f4c66dd * win32/win32.[ch]: (rb_w32_vsnprintf, rb_w32_snprintf): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25 14:50:12 +00:00
nobu 6524f34a26 * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,
using missing/vsnprintf.c.  [ruby-dev:26580]

*  missing/vsnprintf.c: made the output changeable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 01:02:18 +00:00
ocean c6a782c14e * win32/win32.[hc]: constified socket functions. [ruby-dev:26553]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-16 06:59:05 +00:00
ocean 3345d742e7 reordered just for diffing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14 09:58:13 +00:00
ocean 59970fde60 * win32/win32.c (rb_w32_strerror): should return correct message
for ENAMETOOLONG and ENOTEMPTY. (bcc32) [ruby-dev:26533]

* win32/win32.c (rb_w32_strerror): stripped CR LF on the tail.
  (bcc32) [ruby-dev:26533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14 09:33:52 +00:00
ocean 80b0773d33 * win32/win32.c (rb_w32_mkdir): should set EEXIST (not EACCES)
if file or directory already exists. (bcc32)

* win32/win32.c (rb_w32_rmdir): should set ENOTDIR (not EINVAL)
  if it is not directory. (bcc32, win32)

* win32/win32.c (rb_w32_rmdir, rb_w32_unlink): restore
  FILE_ATTRIBUTE_READONLY flag on function failure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13 10:40:06 +00:00
nobu 682d1bb068 * win32/win32.c (StartSockets): iSockOpt is no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-08 10:55:29 +00:00
usa 2e0680f221 * win32/win32.c (open_ifs_socket): new function.
* win32/win32.c (StartSockets, rb_w32_socket): use open_ifs_socket()
  instead of socket().
  all changes are derived from [ruby-core:5388].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-06 02:20:58 +00:00
usa b03649bc2a * ext/dbm/dbm.c (fdbm_closed): new method DBM#closed?
* ext/gdbm/gdbm.c (fgdbm_closed): new method GDBM#closed?

* ext/sdbm/init.c (fsdbm_closed): new method SDBM#closed?

* test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb
  (teardown): close all db objects before deleting data files.

* win32/win32.{ch} (unlink): hook runtime function to change
  file attribute before unlinking.
  merge from 1.8, see [ruby-dev:26360]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-20 08:17:53 +00:00
usa a70902a5c9 * win32/win32.c (NtInitialize): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-18 05:10:09 +00:00
nobu b272844547 * dir.c (glob_helper): get rid of using String. [ruby-dev:26180]
* eval.c (ruby_options), win32/win32.c (NtInitialize): move argument
  intialization back.  [ruby-dev:26180]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-18 02:08:00 +00:00
usa 0a6a371abf * win32/win32.c (unixtime_to_filetime): use localtime() instaed of
gmtime() when using FileLocalTimeToFileTime().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-17 02:52:43 +00:00
ocean 208f2f27ca * win32/win32.{h,c}: define rb_{p,g,u}id_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-15 18:36:56 +00:00
nobu c23d3e4640 * win32/win32.c (unixtime_to_filetime): deal with DST.
[ruby-talk:141817]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-15 00:57:49 +00:00
nobu 642ddf7201 * configure.in: Check for the availability of pid_t, gid_t and uid_t and
remove AC_TYPE_UID_T.  fixed: [ruby-core:04745]

* defines.h: Remove pid_t typedef.

* ruby.h: Define rb_pid_t, rb_gid_t and rb_uid_t in accordance with
 the available system types.

* process.c: Change instances of pid_t and gid_t to their rb_*
 counterparts.

* ext/pty/pty.c: Change pid_t to rb_pid_t.

* vms/config.h: Define HAVE_{P,G,U}ID_T to 1.

* win32/Makefile.sub: Remove #define for {g,u}id_t.

* win32/win32.c: Change pid_t to rb_pid_t.

* wince/Makefile.sub: Remove #define for {g,u}id_t.

* wince/sys/types.h: Remove definitions of {p,g,u}id_t.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-14 14:57:53 +00:00
ocean 4b0f7cecc4 * dir.c (rb_glob): fixed mismatch of argument.
* dir.c (fnmatch): removed unnecessary code. (by string.c 1.219)

* win32/win32.c (NtInitialize): ditto. (by numeric.c 1.117)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-05 09:30:24 +00:00
usa 302b8ff055 * file.c (eaccess): workaround for VC++8 runtime.
* win32/win32.c (ioinfo): VC++8 support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 17:42:55 +00:00