From owner-svn-src-head@freebsd.org Thu Sep 29 09:16:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACDC0C012DA; Thu, 29 Sep 2016 09:16:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CC28EE7; Thu, 29 Sep 2016 09:16:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8T9G2tT015402; Thu, 29 Sep 2016 09:16:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8T9G2ZR015401; Thu, 29 Sep 2016 09:16:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201609290916.u8T9G2ZR015401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 29 Sep 2016 09:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306440 - head/contrib/atf/atf-sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 09:16:03 -0000 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;