public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7508] libstdc++: Add preprocessor checks to <experimental/internet> [PR100285]
@ 2023-06-29 23:01 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-06-29 23:01 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:132015b9c6c9f9156ff31f7d66ba92cf01d0bc90
commit r13-7508-g132015b9c6c9f9156ff31f7d66ba92cf01d0bc90
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Jun 9 12:15:21 2023 +0100
libstdc++: Add preprocessor checks to <experimental/internet> [PR100285]
We can't define endpoints and resolvers without the relevant OS support.
If IPPROTO_TCP and IPPROTO_UDP are both undefined then we won't need
basic_endpoint and basic_resolver anyway, so make them depend on those
macros.
libstdc++-v3/ChangeLog:
PR libstdc++/100285
* include/experimental/internet [IPPROTO_TCP || IPPROTO_UDP]
(basic_endpoint, basic_resolver_entry, resolver_base)
(basic_resolver_results, basic_resolver): Only define if the tcp
or udp protocols will be defined.
(cherry picked from commit 793ed718b522b15e2d758eca953feeec1979fe2c)
Diff:
---
libstdc++-v3/include/experimental/internet | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libstdc++-v3/include/experimental/internet b/libstdc++-v3/include/experimental/internet
index 1f63c61ce85..bd9a05f12aa 100644
--- a/libstdc++-v3/include/experimental/internet
+++ b/libstdc++-v3/include/experimental/internet
@@ -1502,6 +1502,7 @@ namespace ip
operator<<(basic_ostream<_CharT, _Traits>& __os, const network_v6& __net)
{ return __os << __net.to_string(); }
+#if defined IPPROTO_TCP || defined IPPROTO_UDP
/// An IP endpoint.
template<typename _InternetProtocol>
class basic_endpoint
@@ -2187,6 +2188,7 @@ namespace ip
__ec = std::make_error_code(errc::operation_not_supported);
#endif
}
+#endif // IPPROTO_TCP || IPPROTO_UDP
/** The name of the local host.
* @{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-29 23:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 23:01 [gcc r13-7508] libstdc++: Add preprocessor checks to <experimental/internet> [PR100285] Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).