mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Subject Re: Review Request 54877: Windows: Stout: Removed dependency on Shell API.
Date Tue, 03 Jan 2017 22:14:27 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54877/
-----------------------------------------------------------

(Updated Jan. 3, 2017, 10:14 p.m.)


Review request for mesos, Daniel Pravat, Alex Clemmer, and Joseph Wu.


Changes
-------

Windows code-page != ASCII; typo for ANSI.


Repository: mesos


Description (updated)
-------

The API `SHGetKnownFolderPath` requires `Shell32.dll`,
which is not available on Nano server.
The equivalent API `GetAllUsersProfileDirectory`
only requires `Userenv.dll`, which is available on Nano.

This API is also friendlier, as we own the allocation.

The Unicode version `GetAllUsersProfileDirectoryW` is
explicitly used so that we are guaranteed a Unicode path,
which we then convert from UTF-16 to UTF-8,
instead of using the ANSI version which depends on a
varying Windows code-page, and is not recommended.

A `vector<wchar_t>` is used over a `wstring` to avoid dealing
with the placement of the null-terminating character.


Diffs
-----

  3rdparty/stout/include/stout/windows.hpp e641c46d033372e1b6c9f9c066b1ad4957d55088 
  3rdparty/stout/include/stout/windows/os.hpp 5cd92545a49648e39e8eb7cf131895e9cfc97902 

Diff: https://reviews.apache.org/r/54877/diff/


Testing
-------

cmake && msbuild, attach agent to master and check default `runtime_dir` value.


Thanks,

Andrew Schwartzmeyer


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message