Blame include/internal/catch_errno_guard.cpp

rpm-build a7f80b
/*
rpm-build a7f80b
 *  Created by Martin on 06/03/2017.
rpm-build a7f80b
 *
rpm-build a7f80b
 *  Distributed under the Boost Software License, Version 1.0. (See accompanying
rpm-build a7f80b
 *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
rpm-build a7f80b
 */
rpm-build a7f80b
rpm-build a7f80b
#include "catch_errno_guard.h"
rpm-build a7f80b
rpm-build a7f80b
#include <cerrno>
rpm-build a7f80b
rpm-build a7f80b
namespace Catch {
rpm-build a7f80b
        ErrnoGuard::ErrnoGuard():m_oldErrno(errno){}
rpm-build a7f80b
        ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; }
rpm-build a7f80b
}