Module Name: src
Committed By: mrg
Date: Sun Feb 4 01:41:05 UTC 2018
Modified Files:
src/external/bsd/atf: Makefile.inc
src/external/bsd/atf/dist/tools: process.cpp
Log Message:
ATF needs C++98 for now, and GCC 6.4 defaults to C++11.
fix a problem -Werror=misleading-indentation found but has zero
effect on the running code.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/Makefile.inc
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/process.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/atf/Makefile.inc
diff -u src/external/bsd/atf/Makefile.inc:1.5 src/external/bsd/atf/Makefile.inc:1.6
--- src/external/bsd/atf/Makefile.inc:1.5 Sat Feb 15 04:19:46 2014
+++ src/external/bsd/atf/Makefile.inc Sun Feb 4 01:41:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.5 2014/02/15 04:19:46 jmmv Exp $
+# $NetBSD: Makefile.inc,v 1.6 2018/02/04 01:41:05 mrg Exp $
.include <bsd.own.mk>
@@ -41,6 +41,8 @@ CPPFLAGS+= -I${TOPDIR} # For bconfig.h
CPPFLAGS+= -I${TOPDIR}/lib/libatf-c # For atf-c/defs.hpp.
CPPFLAGS+= -I${SRCDIR}
+CXXFLAGS+= -std=gnu++98
+
.if defined(USE_ATF_LIBTOOLS)
LIBTOOLSOBJDIR!= cd ${TOPDIR}/lib/tools; ${PRINTOBJDIR}
CPPFLAGS+= -I${LIBTOOLSOBJDIR}
Index: src/external/bsd/atf/dist/tools/process.cpp
diff -u src/external/bsd/atf/dist/tools/process.cpp:1.4 src/external/bsd/atf/dist/tools/process.cpp:1.5
--- src/external/bsd/atf/dist/tools/process.cpp:1.4 Wed Dec 30 22:23:38 2015
+++ src/external/bsd/atf/dist/tools/process.cpp Sun Feb 4 01:41:05 2018
@@ -441,10 +441,12 @@ impl::child::~child(void)
::kill(m_pid, SIGTERM);
(void)wait();
- if (m_stdout != -1)
- ::close(m_stdout);
- if (m_stderr != -1)
- ::close(m_stderr);
+ if (m_stdout != -1) {
+ ::close(m_stdout); m_stdout = -1;
+ }
+ if (m_stderr != -1) {
+ ::close(m_stderr); m_stderr = -1;
+ }
}
}
@@ -457,10 +459,12 @@ impl::child::wait(void)
throw system_error(IMPL_NAME "::child::wait", "Failed waiting for "
"process " + text::to_string(m_pid), errno);
- if (m_stdout != -1)
+ if (m_stdout != -1) {
::close(m_stdout); m_stdout = -1;
- if (m_stderr != -1)
+ }
+ if (m_stderr != -1) {
::close(m_stderr); m_stderr = -1;
+ }
m_waited = true;
return status(s);