Use .cpp as the extension for temporary C++ files.

Using a .c extension for a C++ file raises the following warning, which
breaks our header file tests if the compiler is using -Werror as well:

c++: warning: treating 'c' input as 'c++' when in C++ mode, this
behavior is deprecated

Obtained from:	atf (git 3104010c2849330440cc0ce108ff341913433339)
MFC after:	3 days
This commit is contained in:
Julio Merino 2014-01-09 18:53:21 +00:00
parent a0e04ab3ff
commit 6d732c66bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260491

View file

@ -67,14 +67,14 @@ build_check_cxx_o(const atf::tests::tc& tc, const char* sfile,
void
header_check(const char *hdrname)
{
std::ofstream srcfile("test.c");
std::ofstream srcfile("test.cpp");
ATF_REQUIRE(srcfile);
srcfile << "#include <" << hdrname << ">\n";
srcfile.close();
const std::string failmsg = std::string("Header check failed; ") +
hdrname + " is not self-contained";
build_check_cxx_o_aux(atf::fs::path("test.c"), failmsg.c_str(), true);
build_check_cxx_o_aux(atf::fs::path("test.cpp"), failmsg.c_str(), true);
}
atf::fs::path