Rename stdin, etc. in Subprocess to work with MSVC
authorChristopher Dykes <cdykes@fb.com>
Wed, 7 Dec 2016 19:42:17 +0000 (11:42 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Wed, 7 Dec 2016 19:53:31 +0000 (11:53 -0800)
commit2f6eb18232a6171794142ad8e7fa234b14726d7f
tree4214a249e055ccaae0423010e0c09989645c4c45
parent65d64c0d7d7d23b5bf0c4e52d66d2caeb5f06ced
Rename stdin, etc. in Subprocess to work with MSVC

Summary:
`stdin`, `stdout` and `stderr` are macros that expand to function calls with the MSVC CRT implementation. This is also the case for musl-libc. This means that Subprocess simply cannot be compiled on those platforms without changing the API.
To solve that, we change the API and deprecate the old API.

For more fun, `stdin`, `stdout` and `stderr` are also macros in glibc, they just expand to other identifiers rather than a function call.

Reviewed By: yfeldblum

Differential Revision: D4229544

fbshipit-source-id: 97f1a3b228b83cfdcaffee56d729063ea235e608
folly/Subprocess.h
folly/experimental/test/NestedCommandLineAppTest.cpp
folly/test/SingletonTest.cpp
folly/test/SubprocessTest.cpp