1 /* 2 * Created by Martin on 06/03/2017. 3 * 4 * Distributed under the Boost Software License, Version 1.0. (See accompanying 5 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 */ 7 8 #include "catch_errno_guard.h" 9 10 #include <cerrno> 11 12 namespace Catch { ErrnoGuard()13 ErrnoGuard::ErrnoGuard():m_oldErrno(errno){} ~ErrnoGuard()14 ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; } 15 } 16