Author: br
Date: Thu Sep 29 09:16:02 2016
New Revision: 306440
URL: https://svnweb.freebsd.org/changeset/base/306440

Log:
  Fix conversion from C++ std::string into C const char *.
  This fixes operation on MIPS64EB with GCC 4.2.1.
  
  Reviewed by:  jmmv
  Sponsored by: DARPA, AFRL
  Sponsored by: HEIF5
  Differential Revision:        https://reviews.freebsd.org/D7952

Modified:
  head/contrib/atf/atf-sh/atf-check.cpp

Modified: head/contrib/atf/atf-sh/atf-check.cpp
==============================================================================
--- head/contrib/atf/atf-sh/atf-check.cpp       Thu Sep 29 08:49:12 2016        
(r306439)
+++ head/contrib/atf/atf-sh/atf-check.cpp       Thu Sep 29 09:16:02 2016        
(r306440)
@@ -346,9 +346,10 @@ std::auto_ptr< atf::check::check_result 
 execute_with_shell(char* const* argv)
 {
     const std::string cmd = flatten_argv(argv);
+    const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL);
 
     const char* sh_argv[4];
-    sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str();
+    sh_argv[0] = shell.c_str();
     sh_argv[1] = "-c";
     sh_argv[2] = cmd.c_str();
     sh_argv[3] = NULL;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to