You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alex Clemmer <cl...@gmail.com> on 2015/10/13 11:09:34 UTC

Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

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

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


Repository: mesos


Description
-------

Windows standard headers define a macro, `environ`, that holds the
environment data for the executing process. Unfortunately, the existance
of this macro makes it impossible to use a function called
`os::environ`.

Our solution to this problem in this commit is to move the function
family at `os::environ`* to `os::raw::environment`. This family exists
in the `os::raw` because they are the "unstructured" variants of
functions with the same names that exist in the `os` namespace. For
example, `os::raw::environment` returns a `char**` which is the
"unstructured" equivalent of `os::environment`, which returns a
`map<string, string>`.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 5d2f39d9a9d963225bf463572cb8fe99dd9aa6f5 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp e6d36ec1bf414b52d0899f0edf83e0ad8910dd0e 

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


Testing
-------

`make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.


Thanks,

Alex Clemmer


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Alex Clemmer <cl...@gmail.com>.

> On Oct. 13, 2015, 8:32 p.m., Joseph Wu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp, lines 34-37
> > <https://reviews.apache.org/r/39262/diff/2/?file=1097639#file1097639line34>
> >
> >     Which header defines the `environ` macro on Windows?  And why isn't it included in this file?  (Or does it need to be included at all?)

It's one of the headers that's included by default, sort of how libc gets included on Unix. You can tell GCC to not include libc with special flags, but I actually don't know if you can do this with MSVC.


- Alex


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


On Oct. 13, 2015, 6:36 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39262/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2015, 6:36 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows standard headers define a macro, `environ`, that holds the
> environment data for the executing process. Unfortunately, the existance
> of this macro makes it impossible to use a function called
> `os::environ`.
> 
> Our solution to this problem in this commit is to move the function
> family at `os::environ`* to `os::raw::environment`. This family exists
> in the `os::raw` because they are the "unstructured" variants of
> functions with the same names that exist in the `os` namespace. For
> example, `os::raw::environment` returns a `char**` which is the
> "unstructured" equivalent of `os::environment`, which returns a
> `map<string, string>`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp e6d36ec1bf414b52d0899f0edf83e0ad8910dd0e 
> 
> Diff: https://reviews.apache.org/r/39262/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Alex Clemmer <cl...@gmail.com>.

> On Oct. 13, 2015, 8:32 p.m., Joseph Wu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp, lines 34-37
> > <https://reviews.apache.org/r/39262/diff/2/?file=1097639#file1097639line34>
> >
> >     Which header defines the `environ` macro on Windows?  And why isn't it included in this file?  (Or does it need to be included at all?)
> 
> Alex Clemmer wrote:
>     It's one of the headers that's included by default, sort of how libc gets included on Unix. You can tell GCC to not include libc with special flags, but I actually don't know if you can do this with MSVC.

I'm marking this as dropped, but I don't know if that's the right thing to do! Let me know if this doesn't address the issue.


- Alex


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


On Oct. 15, 2015, 8:33 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39262/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2015, 8:33 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows standard headers define a macro, `environ`, that holds the
> environment data for the executing process. Unfortunately, the existance
> of this macro makes it impossible to use a function called
> `os::environ`.
> 
> Our solution to this problem in this commit is to move the function
> family at `os::environ`* to `os::raw::environment`. This family exists
> in the `os::raw` because they are the "unstructured" variants of
> functions with the same names that exist in the `os` namespace. For
> example, `os::raw::environment` returns a `char**` which is the
> "unstructured" equivalent of `os::environment`, which returns a
> `map<string, string>`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp ee2a7a79617612ed448e650cc77608c4962fe5a5 
> 
> Diff: https://reviews.apache.org/r/39262/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39262/#review102526
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp (line 20)
<https://reviews.apache.org/r/39262/#comment160218>

    Did you mean "non-OSX *and non-windows* platforms"?



3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp (lines 34 - 37)
<https://reviews.apache.org/r/39262/#comment160220>

    Which header defines the `environ` macro on Windows?  And why isn't it included in this file?  (Or does it need to be included at all?)


- Joseph Wu


On Oct. 13, 2015, 11:36 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39262/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2015, 11:36 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows standard headers define a macro, `environ`, that holds the
> environment data for the executing process. Unfortunately, the existance
> of this macro makes it impossible to use a function called
> `os::environ`.
> 
> Our solution to this problem in this commit is to move the function
> family at `os::environ`* to `os::raw::environment`. This family exists
> in the `os::raw` because they are the "unstructured" variants of
> functions with the same names that exist in the `os` namespace. For
> example, `os::raw::environment` returns a `char**` which is the
> "unstructured" equivalent of `os::environment`, which returns a
> `map<string, string>`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp e6d36ec1bf414b52d0899f0edf83e0ad8910dd0e 
> 
> Diff: https://reviews.apache.org/r/39262/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39262/#review103064
-----------------------------------------------------------

Ship it!



3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp (line 39)
<https://reviews.apache.org/r/39262/#comment160925>

    missing space


- Joris Van Remoortere


On Oct. 18, 2015, 6:40 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39262/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2015, 6:40 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows standard headers define a macro, `environ`, that holds the
> environment data for the executing process. Unfortunately, the existance
> of this macro makes it impossible to use a function called
> `os::environ`.
> 
> Our solution to this problem in this commit is to move the function
> family at `os::environ`* to `os::raw::environment`. This family exists
> in the `os::raw` because they are the "unstructured" variants of
> functions with the same names that exist in the `os` namespace. For
> example, `os::raw::environment` returns a `char**` which is the
> "unstructured" equivalent of `os::environment`, which returns a
> `map<string, string>`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp ee2a7a79617612ed448e650cc77608c4962fe5a5 
> 
> Diff: https://reviews.apache.org/r/39262/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39262/
-----------------------------------------------------------

(Updated Oct. 18, 2015, 6:40 p.m.)


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


Repository: mesos


Description
-------

Windows standard headers define a macro, `environ`, that holds the
environment data for the executing process. Unfortunately, the existance
of this macro makes it impossible to use a function called
`os::environ`.

Our solution to this problem in this commit is to move the function
family at `os::environ`* to `os::raw::environment`. This family exists
in the `os::raw` because they are the "unstructured" variants of
functions with the same names that exist in the `os` namespace. For
example, `os::raw::environment` returns a `char**` which is the
"unstructured" equivalent of `os::environment`, which returns a
`map<string, string>`.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp ee2a7a79617612ed448e650cc77608c4962fe5a5 

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


Testing
-------

`make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.


Thanks,

Alex Clemmer


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39262/#review102967
-----------------------------------------------------------

Ship it!


Ship It!

- Joseph Wu


On Oct. 15, 2015, 1:33 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39262/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2015, 1:33 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows standard headers define a macro, `environ`, that holds the
> environment data for the executing process. Unfortunately, the existance
> of this macro makes it impossible to use a function called
> `os::environ`.
> 
> Our solution to this problem in this commit is to move the function
> family at `os::environ`* to `os::raw::environment`. This family exists
> in the `os::raw` because they are the "unstructured" variants of
> functions with the same names that exist in the `os` namespace. For
> example, `os::raw::environment` returns a `char**` which is the
> "unstructured" equivalent of `os::environment`, which returns a
> `map<string, string>`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp ee2a7a79617612ed448e650cc77608c4962fe5a5 
> 
> Diff: https://reviews.apache.org/r/39262/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39262/
-----------------------------------------------------------

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


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


Repository: mesos


Description
-------

Windows standard headers define a macro, `environ`, that holds the
environment data for the executing process. Unfortunately, the existance
of this macro makes it impossible to use a function called
`os::environ`.

Our solution to this problem in this commit is to move the function
family at `os::environ`* to `os::raw::environment`. This family exists
in the `os::raw` because they are the "unstructured" variants of
functions with the same names that exist in the `os` namespace. For
example, `os::raw::environment` returns a `char**` which is the
"unstructured" equivalent of `os::environment`, which returns a
`map<string, string>`.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp ee2a7a79617612ed448e650cc77608c4962fe5a5 

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


Testing
-------

`make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.


Thanks,

Alex Clemmer


Re: Review Request 39262: Windows:[1/3] Moved `os::environ` -> `os::raw::environment`.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39262/
-----------------------------------------------------------

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


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


Repository: mesos


Description
-------

Windows standard headers define a macro, `environ`, that holds the
environment data for the executing process. Unfortunately, the existance
of this macro makes it impossible to use a function called
`os::environ`.

Our solution to this problem in this commit is to move the function
family at `os::environ`* to `os::raw::environment`. This family exists
in the `os::raw` because they are the "unstructured" variants of
functions with the same names that exist in the `os` namespace. For
example, `os::raw::environment` returns a `char**` which is the
"unstructured" equivalent of `os::environment`, which returns a
`map<string, string>`.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/Makefile.am 9e9c3119ad18f4cbc70c70095c71dc4fd19553df 
  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 5141c1369af60afd6cd5c70c6295d575ea960a83 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp a042d061159c83e1652e7288b90809981d2818c9 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 2b0966889af73238a08e29f1136d0ce286a0ffda 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp e6d36ec1bf414b52d0899f0edf83e0ad8910dd0e 

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


Testing
-------

`make check` on Ubuntu 15, OS X 10.10, and running the `check` project on Windows 10.


Thanks,

Alex Clemmer