> On Dec. 23, 2015, 5:28 a.m., Daniel Pravat wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/internal/windows/dirent.hpp,
> >  line 104
> > <https://reviews.apache.org/r/39019/diff/9/?file=1174985#file1174985line104>
> >
> >     Can you check the semnatic of opendir() function? I'm under the 
> > imression that the first file is found after a susequential readdir() call. 
> > Is the intent to change the behaviour on Windows?
> 
> Alex Clemmer wrote:
>     I believe this implementation is correct. The POSIX specification[1] 
> says: "The directory stream is positioned at the first entry." Do you read 
> this differently?
>     
>     [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/opendir.html
> 
> Alex Clemmer wrote:
>     I'm going to close this issue, but feel free to open it again if you 
> think I'm missing something.

The reason whay I asked is when I'm reading code like this that implies that a 
readdir is necesary afterwards. Not an issue at this time. 

DIR* dir = opendir(name.c_str());
    if (dir != NULL) {
      while (true) {
        struct dirent* entry = readdir(dir);


- Daniel


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


On Dec. 23, 2015, 6:44 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39019/
> -----------------------------------------------------------
> 
> (Updated Dec. 23, 2015, 6:44 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, 
> Joris Van Remoortere, and Joseph Wu.
> 
> 
> Bugs: MESOS-3441
>     https://issues.apache.org/jira/browse/MESOS-3441
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows: Added dirent compat code for non-Unix systems.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
>   
> 3rdparty/libprocess/3rdparty/stout/include/stout/internal/windows/dirent.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp 
> d46e262e0fd1c2de36f3bf19d8bd693c23bf58cd 
> 
> Diff: https://reviews.apache.org/r/39019/diff/
> 
> 
> Testing
> -------
> 
> `make check` from autotools on Ubuntu 15.
> `make check` from CMake on OS X 10.10.
> Ran `check` project in VS on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>

Reply via email to