diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-04-06 16:20:29 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-07 15:09:59 +0300 |
commit | 87d896f1107a077f3d1876f8feb9dcf9ee93ea3c (patch) | |
tree | 609b144f65d0a0f0db95ea031d7cbf6dafec5535 /libbuild2/diagnostics.cxx | |
parent | e607800f687ba89fbdd97b2f1f1925217f00eb23 (diff) |
Pass LC_ALL=C when extracting locale-dependent information on POSIX
Diffstat (limited to 'libbuild2/diagnostics.cxx')
-rw-r--r-- | libbuild2/diagnostics.cxx | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/libbuild2/diagnostics.cxx b/libbuild2/diagnostics.cxx index 0a01457..ee4651d 100644 --- a/libbuild2/diagnostics.cxx +++ b/libbuild2/diagnostics.cxx @@ -49,14 +49,32 @@ namespace build2 void print_process (const char* const* args, size_t n) { - diag_record r (text); - print_process (r, args, n); + diag_record dr (text); + print_process (dr, args, n); } void - print_process (diag_record& r, const char* const* args, size_t n) + print_process (diag_record& dr, + const char* const* args, size_t n) { - r << butl::process_args {args, n}; + dr << butl::process_args {args, n}; + } + + void + print_process (const process_env& pe, const char* const* args, size_t n) + { + diag_record dr (text); + print_process (dr, pe, args, n); + } + + void + print_process (diag_record& dr, + const process_env& pe, const char* const* args, size_t n) + { + if (pe.env ()) + dr << pe << ' '; + + dr << butl::process_args {args, n}; } // Diagnostics stack. |