Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf ATF needs C++98 for now, and GCC 6.4 defaul...
details: https://anonhg.NetBSD.org/src/rev/8dde82b913e0
branches: trunk
changeset: 829489:8dde82b913e0
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Feb 04 01:41:05 2018 +0000
description:
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.
diffstat:
external/bsd/atf/Makefile.inc | 4 +++-
external/bsd/atf/dist/tools/process.cpp | 16 ++++++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 845310939187 -r 8dde82b913e0 external/bsd/atf/Makefile.inc
--- a/external/bsd/atf/Makefile.inc Sun Feb 04 01:17:40 2018 +0000
+++ b/external/bsd/atf/Makefile.inc Sun Feb 04 01:41:05 2018 +0000
@@ -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}/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}
diff -r 845310939187 -r 8dde82b913e0 external/bsd/atf/dist/tools/process.cpp
--- a/external/bsd/atf/dist/tools/process.cpp Sun Feb 04 01:17:40 2018 +0000
+++ b/external/bsd/atf/dist/tools/process.cpp Sun Feb 04 01:41:05 2018 +0000
@@ -441,10 +441,12 @@
::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 @@
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);
Home |
Main Index |
Thread Index |
Old Index