summaryrefslogtreecommitdiff
path: root/include/ruby/win32.h
AgeCommit message (Collapse)Author
2014-11-10* win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): newusa
function to support nonblock-mode of pipes. * win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA if there is no data, but also returns it if remote-end is closed. * win32/win32.c (rb_w32_write): if cannot to write any data, it may be blocking. * io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows. * ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when setting nonblock-mode. * test/ruby/test_io.rb: test nonblock pipes on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22revert File::Statfs [Feature #9772]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22* win32/win32.c, include/ruby/win32.h (ustatfs): implementation ofusa
statfs(2) clone. [EXPERIMENTAL] * file.c (rb_io_statfs): use above function. * configure.in, win32/Makefile.sub (struct statfs): available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15* include/ruby/win32.h (rb_w32_cmdvector): removed.usa
* win32/win32.c (rb_w32_sysinit): use WCHAR version of GetCommandLine() internally. * win32/win32.c (w32_cmdvector): renamed from rb_w32_cmdvector. use WCHAR* instead of char* internally. these changes are expected to not changing the behavior yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-05win32.c: wchar conversionnobu
* win32/win32.c (rb_w32_wstr_to_mbstr, rb_w32_mbstr_to_wstr): make WCHAR/mb conversion functions public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-23win32/win32.c: add rb_w32_inet_ptonnobu
* include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a wrapper function for inet_pton minimum supported client is Vista, as well as inet_ntop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14* include/ruby/intern.h,akr
include/ruby/io.h, include/ruby/ruby.h, include/ruby/win32.h, include/ruby/backward/rubysig.h, bignum.c, gc.c, io.c, process.c, safe.c, struct.c, thread.c, ext/socket/rubysocket.h, ext/-test-/old_thread_select: Remove deprecated definitions [ruby-core:60581] [Feature #9502] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07win32.h: define strtoll and strtoull for earlier VCnobu
* include/ruby/win32.h (strtoll, strtoull): VC8 and later until VC12 have LONG_LONG but it is _int64, and provide i64 version functions only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28win32.c: rb_w32_dup2nobu
* win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and redirect_dup2(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23win32.h: suppress INFINITY warningsnobu
* include/ruby/win32.h (rb_infinity_float): suppress overflow in constant arithmetic warnings. [ruby-core:57981] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14win32.h: declare fstati64 to suppress warningsnobu
* include/ruby/win32.h (fstati64): declare for ext/-test-/file/stat.c on w64-mingw, to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10win32.h: define or declare finite alwaysnobu
* include/ruby/win32.h (finite): always define or declare. some mingw (maybe w64 only?) lack the declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06win32.c: clock_getresnobu
* win32/win32.c (clock_getres): required as well as clock_gettime(). [ruby-dev:47699] [Bug #8869] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19* include/ruby/win32.h (CLOCK_MONOTONIC): typo.usa
* win32/win32.c: removed duplicated declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-15* include/ruby/win32.h, win32/Makefile.sub, win32/win32.cusa
(clock_gettime): [experimental] emulates clock_gettime(2) of posix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08win32.c: for strict ANSInobu
* win32/win32.c (rb_w32_pow): move from win32.h and disable strict ANSI mode macro to let _controlfp() stuff defined. [ruby-core:55312] [Bug #8495] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30win32.c: UTF-8 spawnnobu
* win32/win32.c (w32_spawn): extract codepage aware code from rb_w32_spawn(). * win32/win32.c (rb_w32_uspawn): add UTF-8 version function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30win32.c: UTF-8 aspawnnobu
* win32/win32.c (w32_aspawn_flags): extract codepage aware code from rb_w32_aspawn_flags(). * win32/win32.c (rb_w32_uaspawn_flags, rb_w32_uaspawn_flags): add UTF-8 version functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14iphlpapi is unavailable with older VCnobu
* include/ruby/win32.h, win32/Makefile.sub, win32/win32.c: iphlpapi is not available with older Visual C. works with VC9 or later at least. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14win32.h: fix for VC9nobu
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): split from intptr_t and uintptr_t, since VC9 defines the latters only in crtdefs.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]usa
emulate getipaddrs(3) on Unix. * win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above function. * include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't substitute for any function, so use non-prefixed name. * ext/socket/extconf.rb (socketpair); follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,kosaki
ftello64). They are not used from anywhere. * win32/win32.c (fseeko): removes. * win32/win32.c (rb_w32_ftello): removes. * include/ruby/win32.h: removes declarations of rb_w32_ftello and rb_w32_fseeko. * win32/Makefile.sub: removes '#define HAVE_FTELLO 1'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-03win32.h: INTPTR_MAX, INTPTR_MIN, UINTPTR_MAXnobu
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): also should be defined when defining intptr_t and uintptr_t. bigdecimal.c requires the former two now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}nobu
* include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility control macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30win32.h: revert r37337nobu
* include/ruby/win32.h (fstat): revert r37337, which uses _fstati64() instead of fstati64() on mingw32. [Bug #7276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-27win32.h: fstat on mingw32nobu
* include/ruby/win32.h (fstat): use _fstati64() instead of fstati64() on mingw32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12win32.h: set floating point precision for pow()shirosaki
* include/ruby/win32.h (rb_w32_pow): set floating point precision for mingw-w64 x86 pow(). This improves the precision of pow() on Windows XP for TestFloat#test_round_with_precision failure. [ruby-core:47911] [Bug #7142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29win32.c: rb_w32_inet_ntop should be constnobu
* win32/win32.c (rb_w32_inet_ntop): type should be const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-24Fix broken pow() on x64-mingw32shirosaki
* include/ruby/win32.h (rb_w32_pow): add new function. We use powl() instead of broken pow() for x64-mingw32. This workaround fixes test failures related to floating point numeric. [ruby-core:46686] [Bug #6784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10* include/ruby/win32.h (NT, NtInitialize): removed unused old macros.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09* include/ruby/win32.h: sorry, mistaken.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09* win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omit Win9xusa
support. remove --enable/disable-win95 option. * include/ruby/win32.h, file.c, win32/win32.c: ditto. * win32/README.win32: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13include/ruby/win32.h: fix comment stylenobu
* include/ruby/win32.h: get rid of C99 style one line comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06* win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.usa
this API wraps an I/O handle (HANDLE or SOCKET) and returns fd. the second parameter should be combination of O_*, for example, O_RDWR | O_BINARY | O_NOINHERT. * win32/win32.c, include/ruby/win32.h (rb_w32_unwrap_io_handle): new API. this API unwraps an I/O handle and close the fd (not closes the handle itself). [Feature #4960] [ruby-core:37227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08* include/ruby/win32.h (FD_SET): change function to macro.shirosaki
To avoid buffer overflow when smaller FD_SETSISE is used in ext libraries. * win32/win32.c (rb_w32_fdset): this function is not used anymore. But we leave this for compatibility. * win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller FD_SETSISE is used in ext libraries. Dereference of fd_set pointer causes SEGV. * test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for above. * ext/-test-/win32/fd_setsize/depend: ditto. * ext/-test-/win32/fd_setsize/extconf.rb: ditto. * ext/-test-/win32/fd_setsize/fd_setsize.c: ditto. [ruby-core:44588] [Bug #6352] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16* win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrantnobu
versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07* include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration ofshirosaki
new function. * process.c (enum): add EXEC_OPTION_PGROUP and move the position above for the usage in proc_spawn_n(). * process.c (proc_spawn_n): add an argument to pass new option `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to CreateProcessW(). This flag is necessary for the usage of Process.kill on the subprocess on Windows. * process.c (rb_exec_arg_addopt): ditto. * process.c (rb_spawn_process): ditto. * process.c (documentation for rb_f_spawn): add documentation for new option `new_pgroup` of spawn. * test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup): add tests for option `new_pgroup`. * test/ruby/test_thread.rb (TestThreadGroup#test_thread_timer_and_interrupt): add option `new_pgroup: true` to spawn on Windows. It's needed for Process.kill on a subprocess. * win32/win32.c (CreateChild): add an argument to pass dwCreationFlags of CreateProcessW(). * win32/win32.c (rb_w32_spawn): ditto. * win32/win32.c (rb_w32_aspawn_flags): add new function to pass dwCreationFlags. * win32/win32.c (rb_w32_aspawn): refactor to move the content to rb_w32_aspawn_flags(). [ruby-core:43245][Bug #6131] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22* include/ruby/win32.h (fstati64): fix macro conflicts.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22* win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIMEnobu
to time_t directly, not to be affected by TZ unnecessarily. * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME simply. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-15* win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API tousa
accept and to return UTF-8 strings. * win32/win32.c (rb_w32_getenv): follow above change. * win32/win32.c (rb_w32_get_environ): returns UTF-8 environment area. * hash.c (env_str_new, rb_f_getenv, env_fetch): follow above changes. [Bug #5570] [ruby-core:40737] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14* win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.usa
* win32/win32.c (init_stdhandle): set default mode of stdin as binmode. * io.c (set_binary_mode_with_seek_cur): new function to replace SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the fd and take care of LF in rbuf. * io.c (do_writeconv): set text mode when needed. * io.c (io_read): need to change the mode of the IO to binmode temporally when the length for IO#read, because IO#read with length must behave so. * test/ruby/test_io_m17n.rb (TestIO_M17N#est_{read_with_length, read_with_length_binmode,get[cs]_and_read_with_binmode, read_with_binmode_and_get[cs],read_write_with_binmode}): tests for above changes. all patches are written by Hiroshi Shirosaki. [ruby-core:41496] [Feature #5714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-08Silence stat redefinition warnings under win32luislavena
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revertusa
r33876. [ruby-core:41475] [Bug #5706] * ext/socket/extconf.rb: the alternative hack for [Bug #5675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-29* win32/win32.c (rb_w32_inet_ntop): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* include/ruby/win32.h (GetCurrentThreadHandle): remove unused API.nagachika
follow r33881. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* include/ruby/subst.h: moved Windows specific substitions fromnobu
win32.h. * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-31* win32/win32.c (setfl): extract from fcntl().usa
* win32/win32.c (dupfd): new function to support F_DUPFD. base on a patch written by akr. * win32/win32.c (fcntl): use above functions. * include/ruby/win32.h (F_DUPFD): define. [experimental] * include/ruby/win32.h (F_SETFL): change the value to correspond with other platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-05* include/ruby/win32.h (frexp, modf): original macros.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-03Mark a code is GPL or not.naruse
This is made the comparison between current and initial commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15* win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamedusa
from rb_w32_has_cancel_io(). now it takes a parameter as fd to check the fd is console or not, because we cannot cancel console input even if we have cancel_io function. * io.c (WAIT_FD_IN_WIN32): call above function instead of the old one, so now we can kill the thread which calls STDIN.gets. the problem was reported by ko1 vir IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e