diff options
author | Adam Langley <agl@google.com> | 2016-07-11 14:07:19 -0700 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-07-11 23:04:52 +0000 |
commit | 09feb0f3d95a2bc58ce0faaf14256d3bd30f52a4 (patch) | |
tree | c5d03846c2bffc42b9ab9bd6b6e30e044d7962b6 /tool/tool.cc | |
parent | 09eb655e5cb202878b831eadb30c92ab24960d4a (diff) | |
download | boringssl-09feb0f3d95a2bc58ce0faaf14256d3bd30f52a4.zip boringssl-09feb0f3d95a2bc58ce0faaf14256d3bd30f52a4.tar.gz boringssl-09feb0f3d95a2bc58ce0faaf14256d3bd30f52a4.tar.bz2 |
Move C++ helpers into |bssl| namespace.
We currently have the situation where the |tool| and |bssl_shim| code
includes scoped_types.h from crypto/test and ssl/test. That's weird and
shouldn't happen. Also, our C++ consumers might quite like to have
access to the scoped types.
Thus this change moves some of the template code to base.h and puts it
all in a |bssl| namespace to prepare for scattering these types into
their respective headers. In order that all the existing test code be
able to access these types, it's all moved into the same namespace.
Change-Id: I3207e29474dc5fcc344ace43119df26dae04eabb
Reviewed-on: https://boringssl-review.googlesource.com/8730
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'tool/tool.cc')
-rw-r--r-- | tool/tool.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tool/tool.cc b/tool/tool.cc index 34851b4..8519108 100644 --- a/tool/tool.cc +++ b/tool/tool.cc @@ -29,6 +29,8 @@ #include "internal.h" +namespace bssl { + typedef bool (*tool_func_t)(const std::vector<std::string> &args); struct Tool { @@ -79,7 +81,8 @@ static tool_func_t FindTool(const std::string &name) { } } -int main(int argc, char **argv) { + +static int Main(int argc, char **argv) { #if defined(OPENSSL_WINDOWS) // Read and write in binary mode. This makes bssl on Windows consistent with // bssl on other platforms, and also makes it consistent with MSYS's commands @@ -124,3 +127,9 @@ int main(int argc, char **argv) { return !tool(args); } + +} // namespace bssl + +int main(int argc, char **argv) { + return bssl::Main(argc, argv); +} |