Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-16 Thread Joseph Wu

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

Ship it!


Can you also update the summary/description of this review?  
(s/chsize/ftruncate/)


3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp (lines 
23 - 25)


This comment doesn't seem necessary.  (Not to mention it talks about 
Windows in a Posix file :)



3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
(lines 26 - 27)


You probably don't need to mention open files.  It's included in the 
`ftruncate` man page.


- Joseph Wu


On Oct. 15, 2015, 9:45 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39217/
> ---
> 
> (Updated Oct. 15, 2015, 9:45 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Added `stout/os/chsize.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39217/diff/
> 
> 
> Testing
> ---
> 
> Built CMake solution and ran `make check` (or equivalent) on Windows 10, 
> Ubuntu 15, OS X 10.10. Built autotools solution and ran `make check` on 
> Ubuntu 15.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-16 Thread Alex Clemmer


> On Oct. 16, 2015, 5:51 p.m., Joseph Wu wrote:
> > Can you also update the summary/description of this review?  
> > (s/chsize/ftruncate/)

Good idea. I'll update it to use the commit message currently on the review.


- Alex


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


On Oct. 16, 2015, 4:45 a.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39217/
> ---
> 
> (Updated Oct. 16, 2015, 4:45 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Added `stout/os/chsize.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39217/diff/
> 
> 
> Testing
> ---
> 
> Built CMake solution and ran `make check` (or equivalent) on Windows 10, 
> Ubuntu 15, OS X 10.10. Built autotools solution and ran `make check` on 
> Ubuntu 15.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-15 Thread James Peach

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



3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp (line 
30)


Should this be ```_chsize_s``` so you can use a large offset?


- James Peach


On Oct. 15, 2015, 8:36 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39217/
> ---
> 
> (Updated Oct. 15, 2015, 8:36 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Added `stout/os/chsize.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39217/diff/
> 
> 
> Testing
> ---
> 
> Built CMake solution and ran `make check` (or equivalent) on Windows 10, 
> Ubuntu 15, OS X 10.10. Built autotools solution and ran `make check` on 
> Ubuntu 15.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-15 Thread Alex Clemmer

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

(Updated Oct. 15, 2015, 8:36 p.m.)


Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
Wu.


Repository: mesos


Description
---

Windows: Added `stout/os/chsize.hpp`.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
PRE-CREATION 

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


Testing
---

Built CMake solution and ran `make check` (or equivalent) on Windows 10, Ubuntu 
15, OS X 10.10. Built autotools solution and ran `make check` on Ubuntu 15.


Thanks,

Alex Clemmer



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-15 Thread Alex Clemmer

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

(Updated Oct. 15, 2015, 8:33 p.m.)


Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
Wu.


Repository: mesos


Description
---

Windows: Added `stout/os/chsize.hpp`.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
PRE-CREATION 

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


Testing
---

Built CMake solution and ran `make check` (or equivalent) on Windows 10, Ubuntu 
15, OS X 10.10. Built autotools solution and ran `make check` on Ubuntu 15.


Thanks,

Alex Clemmer



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-15 Thread Alex Clemmer


> On Oct. 15, 2015, 8:58 p.m., James Peach wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp, 
> > line 30
> > 
> >
> > Should this be ```_chsize_s``` so you can use a large offset?

Ah. I didn't know about that function. Yes, that looks like an improvement! 
Thanks!


- Alex


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


On Oct. 15, 2015, 8:36 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39217/
> ---
> 
> (Updated Oct. 15, 2015, 8:36 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Added `stout/os/chsize.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39217/diff/
> 
> 
> Testing
> ---
> 
> Built CMake solution and ran `make check` (or equivalent) on Windows 10, 
> Ubuntu 15, OS X 10.10. Built autotools solution and ran `make check` on 
> Ubuntu 15.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-15 Thread Alex Clemmer

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

(Updated Oct. 16, 2015, 4:45 a.m.)


Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
Wu.


Repository: mesos


Description
---

Windows: Added `stout/os/chsize.hpp`.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/ftruncate.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/ftruncate.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/ftruncate.hpp 
PRE-CREATION 

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


Testing
---

Built CMake solution and ran `make check` (or equivalent) on Windows 10, Ubuntu 
15, OS X 10.10. Built autotools solution and ran `make check` on Ubuntu 15.


Thanks,

Alex Clemmer



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-13 Thread Joseph Wu

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



3rdparty/libprocess/3rdparty/stout/include/Makefile.am (line 67)


Nit: We want the trailing slashes to line up on RB.



3rdparty/libprocess/3rdparty/stout/include/Makefile.am (line 96)


Nit: We want the trailing slashes to line up on RB.



3rdparty/libprocess/3rdparty/stout/include/stout/os/chsize.hpp (lines 21 - 23)


Can you rename the files/methods?

`chsize` seems to be the Windows name.  But `ftruncate` seems to better 
describe what the method is doing.



3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chsize.hpp (lines 24 
- 25)


This doc says that `ftruncate` needs an open fd too:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/ftruncate.html


- Joseph Wu


On Oct. 13, 2015, 11:35 a.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39217/
> ---
> 
> (Updated Oct. 13, 2015, 11:35 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Added `stout/os/chsize.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/chsize.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chsize.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/chsize.hpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39217/diff/
> 
> 
> Testing
> ---
> 
> Built CMake solution and ran `make check` (or equivalent) on Windows 10, 
> Ubuntu 15, OS X 10.10. Built autotools solution and ran `make check` on 
> Ubuntu 15.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-13 Thread Alex Clemmer


> On Oct. 13, 2015, 7:38 p.m., Joseph Wu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chsize.hpp, lines 
> > 24-25
> > 
> >
> > This doc says that `ftruncate` needs an open fd too:
> > http://pubs.opengroup.org/onlinepubs/7908799/xsh/ftruncate.html

Oh. Yes, sorry, I misread the comments of an important OSS codebase that ported 
`ftruncate`. Basically, what they said was that there is no equivalent of 
`truncate`, so you have to open the file to truncate it. They did not say, as I 
had thought, that the file descriptor doesn't need to be open on POSIX. My 
mistake. Of course in retrospect it has to be an open file descriptor.


- Alex


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


On Oct. 13, 2015, 6:35 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39217/
> ---
> 
> (Updated Oct. 13, 2015, 6:35 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
> Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Windows: Added `stout/os/chsize.hpp`.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/chsize.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chsize.hpp 
> PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/chsize.hpp 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/39217/diff/
> 
> 
> Testing
> ---
> 
> Built CMake solution and ran `make check` (or equivalent) on Windows 10, 
> Ubuntu 15, OS X 10.10. Built autotools solution and ran `make check` on 
> Ubuntu 15.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-13 Thread Alex Clemmer

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

(Updated Oct. 13, 2015, 6:35 p.m.)


Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
Wu.


Repository: mesos


Description
---

Windows: Added `stout/os/chsize.hpp`.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/chsize.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chsize.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/chsize.hpp 
PRE-CREATION 

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


Testing
---

Built CMake solution and ran `make check` (or equivalent) on Windows 10, Ubuntu 
15, OS X 10.10. Built autotools solution and ran `make check` on Ubuntu 15.


Thanks,

Alex Clemmer



Review Request 39217: Windows: Added `stout/os/chsize.hpp`.

2015-10-12 Thread Alex Clemmer

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

Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph 
Wu.


Repository: mesos


Description
---

Windows: Added `stout/os/chsize.hpp`.


Diffs
-

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/chsize.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chsize.hpp 
PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/chsize.hpp 
PRE-CREATION 

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


Testing
---

Built CMake solution and ran `make check` (or equivalent) on Windows 10, Ubuntu 
15, OS X 10.10. Built autotools solution and ran `make check` on Ubuntu 15.


Thanks,

Alex Clemmer