From 87d896f1107a077f3d1876f8feb9dcf9ee93ea3c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Apr 2020 16:20:29 +0200 Subject: Pass LC_ALL=C when extracting locale-dependent information on POSIX --- libbuild2/diagnostics.hxx | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'libbuild2/diagnostics.hxx') diff --git a/libbuild2/diagnostics.hxx b/libbuild2/diagnostics.hxx index aef7bec..1290634 100644 --- a/libbuild2/diagnostics.hxx +++ b/libbuild2/diagnostics.hxx @@ -32,13 +32,15 @@ namespace build2 // nameN arg arg ... nullptr nullptr // LIBBUILD2_SYMEXPORT void - print_process (diag_record&, const char* const* args, size_t n = 0); + print_process (diag_record&, + const char* const* args, size_t n = 0); LIBBUILD2_SYMEXPORT void print_process (const char* const* args, size_t n = 0); inline void - print_process (diag_record& dr, const cstrings& args, size_t n = 0) + print_process (diag_record& dr, + const cstrings& args, size_t n = 0) { print_process (dr, args.data (), n != 0 ? n : args.size ()); } @@ -49,6 +51,28 @@ namespace build2 print_process (args.data (), n != 0 ? n : args.size ()); } + // As above but with process_env. + // + LIBBUILD2_SYMEXPORT void + print_process (diag_record&, + const process_env&, const char* const* args, size_t n = 0); + + LIBBUILD2_SYMEXPORT void + print_process (const process_env&, const char* const* args, size_t n = 0); + + inline void + print_process (diag_record& dr, + const process_env& pe, const cstrings& args, size_t n = 0) + { + print_process (dr, pe, args.data (), n != 0 ? n : args.size ()); + } + + inline void + print_process (const process_env& pe, const cstrings& args, size_t n = 0) + { + print_process (pe, args.data (), n != 0 ? n : args.size ()); + } + // Program verbosity level (-v/--verbose plus --silent). // // 0 - disabled -- cgit v1.1