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

165 Коммитов

Автор SHA1 Сообщение Дата
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
nobu 6ef3fe6349 * win32/win32.c (rb_w32_fdopen): suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-10 12:18:16 +00:00
usa a32bc08d36 * configure.in, win32/Makefile.sub (LIBS, COMMON_HEADERS): use
winsock2 on mswin32/mingw.

* ext/socket/extconf.rb: ditto.

* win32/win32.c (StartSockets): ditto.

* win32/win32.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-10 04:55:34 +00:00
nobu 80f4330973 * bcc32/Makefile.sub (COMMON_LIBS): add libraries included in
import32.lib.

* lib/mkmf.rb (create_makefile): restrict prefixing with srcdir to
  rule lines, add search path to implicit rules, and set Borland make
  special macros for search path.

* win32/win32.c, win32/win32.h (read): aboid a BCC runtime bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-10 03:07:24 +00:00
nobu 6400a671b8 * win32/win32.c (init_stdhandle): assign standard file handles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-10 03:06:43 +00:00
usa 66d39f93b4 * win32/win32.c (flock_winnt, flock_win95): unlock file even if
LOCK_NB is specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-26 01:51:06 +00:00
ocean 160bfa5bef * win32/win32.c (rb_w32_close): didn't close socket handle.
* win32/win32.c (rb_w32_open_osfhandle): bcc32's _open_osfhandle
  never set EMFILE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-06 11:05:31 +00:00
ocean 09736c1621 * parse.y (BITSTACK_POP): workaround for bcc32 compiler's bug.
shift assignment operator '>>=' for __int64 in struct may
  generate collapsed code. [ruby-dev:25342]

* win32/win32.[ch]: failed to compile on bcc32 (and probably wince)
  [ruby-dev:25306]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-05 08:00:50 +00:00
usa f598caf621 * win32/win32.c (rb_w32_fdisset): check whether the handle is valid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 05:32:53 +00:00
usa 2f35e1e146 * win32/win32.c (rb_w32_close): need to reset osfhnd().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-14 08:10:32 +00:00
usa 3f56463129 * win32/win32.c (rb_w32_pipe_exec): need to close original socket
handle.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 08:38:59 +00:00
usa 87a77c7174 * win32/win32.c (rb_w32_pipe_exec): must close original handle
before exec. fixed: [ruby-dev:25112]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 04:56:07 +00:00
usa bc4088d768 * win32/win32.c (rb_w32_fclose, rb_w32_close): shutdown socket
before closesocket(). fixed: [ruby-dev:25112]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 02:54:24 +00:00
usa d5b434088a * win32/win32.c (is_socket): reorder of function definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07 16:36:29 +00:00
usa c3ce319d7d * io.c (pipe_open): win32 bidirectional pipe support.
* win32/win32.[ch] (rb_w32_pipe_exec): ditto.

* win32/win32.[ch] (socketpair): new function. POSIX socketpair
  emulation.

* win32/win32.c (socketpair_internal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07 15:47:59 +00:00
usa 571e1361b6 * io.c (dir_s_mkdir): win32 special processing doesn't need any longer.
* win32/win32.[ch] (rb_w32_mkdir): new function. POSIX.1 compatible
  interface.

* win32/win32.[ch] (rb_w32_rmdir): new function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07 04:45:46 +00:00
usa 1acf7e6b01 * io.c (is_socket): new function.
* io.c (rb_io_close_read, rb_io_close_write): use is_socket().

* io.c (rb_io_fptr_finalize): need to check fptr->f before calling
  rb_io_fptr_cleanup().

* io.c (pipe_open): win32 pipe support (experimental).

* win32/win32.[ch] (rb_w32_pipe_exec): return file descripters
  instead of FILE structure.

* win32/win32.[ch] (rb_w32_is_socket): new function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06 11:19:27 +00:00
usa 0412ddfd24 * win32/win32.c (CreateChild): push back the last space before next
loop because CharNext() eats it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 04:17:05 +00:00
usa fce2bb5ea8 * win32/win32.[ch] (rb_w32_isatty): new function to replace MSVCRT's
isatty because it never sets errno.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 11:52:46 +00:00
usa c4ce79084f * eval.c (ruby_options): now we cannot call rb_glob() before
ruby_init(), so call rb_w32_cmdvector() at ruby_options().

* win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and
  export it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-12 06:15:40 +00:00
eban b088595db7 * win32/win32.c (isUNCRoot): should check NUL after '.'.
[ruby-dev:24590]
* win32/win32.c (isUNCRoot): fixed buffer overrun.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-25 09:40:55 +00:00
usa 56173249ef * win32/win32.c (rb_w32_call_handler): workaround for Ctrl-C.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22 04:05:11 +00:00
usa 977eb1bae7 * win32/win32.c (rb_w32_getpid): don't need to use _getpid() on
mswin32 and mingw32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-13 01:50:32 +00:00
ocean 6302bcf022 * bcc32/Makefile.sub: bccwin32 port starts to use RTL dll.
(need to rebuild all) [ruby-dev:24138]

* win32/win32.{h,c}: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-10 10:24:08 +00:00
usa f4d60b5f63 * {bcc32,win32,wince}/Makefile.sub (config.h): add fcntl.
* win32/win32.[ch] (fcntl): ditto.

* win32/win32.c (rb_w32_connect): support nonblocking mode.

* ext/socket/socket.c (wait_connectable, ruby_connect): support
  nonblocking connect on various platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-07 03:52:15 +00:00
nobu e8d486e119 * process.c (rb_proc_exec): strip trailing spaces. [ruby-dev:24143]
* win32/win32.c (CreateChild): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-27 01:14:30 +00:00
nobu c41cefd492 * win32/win32.c (init_env): initialize HOME and USER environment
variables unless set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-18 02:22:59 +00:00
usa 564538541e * rubyio.h (rb_eof_error): should mark as NORETURN.
* win32/win32.c (make_cmdvector): adjust escaped successive
  double-quote handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-12 01:56:25 +00:00
ocean 9d07076bef * win32/win32.{h,c} (rb_w32_{f,fd,fs}open): workaround for bcc32's
{f,fd,fs}open bug. set errno EMFILE and EBADF. [ruby-dev:23963]

* test/drb/drbtest.rb: fix method duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-25 02:25:25 +00:00
usa f43b8e20c0 * win32/win32.c (rb_w32_opendir): should set errno if error occurs
when calling OS API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-21 00:27:39 +00:00
usa b1469c134c * win32/win32.c: remove unused functions and variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-09 03:47:08 +00:00