summaryrefslogtreecommitdiff
path: root/win32
AgeCommit message (Collapse)Author
2022-12-05Handle depend files on nmakeNobuyoshi Nakada
2022-12-01Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6834
2022-11-29MJIT: Rename mjit_compile_attr to mjit_sp_incTakashi Kokubun
There's no mjit_compile.inc, so no need to use this prefix anymore.
2022-11-25Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-21Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6777
2022-11-20Avoid warnings on MINGW:Lars Kanis
win32/win32.c: In function 'rtc_error_handler': win32/win32.c:691:5: warning: function 'rtc_error_handler' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 691 | rb_str_vcatf(str, fmt, ap); | ^~~~~~~~~~~~ and win32/win32.c:683:1: warning: 'rtc_error_handler' defined but not used [-Wunused-function] 683 | rtc_error_handler(int e, const char *src, int line, const char *exe, const char *fmt, ...) | ^~~~~~~~~~~~~~~~~ Notes: Merged: https://github.com/ruby/ruby/pull/6764
2022-11-17Add support for `sockaddr_un` on Windows. (#6513)Samuel Williams
* Windows: Fix warning about undefined if_indextoname() * Windows: Fix UNIXSocket on MINGW and make .pair more reliable * Windows: Use nonblock=true for read tests with scheduler * Windows: Move socket detection from File.socket? to File.stat Add S_IFSOCK to Windows and interpret reparse points accordingly. Enable tests that work now. * Windows: Use wide-char functions to UNIXSocket This fixes behaviour with non-ASCII characters. It also fixes deletion of temporary UNIXSocket.pair files. * Windows: Add UNIXSocket tests for specifics of Windows impl. * Windows: fix VC build due to missing _snwprintf Avoid usage of _snwprintf, since it fails linking ruby.dll like so: linking shared-library x64-vcruntime140-ruby320.dll x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l whereas linking miniruby.exe succeeds. This patch uses snprintf on the UTF-8 string instead. Also remove branch GetWindowsDirectoryW, since it doesn't work. * Windows: Fix dangling symlink test failures Co-authored-by: Lars Kanis <kanis@comcard.de> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-11-17Windows: Readlink improvements (#6745)Lars Kanis
* Windows: Use readlink emulation for File.readlink This fixes readlink emulation for the ERROR_MORE_DATA case and general error reporting. It now releases GVL while readlink IO operation. The dedicated rb_readlink was introduced in commit 2ffb87995a33cdc7ba609a4b867f03f18da0c3b3 in order to improve encoding and buffer allocation. However the encoding issues are solved since ruby-3.0 switched to UTF-8 and the buffer allocation will be improved in a later commit. * Windows: Increase the default buffer size for reparse point info So far nearly all queries of reparse points needed two attempts to get enough buffer. * Windows: Remove declaration of rb_w32_wreadlink It was removed in commit 2f6fdd3aebdee2ce04d003b206f6da78120e8235 Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-10-26[win32] Only include base windows typesJosh Cooper
esent.h is the header for MS essential storage engine (JET) which is not needed in ruby. basetsd.h has existed since _MSC_VER >= 1200 (VS 6.0) and is the preferred header to use for WCHAR. Notes: Merged: https://github.com/ruby/ruby/pull/6632
2022-09-18Demote mjit_instruction.rb from builtin to stdlibTakashi Kokubun
2022-09-17Always generate non-empty revision.hTakashi Kokubun
Non-GNU make seems to generate empty revision.h, but it doesn't make sense since https://github.com/ruby/ruby/pull/6382. Also the $(HAVE_BASERUBY:yes=tmp) hack doesn't seem to be working on OpenBSD. I'll remove it to focus on fixing RubyCI first, and then deal with baseruby-missing environments. At least a snapshot should have revision.h and it might work fine though.
2022-09-17Auto-generate the release date on version.h from git CommitDate (#6382)Takashi Kokubun
* Auto-generate the release date on version.h from git CommitDate * Generate revision.h on mswin Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-09-13Add GMP support for mswinU.Nakamura
2022-09-10[win32] Set proper `NULLCMD` in rbconfig.rb [ci skip]Nobuyoshi Nakada
2022-09-09eliminate magic numberYO4
Notes: Merged: https://github.com/ruby/ruby/pull/6328
2022-09-09win32.c additional fix: is_readable_consoleYO4
classic console(conhost.exe) reports an input with ALT+NUMPAD as VK_MENU, KeyUp, and uChar!=0. additional fix for #5634 Notes: Merged: https://github.com/ruby/ruby/pull/6328
2022-09-09win32.c fix: is_readable_consoleYO4
UnicodeChar with lower byte == 0 has dropped accidentaly this is additional fix for #5634 Notes: Merged: https://github.com/ruby/ruby/pull/6328
2022-09-08[Bug #5317] Use `rb_off_t` instead of `off_t`Nobuyoshi Nakada
Get rid of the conflict with system-provided small `off_t`. Notes: Merged: https://github.com/ruby/ruby/pull/6329
2022-09-08[MSWin] Fix for non-Windows (cygwin/msys) BASERUBYNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6331
2022-09-08[MSWin] Disable rubygems of BASERUBYNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6331
2022-09-07Define BOOTSTRAPRUBY from HAVE_BASERUBYNobuyoshi Nakada
2022-09-07Ensure BASERUBY when cross-compilingNobuyoshi Nakada
2022-09-04Ruby MJIT (#6028)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-09-03Make sources by BASERUBY if available instead of minirubyNobuyoshi Nakada
2022-09-03Move duplicate dependenciesNobuyoshi Nakada
2022-08-28[Win32] Use `exit` instead of `type` [ci skip]Nobuyoshi Nakada
`exit` command ignores the rest arguments after an exit code, while `type` command tries to read all as files.
2022-08-20Drop mswin support of MJIT (#6265)Takashi Kokubun
The current MJIT relies on SIGCHLD and fork(2) to be performant, and it's something mswin can't offer. You could run Linux MJIT on WSL instead. [Misc #18968] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-08-12Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada
As commented in include/ruby/internal/abi.h, since teeny versions of Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role in released versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/6231
2022-08-11Add `--enable-devel` configure optionNobuyoshi Nakada
Since `RUBY_DEVEL` in cppflags has no effect in the configure script and makefiles. Notes: Merged: https://github.com/ruby/ruby/pull/6230
2022-08-06Adjust styles [ci skip]Nobuyoshi Nakada
2022-07-21Expand tabs [ci skip]Takashi Kokubun
[Misc #18891] Notes: Merged: https://github.com/ruby/ruby/pull/6094
2022-07-19Rename ENCINDEX_ASCII to ENCINDEX_ASCII_8BITJean Boussier
Otherwise it's way too easy to confuse it with US_ASCII. Notes: Merged: https://github.com/ruby/ruby/pull/6127
2022-04-21[Win32] allow pipe in flockNobuyoshi Nakada
2022-04-15[Win32] Fix mode of character/pipe device stat [Bug #18732]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5803
2022-04-07Get rid of type-punning pointer castsNobuyoshi Nakada
2022-04-05Load fake.rb at `BTESTRUBY`Nobuyoshi Nakada
So that `mkmf` checks work from `make run`, and also remove duplicate `$(MINIRUBYOPT)` which is used in `$(MINIRUBY)`. Notes: Merged: https://github.com/ruby/ruby/pull/5747
2022-03-30[Bug #18667] Define RUBY_API_VERSION on WindowsPeter Zhu
On other platforms, RUBY_SO_NAME is defined from RUBY_API_VERSION. ruby_version contains the ABI version, which is not needed. RUBY_API_VERSION is defined as MAJOR.MINOR. Notes: Merged: https://github.com/ruby/ruby/pull/5736
2022-03-23Need to reconfigure and rebuild everything when abi.h changedNobuyoshi Nakada
2022-03-16Avoid console input behavior in windows 10 [Bug #18588]YO4
When ANSI versions of PeekConsoleInput read multibyte charactor partially, subsequent ReadFile returns wrong data on newer Windows 10 versions (probably since Windows Terminal introduced). To avoid this, use Unicode version of of PeekConsoleInput/ReadConsole. Notes: Merged: https://github.com/ruby/ruby/pull/5634 Merged-By: nobu <nobu@ruby-lang.org>
2022-03-02[MSWin] Allow gems with VS2022 for VS2019 build ruby [Misc #18362]Nobuyoshi Nakada
Although not sure if it is really compatible, let’s give it a try.
2022-02-24Add ABI version to ruby_version tag on WindowsPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5595
2022-02-20[MSWin] Tentative measure for a bug of VS2022 [Misc #18362]Nobuyoshi Nakada
Disable the use of `__assume()`, when combinations of `isnan()`, `isinf()` and `__assume()` will be wrongly optimized due to the bug of VS2022. Notes: Merged: https://github.com/ruby/ruby/pull/5579
2022-02-19Check if `__assume` is supportedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-19Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`Nobuyoshi Nakada
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just a flag now, and redefined in ruby/backward/2/assume.h then. Notes: Merged: https://github.com/ruby/ruby/pull/5577
2022-02-12[MSWin] Remove stale configuration check [ci skip]Nobuyoshi Nakada
PSAPI library has not been used since d66c5768caaee16a0c2c2c641185.
2022-01-24Fixed an missing percent in the batch fileNobuyoshi Nakada
2022-01-18include/ruby/win32.h: define HAVE_X for the missing prototypes (#5456)Yuta Saito
Notes: Merged-By: kateinoigakukun
2021-12-30win32/win32.c Fix PROT_EXEC bit flag check for FlushInstrucitonCache()nagachika
Notes: Merged: https://github.com/ruby/ruby/pull/5372
2021-12-27Fix some bornheadsU.Nakamura
2021-12-27Tiny mmap emulation for WindowsU.Nakamura
- prerequisite of supporting YJIT with VC++. - note that now can specfily `--yjit` on mswin64, but not enabled YJIT'ed code because of YJIT requires `OPT_DIRECT_THREADED_CODE` or `OPT_CALL_THREADED_CODE` in `rb_yjit_compile_iseq`.