
PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding Co-authored-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/103626 * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/requires_hosted.h: New header. * include/experimental/algorithm: Include <bits/requires_hosted.h>. * include/experimental/any: Likewise. * include/experimental/array: Likewise. * include/experimental/buffer: Likewise. * include/experimental/chrono: Likewise. * include/experimental/deque: Likewise. * include/experimental/executor: Likewise. * include/experimental/filesystem: Likewise. * include/experimental/forward_list: Likewise. * include/experimental/functional: Likewise. * include/experimental/internet: Likewise. * include/experimental/io_context: Likewise. * include/experimental/iterator: Likewise. * include/experimental/list: Likewise. * include/experimental/map: Likewise. * include/experimental/memory: Likewise. * include/experimental/memory_resource: Likewise. * include/experimental/net: Likewise. * include/experimental/netfwd: Likewise. * include/experimental/numeric: Likewise. * include/experimental/optional: Likewise. * include/experimental/propagate_const: Likewise. * include/experimental/random: Likewise. * include/experimental/ratio: Likewise. * include/experimental/regex: Likewise. * include/experimental/scope: Likewise. * include/experimental/set: Likewise. * include/experimental/simd: Likewise. * include/experimental/socket: Likewise. * include/experimental/source_location: Likewise. * include/experimental/string: Likewise. * include/experimental/string_view: Likewise. * include/experimental/system_error: Likewise. * include/experimental/timer: Likewise. * include/experimental/tuple: Likewise. * include/experimental/unordered_map: Likewise. * include/experimental/unordered_set: Likewise. * include/experimental/utility: Likewise. * include/experimental/vector: Likewise. * include/std/barrier: Likewise. * include/std/chrono: Likewise. * include/std/condition_variable: Likewise. * include/std/deque: Likewise. * include/std/execution: Likewise. * include/std/filesystem: Likewise. * include/std/forward_list: Likewise. * include/std/fstream: Likewise. * include/std/future: Likewise. * include/std/iomanip: Likewise. * include/std/ios: Likewise. * include/std/iosfwd: Likewise. * include/std/iostream: Likewise. * include/std/istream: Likewise. * include/std/latch: Likewise. * include/std/list: Likewise. * include/std/locale: Likewise. * include/std/map: Likewise. * include/std/memory_resource: Likewise. * include/std/mutex: Likewise. * include/std/ostream: Likewise. * include/std/queue: Likewise. * include/std/random: Likewise. * include/std/regex: Likewise. * include/std/semaphore: Likewise. * include/std/set: Likewise. * include/std/shared_mutex: Likewise. * include/std/spanstream: Likewise. * include/std/sstream: Likewise. * include/std/stack: Likewise. * include/std/stacktrace: Likewise. * include/std/stop_token: Likewise. * include/std/streambuf: Likewise. * include/std/string: Likewise. * include/std/syncstream: Likewise. * include/std/system_error: Likewise. * include/std/thread: Likewise. * include/std/unordered_map: Likewise. * include/std/unordered_set: Likewise. * include/std/valarray: Likewise. * include/std/vector: Likewise. * include/tr1/array: Likewise. * include/tr1/ccomplex: Likewise. * include/tr1/cctype: Likewise. * include/tr1/cfenv: Likewise. * include/tr1/cfloat: Likewise. * include/tr1/cinttypes: Likewise. * include/tr1/climits: Likewise. * include/tr1/cmath: Likewise. * include/tr1/complex: Likewise. * include/tr1/complex.h: Likewise. * include/tr1/cstdarg: Likewise. * include/tr1/cstdbool: Likewise. * include/tr1/cstdint: Likewise. * include/tr1/cstdio: Likewise. * include/tr1/cstdlib: Likewise. * include/tr1/ctgmath: Likewise. * include/tr1/ctime: Likewise. * include/tr1/ctype.h: Likewise. * include/tr1/cwchar: Likewise. * include/tr1/cwctype: Likewise. * include/tr1/fenv.h: Likewise. * include/tr1/float.h: Likewise. * include/tr1/functional: Likewise. * include/tr1/inttypes.h: Likewise. * include/tr1/limits.h: Likewise. * include/tr1/math.h: Likewise. * include/tr1/memory: Likewise. * include/tr1/random: Likewise. * include/tr1/regex: Likewise. * include/tr1/stdarg.h: Likewise. * include/tr1/stdbool.h: Likewise. * include/tr1/stdint.h: Likewise. * include/tr1/stdio.h: Likewise. * include/tr1/stdlib.h: Likewise. * include/tr1/tgmath.h: Likewise. * include/tr1/tuple: Likewise. * include/tr1/type_traits: Likewise. * include/tr1/unordered_map: Likewise. * include/tr1/unordered_set: Likewise. * include/tr1/utility: Likewise. * include/tr1/wchar.h: Likewise. * include/tr1/wctype.h: Likewise. * include/c_global/cmath: Likewise. * include/ext/algorithm: Include <bits/requires_hosted.h>. * include/ext/bitmap_allocator.h: Likewise. * include/ext/cmath: Likewise. * include/ext/codecvt_specializations.h: Likewise. * include/ext/debug_allocator.h: Likewise. * include/ext/enc_filebuf.h: Likewise. * include/ext/extptr_allocator.h: Likewise. * include/ext/functional: Likewise. * include/ext/malloc_allocator.h: Likewise. * include/ext/memory: Likewise. * include/ext/mt_allocator.h: Likewise. * include/ext/new_allocator.h: Likewise. * include/ext/numeric: Likewise. * include/ext/pod_char_traits.h: Likewise. * include/ext/pool_allocator.h: Likewise. * include/ext/random: Likewise. * include/ext/random.tcc: Likewise. * include/ext/rb_tree: Likewise. * include/ext/rc_string_base.h: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/sso_string_base.h: Likewise. * include/ext/stdio_filebuf.h: Likewise. * include/ext/stdio_sync_filebuf.h: Likewise. * include/ext/string_conversions.h: Likewise. * include/ext/throw_allocator.h: Likewise. * include/ext/vstring.h: Likewise. * include/ext/vstring.tcc: Likewise. * include/ext/vstring_fwd.h: Likewise. * include/ext/vstring_util.h: Likewise. * include/std/charconv: Likewise. (__cpp_lib_to_chars): Do not define for freestanding. * include/std/version: Adjust which macros get defined in freestanding. * include/ext/pointer.h [!_GLIBCXX_HOSTED]: Omit iostream functionality from freestanding. * include/std/algorithm [!_GLIBCXX_HOSTED]: Omit PSTL algos. * include/std/memory [!_GLIBCXX_HOSTED]: Omit <bits/stl_tempbuf.h> in freestanding * include/bits/algorithmfwd.h [!_GLIBCXX_HOSTED]: Omit leftover random_shuffle and stable_partition definition. * include/bits/stl_algo.h [!_GLIBCXX_HOSTED]: Omit random_shuffle and stable_partition from freestanding. * include/bits/ranges_algo.h [!_GLIBCXX_HOSTED]: Omit stable_partition from freestanding. * include/bits/concept_check.h: Remove needless HOSTED check. * include/std/iterator: Include <bits/ranges_base.h>. * include/std/numeric (__cpp_lib_parallel_algorithms): Do not define for freestanding. * include/std/functional (__cpp_lib_boyer_moore_searcher): Likewise. * testsuite/lib/prune.exp: Match error for hosted-only libstdc++ tests.
134 lines
3.7 KiB
C++
134 lines
3.7 KiB
C++
// <experimental/netfwd> -*- C++ -*-
|
|
|
|
// Copyright (C) 2015-2022 Free Software Foundation, Inc.
|
|
//
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
// software; you can redistribute it and/or modify it under the
|
|
// terms of the GNU General Public License as published by the
|
|
// Free Software Foundation; either version 3, or (at your option)
|
|
// any later version.
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
|
// permissions described in the GCC Runtime Library Exception, version
|
|
// 3.1, as published by the Free Software Foundation.
|
|
|
|
// You should have received a copy of the GNU General Public License and
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
// <http://www.gnu.org/licenses/>.
|
|
|
|
/** @file experimental/netfwd
|
|
* This is a TS C++ Library header.
|
|
* @ingroup networking-ts
|
|
*/
|
|
|
|
#ifndef _GLIBCXX_EXPERIMENTAL_NETFWD
|
|
#define _GLIBCXX_EXPERIMENTAL_NETFWD 1
|
|
|
|
#pragma GCC system_header
|
|
|
|
#include <bits/requires_hosted.h> // experimental is currently omitted
|
|
|
|
#if __cplusplus >= 201402L
|
|
|
|
// #define __cpp_lib_experimental_net 201803
|
|
// #define __cpp_lib_experimental_net_extensible 201803
|
|
|
|
#include <bits/chrono.h>
|
|
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
|
{
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
namespace experimental
|
|
{
|
|
namespace net
|
|
{
|
|
inline namespace v1
|
|
{
|
|
|
|
/** @defgroup networking-ts Networking TS
|
|
* @ingroup experimental
|
|
*
|
|
* ISO/IEC TS 19216:2018 C++ Extensions for Networking
|
|
* @{
|
|
*/
|
|
|
|
class execution_context;
|
|
template<typename _Tp, typename _Executor>
|
|
class executor_binder;
|
|
template<typename _Executor>
|
|
class executor_work_guard;
|
|
class system_executor;
|
|
class executor;
|
|
template<typename _Executor>
|
|
class strand;
|
|
|
|
class io_service;
|
|
|
|
template<typename _Clock> struct wait_traits;
|
|
template<typename _Clock, typename _WaitTraits = wait_traits<_Clock>>
|
|
class basic_waitable_timer;
|
|
typedef basic_waitable_timer<chrono::system_clock> system_timer;
|
|
typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
|
|
typedef basic_waitable_timer<chrono::high_resolution_clock>
|
|
high_resolution_timer;
|
|
|
|
template<typename _Protocol>
|
|
class basic_socket;
|
|
template<typename _Protocol>
|
|
class basic_datagram_socket;
|
|
template<typename _Protocol>
|
|
class basic_stream_socket;
|
|
template<typename _Protocol>
|
|
class basic_socket_acceptor;
|
|
template<typename _Protocol, typename _Clock = chrono::steady_clock,
|
|
typename _WaitTraits = wait_traits<_Clock>>
|
|
class basic_socket_streambuf;
|
|
template<typename _Protocol, typename _Clock = chrono::steady_clock,
|
|
typename _WaitTraits = wait_traits<_Clock>>
|
|
class basic_socket_iostream;
|
|
|
|
/// @}
|
|
|
|
namespace ip
|
|
{
|
|
/**
|
|
* @addtogroup networking-ts
|
|
* @{
|
|
*/
|
|
class address;
|
|
class address_v4;
|
|
class address_v6;
|
|
class address_iterator_v4;
|
|
class address_iterator_v6;
|
|
class address_range_v4;
|
|
class address_range_v6;
|
|
class network_v4;
|
|
class network_v6;
|
|
template<typename _InternetProtocol>
|
|
class basic_endpoint;
|
|
template<typename _InternetProtocol>
|
|
class basic_resolver_entry;
|
|
template<typename _InternetProtocol>
|
|
class basic_resolver_results;
|
|
template<typename _InternetProtocol>
|
|
class basic_resolver;
|
|
class tcp;
|
|
class udp;
|
|
/// @}
|
|
|
|
} // namespace ip
|
|
} // namespace v1
|
|
} // namespace net
|
|
} // namespace experimental
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
|
} // namespace std
|
|
|
|
#endif // C++14
|
|
|
|
#endif // _GLIBCXX_EXPERIMENTAL_NETFWD
|