<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_os.cc, branch Ninja.py-StringIO</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>os: assume UTF-8 for hostname</title>
<updated>2019-05-26T13:38:51+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-05-24T11:14:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=6f924b60c50d446b46b358a76d15b675a311002b'/>
<id>6f924b60c50d446b46b358a76d15b675a311002b</id>
<content type='text'>
Do not assume Latin-1, but rather UTF-8 for the result of getting the
OS hostname.

While in 99 % of cases these strings are stored in ASCII, the OS does
not enforce an encoding on its own, and apparently the hostname is
sometimes set to non-ASCII data (despite at least some versions of
hostname(1) rejecting such input, making it even harder to write a
test for this which would already require root privileges).

In any case, these are short strings, so assuming UTF-8 comes
with no significant overhead.

Fixes: https://github.com/nodejs/node/issues/27848

PR-URL: https://github.com/nodejs/node/pull/27849
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Сковорода Никита Андреевич &lt;chalkerx@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not assume Latin-1, but rather UTF-8 for the result of getting the
OS hostname.

While in 99 % of cases these strings are stored in ASCII, the OS does
not enforce an encoding on its own, and apparently the hostname is
sometimes set to non-ASCII data (despite at least some versions of
hostname(1) rejecting such input, making it even harder to write a
test for this which would already require root privileges).

In any case, these are short strings, so assuming UTF-8 comes
with no significant overhead.

Fixes: https://github.com/nodejs/node/issues/27848

PR-URL: https://github.com/nodejs/node/pull/27849
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Сковорода Никита Андреевич &lt;chalkerx@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove util-inl.h from header files</title>
<updated>2019-05-13T20:43:26+00:00</updated>
<author>
<name>Sam Roberts</name>
<email>vieuxtech@gmail.com</email>
</author>
<published>2019-05-09T19:52:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b6bfc193788b1838bee73d584fe089e1104b9f88'/>
<id>b6bfc193788b1838bee73d584fe089e1104b9f88</id>
<content type='text'>
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

PR-URL: https://github.com/nodejs/node/pull/27631
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

PR-URL: https://github.com/nodejs/node/pull/27631
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: replace FromJust() with Check() when possible</title>
<updated>2019-04-12T19:33:37+00:00</updated>
<author>
<name>Sam Roberts</name>
<email>vieuxtech@gmail.com</email>
</author>
<published>2019-04-09T22:21:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=060d901f87b3d87314f8540eb02f315e2952f581'/>
<id>060d901f87b3d87314f8540eb02f315e2952f581</id>
<content type='text'>
FromJust() is often used not for its return value, but for its
side-effects. In these cases, Check() exists, and is more clear as to
the intent. From its comment:

  To be used, where the actual value of the Maybe is not needed, like
  Object::Set.

See: https://github.com/nodejs/node/pull/26929/files#r269256335

PR-URL: https://github.com/nodejs/node/pull/27162
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FromJust() is often used not for its return value, but for its
side-effects. In these cases, Check() exists, and is more clear as to
the intent. From its comment:

  To be used, where the actual value of the Maybe is not needed, like
  Object::Set.

See: https://github.com/nodejs/node/pull/26929/files#r269256335

PR-URL: https://github.com/nodejs/node/pull/27162
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: de-lint header usage</title>
<updated>2019-03-12T13:57:19+00:00</updated>
<author>
<name>Refael Ackermann</name>
<email>refack@gmail.com</email>
</author>
<published>2019-02-25T22:27:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f2064dfc1fee2daa0537bc27d79d5aa0f734faaf'/>
<id>f2064dfc1fee2daa0537bc27d79d5aa0f734faaf</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/26306
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/26306
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: apply clang-tidy rule modernize-deprecated-headers</title>
<updated>2019-02-27T04:35:53+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-02-17T02:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=8137668c531935c58347cd8e78147d3a9d3cc339'/>
<id>8137668c531935c58347cd8e78147d3a9d3cc339</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/26159
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/26159
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: simplify loop arithmetic in `GetCPUInfo`</title>
<updated>2019-02-21T07:45:40+00:00</updated>
<author>
<name>Gireesh Punathil</name>
<email>gpunathi@in.ibm.com</email>
</author>
<published>2019-02-18T13:35:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e51da1fcadc822fb514cd6b32e932d7c0c3239a7'/>
<id>e51da1fcadc822fb514cd6b32e932d7c0c3239a7</id>
<content type='text'>
Cache the repeated operations and reuse; potentially generating
efficient code in some platforms, and improving readability.

PR-URL: https://github.com/nodejs/node/pull/26183
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cache the repeated operations and reuse; potentially generating
efficient code in some platforms, and improving readability.

PR-URL: https://github.com/nodejs/node/pull/26183
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os,report: use UV_MAXHOSTNAMESIZE</title>
<updated>2019-02-13T13:19:41+00:00</updated>
<author>
<name>cjihrig</name>
<email>cjihrig@gmail.com</email>
</author>
<published>2019-02-10T17:17:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=8ecf313324e619d7211adaee76c6b7bb1882e12b'/>
<id>8ecf313324e619d7211adaee76c6b7bb1882e12b</id>
<content type='text'>
UV_MAXHOSTNAMESIZE was introduced in libuv 1.26.0. Use this
instead of including multiple header files, adding fallback
ifdef logic, and remembering to add one to the buffer size
for the terminating nul character with MAXHOSTNAMELEN.

PR-URL: https://github.com/nodejs/node/pull/26038
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UV_MAXHOSTNAMESIZE was introduced in libuv 1.26.0. Use this
instead of including multiple header files, adding fallback
ifdef logic, and remembering to add one to the buffer size
for the terminating nul character with MAXHOSTNAMELEN.

PR-URL: https://github.com/nodejs/node/pull/26038
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
Reviewed-By: Sakthipriyan Vairamani &lt;thechargingvolcano@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os: implement os.type() using uv_os_uname()</title>
<updated>2019-01-25T13:54:55+00:00</updated>
<author>
<name>cjihrig</name>
<email>cjihrig@gmail.com</email>
</author>
<published>2019-01-21T23:45:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=16e4cd19f29287677500583918449b87e29fa29a'/>
<id>16e4cd19f29287677500583918449b87e29fa29a</id>
<content type='text'>
The happy path behavior should be identical on all
platforms except MinGW, which now identifies MinGW
separately from Windows.

PR-URL: https://github.com/nodejs/node/pull/25659
Reviewed-By: Bartosz Sosnowski &lt;bartosz@janeasystems.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Minwoo Jung &lt;minwoo@nodesource.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The happy path behavior should be identical on all
platforms except MinGW, which now identifies MinGW
separately from Windows.

PR-URL: https://github.com/nodejs/node/pull/25659
Reviewed-By: Bartosz Sosnowski &lt;bartosz@janeasystems.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Minwoo Jung &lt;minwoo@nodesource.com&gt;
Reviewed-By: Jeremiah Senkpiel &lt;fishrock123@rocketmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove using v8::Function in node_os.cc</title>
<updated>2019-01-24T13:30:19+00:00</updated>
<author>
<name>cjihrig</name>
<email>cjihrig@gmail.com</email>
</author>
<published>2019-01-21T23:51:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d40ed71c1136c4a1c93ed5fe16bf6e3f9ca7631d'/>
<id>d40ed71c1136c4a1c93ed5fe16bf6e3f9ca7631d</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/25640
Reviewed-By: Denys Otrishko &lt;shishugi@gmail.com&gt;
Reviewed-By: Michael Dawson &lt;michael_dawson@ca.ibm.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/25640
Reviewed-By: Denys Otrishko &lt;shishugi@gmail.com&gt;
Reviewed-By: Michael Dawson &lt;michael_dawson@ca.ibm.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os: implement os.release() using uv_os_uname()</title>
<updated>2019-01-23T05:15:10+00:00</updated>
<author>
<name>cjihrig</name>
<email>cjihrig@gmail.com</email>
</author>
<published>2019-01-21T01:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=914af23b3d13c7e5f9439621db80a595ad9a0fb8'/>
<id>914af23b3d13c7e5f9439621db80a595ad9a0fb8</id>
<content type='text'>
For non-Windows platforms, the happy path behavior should be
identical. On Windows, uv_os_uname() attempts to use
RtlGetVersion() before falling back to the deprecated
GetVersionExW() that Node was previously using.

PR-URL: https://github.com/nodejs/node/pull/25600
Reviewed-By: Bartosz Sosnowski &lt;bartosz@janeasystems.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For non-Windows platforms, the happy path behavior should be
identical. On Windows, uv_os_uname() attempts to use
RtlGetVersion() before falling back to the deprecated
GetVersionExW() that Node was previously using.

PR-URL: https://github.com/nodejs/node/pull/25600
Reviewed-By: Bartosz Sosnowski &lt;bartosz@janeasystems.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</pre>
</div>
</content>
</entry>
</feed>
