summaryrefslogtreecommitdiff
path: root/include/ruby/win32.h
AgeCommit message (Collapse)Author
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
2011-07-09* win32/win32.c (rb_w32_{read,write}): should be signed.nobu
Bug #5001 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29* include/ruby/win32.h: remove redundunt declaration ofkosaki
rb_w32_time_subtract(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29* thread_win32.c, include/ruby/win32.h: add prototypes.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29* thread_win32.c (native_cond_timedwait): New. r31373 causedkosaki
win32 build failure. * thread_win32.c (__cond_timedwait, abs_timespec_to_timeout_ms): New helper functions. * win32/win32.c (rb_w32_time_subtract): rename from subtract and remove static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26* include/ruby/win32.h (frexp, modf): fix suppressing warnings onnobu
mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26* include/ruby/win32.h (ftruncate, truncate, ftello, fseeko): non-64nobu
versions on mingw are useless because they use int32_t. fixes #4564 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14* include/ruby/win32.h (frexp, modf): wrongly declared as pure innobu
mingw math.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14* include/ruby/win32.h (ftruncate, truncate): mingw64 missesnobu
prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-12* include/ruby/win32.h: VC doesn't have ftruncate() and others, butusa
ruby needs HAVE_ macros to use our emulation functions. (fix the problem of 31262) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-11Evaluate truncate, ftruncate and ftello existenceluislavena
This corrects mingw-w64 compilation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-19* hash.c (ruby_setenv): check env process block size with OS ver.arton
* win32/win32.c: export rb_w32_osver for above patch. * include/ruby/win32.h: declare rb_w32_osver for Win32 Libs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28* include/ruby/win32.h: define WIN32 if neither _WIN64 nor WIN32 defined. it ↵arton
forces to use push/pop for pack(4) pragma. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 * include/ruby/win32.h, win32/win32.c: add rb_w32_inet_ntop.tarui
inet_ntop's minimum supported client is Vista. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29* include/ruby/win32.h (rb_w32_write_console): wrong prototype.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e