From a5aec941caed6b3b2367e617c78b28e5d9e339b6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 18 Jan 2024 20:21:45 +0200 Subject: [PATCH] Remove boost/system/cygwin_error.hpp --- include/boost/system/cygwin_error.hpp | 63 --------------------------- test/CMakeLists.txt | 1 - test/Jamfile.v2 | 1 - test/cygwin_error_test.cpp | 29 ------------ 4 files changed, 94 deletions(-) delete mode 100644 include/boost/system/cygwin_error.hpp delete mode 100644 test/cygwin_error_test.cpp diff --git a/include/boost/system/cygwin_error.hpp b/include/boost/system/cygwin_error.hpp deleted file mode 100644 index c67d36166..000000000 --- a/include/boost/system/cygwin_error.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// boost/system/cygwin_error.hpp -------------------------------------------// - -// Copyright Beman Dawes 2007 - -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See library home page at http://www.boost.org/libs/system - -#ifndef BOOST_SYSTEM_CYGWIN_ERROR_HPP -#define BOOST_SYSTEM_CYGWIN_ERROR_HPP - -#include - -#if !defined(BOOST_ALLOW_DEPRECATED_HEADERS) - BOOST_PRAGMA_MESSAGE("This header is deprecated and is slated for removal." - " If you want it retained, please open an issue in github.com/boostorg/system.") -#endif - -// This header is effectively empty for compiles on operating systems where -// it is not applicable. - -# ifdef __CYGWIN__ - -#include - -namespace boost -{ - namespace system - { - // To construct an error_code after a API error: - // - // error_code( errno, system_category() ) - - // User code should use the portable "posix" enums for POSIX errors; this - // allows such code to be portable to non-POSIX systems. For the non-POSIX - // errno values that POSIX-based systems typically provide in addition to - // POSIX values, use the system specific enums below. - - namespace cygwin_error - { - enum cygwin_errno - { - no_net = ENONET, - no_package = ENOPKG, - no_share = ENOSHARE - }; - } // namespace cygwin_error - - template<> struct is_error_code_enum - { static const bool value = true; }; - - namespace cygwin_error - { - inline error_code make_error_code( cygwin_errno e ) - { return error_code( e, system_category() ); } - } - } -} - -#endif // __CYGWIN__ - -#endif // BOOST_SYSTEM_CYGWIN_ERROR_HPP diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f573d9ad5..ecac1a477 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -84,7 +84,6 @@ boost_test(TYPE run SOURCES system_category_test2.cpp) boost_test(TYPE run SOURCES system_category_test3.cpp) boost_test(TYPE run SOURCES windows_error_test.cpp) -boost_test(TYPE run SOURCES cygwin_error_test.cpp) boost_test(TYPE run SOURCES linux_error_test.cpp) boost_test(TYPE link SOURCES errc_test3.cpp) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3ba33f045..ea7c78ec6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -108,7 +108,6 @@ run system_category_test2.cpp ; run system_category_test3.cpp ; run windows_error_test.cpp ; -run cygwin_error_test.cpp ; run linux_error_test.cpp ; link errc_test3.cpp ; diff --git a/test/cygwin_error_test.cpp b/test/cygwin_error_test.cpp deleted file mode 100644 index db4044480..000000000 --- a/test/cygwin_error_test.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2020 Peter Dimov -// Distributed under the Boost Software License, Version 1.0. -// https://www.boost.org/LICENSE_1_0.txt - -#include -#include - -#if !defined(__CYGWIN__) - -BOOST_PRAGMA_MESSAGE( "Skipping test, __CYGWIN__ is not defined" ) -int main() {} - -#else - -#include - -int main() -{ - namespace sys = boost::system; - - sys::error_code ec = sys::cygwin_error::no_package; - - BOOST_TEST_EQ( ec, sys::cygwin_error::no_package ); - BOOST_TEST_EQ( ec, sys::error_code( ENOPKG, sys::system_category() ) ); - - return boost::report_errors(); -} - -#endif