<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/win32/win32.c, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix redefinition of `clock_gettime` and `clock_getres`</title>
<updated>2025-05-22T09:32:10+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-05-11T05:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c239069d07c860e5b01ca139cf322b7535405686'/>
<id>c239069d07c860e5b01ca139cf322b7535405686</id>
<content type='text'>
winpthreads-git 12.0.0.r720 provides `clock_gettime` and
`clock_getres` as inline functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
winpthreads-git 12.0.0.r720 provides `clock_gettime` and
`clock_getres` as inline functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust `else` style to be consistent in each files [ci skip]</title>
<updated>2024-05-18T11:09:56+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-02-26T04:20:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1bfdd68b69f0ea82cbf572e889a5aed2887a7945'/>
<id>1bfdd68b69f0ea82cbf572e889a5aed2887a7945</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Windows: Prefer USERPROFILE over HOMEPATH</title>
<updated>2022-12-24T14:48:47+00:00</updated>
<author>
<name>Lars Kanis</name>
<email>lars@greiz-reinsdorf.de</email>
</author>
<published>2022-12-18T20:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d0f5dc9eac78ecade459b740ed08795c8df6d129'/>
<id>d0f5dc9eac78ecade459b740ed08795c8df6d129</id>
<content type='text'>
HOMEPATH is set to "\WINDOWS\system32" when running per "runas" session.
This directory is not writable by ordinary users, leading to errors with many ruby tools.
Also config files in the home directory are not recognized.

Still keeping HOME at first which is not used by native Windows,
but by ruby specs and by MSYS2 environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
HOMEPATH is set to "\WINDOWS\system32" when running per "runas" session.
This directory is not writable by ordinary users, leading to errors with many ruby tools.
Also config files in the home directory are not recognized.

Still keeping HOME at first which is not used by native Windows,
but by ruby specs and by MSYS2 environment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add more comments why CRuby uses __pioinfo</title>
<updated>2022-12-14T15:14:00+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2022-12-14T15:14:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9eb19a02aea2f867972d2c28cab25e5df162091f'/>
<id>9eb19a02aea2f867972d2c28cab25e5df162091f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use `rb_sprintf` instead of deprecated `sprintf`</title>
<updated>2022-11-24T23:51:14+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-24T14:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1a47521c4459fd61384c51ee58bc422ec69310d6'/>
<id>1a47521c4459fd61384c51ee58bc422ec69310d6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid warnings on MINGW:</title>
<updated>2022-11-20T02:06:28+00:00</updated>
<author>
<name>Lars Kanis</name>
<email>kanis@comcard.de</email>
</author>
<published>2022-11-18T18:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=439990318d90a689b2ac067b41c3462ddda60ae5'/>
<id>439990318d90a689b2ac067b41c3462ddda60ae5</id>
<content type='text'>
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, ...)
      | ^~~~~~~~~~~~~~~~~
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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, ...)
      | ^~~~~~~~~~~~~~~~~
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for `sockaddr_un` on Windows. (#6513)</title>
<updated>2022-11-17T22:50:25+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-11-17T22:50:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda'/>
<id>ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda</id>
<content type='text'>
* 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 &lt;kanis@comcard.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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 &lt;kanis@comcard.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Windows: Readlink improvements (#6745)</title>
<updated>2022-11-17T09:57:52+00:00</updated>
<author>
<name>Lars Kanis</name>
<email>kanis@comcard.de</email>
</author>
<published>2022-11-17T09:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7b1d23fd295fe8275b313f31ea545f7f6b3f2e62'/>
<id>7b1d23fd295fe8275b313f31ea545f7f6b3f2e62</id>
<content type='text'>
* 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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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</pre>
</div>
</content>
</entry>
<entry>
<title>eliminate magic number</title>
<updated>2022-09-08T15:45:56+00:00</updated>
<author>
<name>YO4</name>
<email>ysno@ac.auone-net.jp</email>
</author>
<published>2022-09-07T13:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=28030f7b543299b3f5af41a3c9cf445d23820d26'/>
<id>28030f7b543299b3f5af41a3c9cf445d23820d26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win32.c additional fix: is_readable_console</title>
<updated>2022-09-08T15:45:56+00:00</updated>
<author>
<name>YO4</name>
<email>ysno@ac.auone-net.jp</email>
</author>
<published>2022-09-02T16:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=81e7573a64b0544da7172966b88e797033b1eae6'/>
<id>81e7573a64b0544da7172966b88e797033b1eae6</id>
<content type='text'>
classic console(conhost.exe) reports an input with ALT+NUMPAD as VK_MENU, KeyUp, and uChar!=0.
additional fix for #5634
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
classic console(conhost.exe) reports an input with ALT+NUMPAD as VK_MENU, KeyUp, and uChar!=0.
additional fix for #5634
</pre>
</div>
</content>
</entry>
</feed>
