summaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * configure.in, bcc32/Makefile.sub, win32/Makefile.sub, win32/dir.h,nobu2006-08-121-11/+190
| | | | | | | win32/win32.c, win32/win32.h: large file support for win32. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (exit_handler): new function; release winsock andusa2006-07-311-19/+30
| | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@10650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (open_ifs_socket): should not use plain malloc.usa2006-07-181-1/+5
| | | | | | | * win32/win32.c (rb_w32_opendir): should not use plain realloc. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[ch] (rb_w32_read, rb_w32_write): new functions.usa2006-06-081-0/+24
| | | | | | | use recv() and send() when fd is socket. fixed: [ruby-dev:28694] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (errmap): add some winsock errors.usa2006-06-071-1/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_cmdvector): backslashes inside single-quotesnobu2006-06-011-2/+2
| | | | | | | no longer has special meanings. fixed: [ruby-list:42311] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getcwd): runtime's getcwd() will not successusa2006-06-011-19/+30
| | | | | | | | if the length of the cwd is longer than MAX_PATH. fixed [ruby-list:42335] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getcwd): set errno if not set.usa2006-06-011-0/+7
| | | | | | | fixed [ruby-list:42346] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (filetime_to_unixtime): should set tm_isdst to -1.ocean2006-03-021-0/+1
| | | | | | | | stat() didn't treat daylight saving time property on WinNT. [ruby-talk:182100] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (NtInitialize): need to set a handler for VC++8.usa2006-02-241-0/+11
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_utime): drop read-only attribute beforeusa2006-02-141-0/+5
| | | | | | | changing file time. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (LK_ERR): ERROR_NOT_LOCKED is not an error.usa2006-02-041-1/+14
| | | | | | | In such situation, flock() should return 0. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_seekdir): should not segfault even if passedocean2006-01-011-18/+30
| | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@9782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_strerror): remove all CR and LF. (avoid brokenocean2005-11-281-3/+3
| | | | | | | error message on bccwin32 + winsock) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (test_identical): test if two files are identical.nobu2005-11-221-22/+6
| | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@9590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (winnt_stat): set mapped errno instead of ENOENT.ocean2005-11-221-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_stat): Dir.chdir('//server/shared');ocean2005-11-221-1/+106
| | | | | | | | p Dir.glob('*') should work on WinNT. (implemented our own stat(2) on WinNT) [ruby-list:41552] [ruby-dev:27711] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, cygwin/GNUmakefile.in (mingw): use def file to aliasnobu2005-11-051-36/+42
| | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@9502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (ioctl): should set errno.usa2005-10-141-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (do_select, rb_w32_select): brush up.usa2005-10-011-48/+71
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): documented problem.ocean2005-09-171-6/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): fixed deadlock bug.ocean2005-09-171-33/+37
| | | | | | | | because select(2) modifies its fd_set arguments, it must be restored sometimes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): I hope performance problem wasocean2005-09-171-8/+24
| | | | | | | solved. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): console support is back.ocean2005-09-171-1/+42
| | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@9193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): select for socket didn't work.ocean2005-09-171-223/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@9192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (rb_push_glob): fix delimiter bug. fixed: [ruby-dev:27105]nobu2005-09-161-1/+1
| | | | | | | | | | * dir.c (dir_s_aref, dir_s_glob): allow multiple patterns. [ruby-dev:27110] * win32/win32.c (cmdglob): enable brace expansion. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_pipe_exec): remove unnecessary CloseHandle().usa2005-09-151-9/+94
| | | | | | | | | * win32/win32.c (extract_console_fd, peek_console): new functions. * win32/win32.c (rb_w32_select): check consoles by polling them. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (collect_file_fd): rename from extract_file_fd.usa2005-09-141-11/+127
| | | | | | | | | * win32/win32.c (extract_pipe_fd, peek_pipe): new functions. * win32/win32.c (rb_w32_select): check pipes by polling them. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (ruby_glob): glob function not using ruby exception system.nobu2005-09-141-2/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[hc] (rb_w32_argv_size, ...): reverted my latest changeocean2005-09-121-6/+7
| | | | | | | to avoid incompatible pointer warning. (mingw32) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[hc] (rb_w32_utime): constified.ocean2005-09-071-13/+9
| | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@9091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (socketpair_internal): need to call open_ifs_socket()usa2005-08-181-2/+2
| | | | | | | | to create sockets instead of winsock's socket(). fixed: [yarv-dev:581] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, {bcc32,win32,wince}/Makefile.sub (HAVE_SNPRINTF,usa2005-08-031-0/+20
| | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@8896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[ch]: (rb_w32_vsnprintf, rb_w32_snprintf): removed.usa2005-07-251-18/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,nobu2005-07-231-3/+1
| | | | | | | | | using missing/vsnprintf.c. [ruby-dev:26580] * missing/vsnprintf.c: made the output changeable. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[hc]: constified socket functions. [ruby-dev:26553]ocean2005-07-161-21/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* reordered just for diffing.ocean2005-07-141-16/+16
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_strerror): should return correct messageocean2005-07-141-6/+19
| | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@8761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_mkdir): should set EEXIST (not EACCES)ocean2005-07-131-23/+23
| | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@8756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (StartSockets): iSockOpt is no longer used.nobu2005-07-081-5/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (open_ifs_socket): new function.usa2005-07-061-16/+44
| | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@8731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_closed): new method DBM#closed?usa2005-06-201-0/+20
| | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@8650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (NtInitialize): fix typo.usa2005-05-181-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (glob_helper): get rid of using String. [ruby-dev:26180]nobu2005-05-181-0/+10
| | | | | | | | * eval.c (ruby_options), win32/win32.c (NtInitialize): move argument intialization back. [ruby-dev:26180] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (unixtime_to_filetime): use localtime() instaed ofusa2005-05-171-1/+1
| | | | | | | gmtime() when using FileLocalTimeToFileTime(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.{h,c}: define rb_{p,g,u}id_t.ocean2005-05-151-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (unixtime_to_filetime): deal with DST.nobu2005-05-151-1/+3
| | | | | | | [ruby-talk:141817] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: Check for the availability of pid_t, gid_t and uid_t andnobu2005-05-141-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@8455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (rb_glob): fixed mismatch of argument.ocean2005-03-051-4/+0
| | | | | | | | | * dir.c (fnmatch): removed unnecessary code. (by string.c 1.219) * win32/win32.c (NtInitialize): ditto. (by numeric.c 1.117) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (eaccess): workaround for VC++8 runtime.usa2005-03-041-0/+4
| | | | | | | * win32/win32.c (ioinfo): VC++8 support. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e