> On April 14, 2016, 9:55 p.m., Michael Park wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp, lines > > 355-360 > > <https://reviews.apache.org/r/46191/diff/1/?file=1343998#file1343998line355> > > > > If we pull out `internal::os_version`, we could do less work here: > > > > ``` > > Try<OSVERSIONINFOEX> os_version = internal::os_version(); > > if (os_version.isError()) { > > return Error(os_version.error()); > > } > > > > return internal::sysname(os_version); > > ``` > > > > If the idea is to keep the implementation consistent with > > `posix/os.hpp` that sounds fine as well, in which case we should just > > define this in `os.hpp`.
Actually, we should just pull this out into `stout/os.hpp` because the different implementations are identical right now. > On April 14, 2016, 9:55 p.m., Michael Park wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp, line 310 > > <https://reviews.apache.org/r/46191/diff/1/?file=1343998#file1343998line310> > > > > Please use a C++ cast. I don't really know enough about C++ casts to know what the "right thing" to do here is. My simpleton's understanding is the preference is: (1) `static_cast` (2) `dynamic_cast`, and (3) `reinterpret_cast`. That said, I think only the last works, so that's what I guessed you wanted. - Alex ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46191/#review129003 ----------------------------------------------------------- On April 15, 2016, 8:42 a.m., Alex Clemmer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46191/ > ----------------------------------------------------------- > > (Updated April 15, 2016, 8:42 a.m.) > > > Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, > Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun. > > > Bugs: MESOS-4470 > https://issues.apache.org/jira/browse/MESOS-4470 > > > Repository: mesos > > > Description > ------- > > Stout: Implemented `uname` on Windows. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp > 79e30ca04c6d23f92e3a2f80fbe38ae63fde3520 > 3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp > edaa76a5322d0bf60b7172405aa754b5aca95458 > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp > c48106e5905e3be0faeba7177ef534766089faff > > Diff: https://reviews.apache.org/r/46191/diff/ > > > Testing > ------- > > > Thanks, > > Alex Clemmer > >
