Skip to content

Commit 910ec6f

Browse files
mordanteZingamldionne
authored
[libc++] Undeprecate POSIX STREAM macros. (#88296)
LWG3869 Deprecate std::errc constants related to UNIX STREAMS deprecates the POSIX macros ENODATA, ENOSR, ENOSTR, and ETIME. These were deprecated in libc++ in #80542. Based on the post commit feedback the macro are no longer deprecated. Instead libc++ leaves the deprecation to the provider of errno.h. --------- Co-authored-by: Hristo Hristov <[email protected]> Co-authored-by: Louis Dionne <[email protected]>
1 parent 1a895bd commit 910ec6f

File tree

3 files changed

+11
-49
lines changed

3 files changed

+11
-49
lines changed

libcxx/include/__system_error/errc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ enum class errc
112112
// macros. So GCC does not need the pushing and popping.
113113
//
114114
// TODO Remove this when the deprecated constants are removed.
115+
//
116+
// Note based on the post-review comments in
117+
// https://github.com/llvm/llvm-project/pull/80542 libc++ no longer deprecates
118+
// the macros. Since C libraries may start to deprecate these POSIX macros the
119+
// deprecation warning avoidance is kept.
115120
#if defined(_LIBCPP_COMPILER_CLANG_BASED)
116121
# define _LIBCPP_SUPPRESS_DEPRECATED_ERRC_PUSH _LIBCPP_SUPPRESS_DEPRECATED_PUSH
117122
# define _LIBCPP_SUPPRESS_DEPRECATED_ERRC_POP _LIBCPP_SUPPRESS_DEPRECATED_POP

libcxx/include/cerrno

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,11 @@ Macros:
3838
# pragma GCC system_header
3939
#endif
4040

41-
#ifdef ENODATA
42-
# pragma clang deprecated(ENODATA, "ENODATA is deprecated in ISO C++")
43-
#endif
44-
#ifdef ENOSR
45-
# pragma clang deprecated(ENOSR, "ENOSR is deprecated in ISO C++")
46-
#endif
47-
#ifdef ENOSTR
48-
# pragma clang deprecated(ENOSTR, "ENOSTR is deprecated in ISO C++")
49-
#endif
50-
#ifdef ETIME
51-
# pragma clang deprecated(ETIME, "ETIME is deprecated in ISO C++")
52-
#endif
41+
// LWG3869 Deprecate std::errc constants related to UNIX STREAMS
42+
//
43+
// This LWG issue deprecates the POSIX macros ENODATA, ENOSR, ENOSTR, and ETIME. These were
44+
// deprecated in libc++ in https://github.com/llvm/llvm-project/pull/80542.
45+
// Based on the post commit feedback the macro are no longer deprecated.
46+
// Instead libc++ leaves the deprecation to the provider of errno.h.
5347

5448
#endif // _LIBCPP_CERRNO

libcxx/test/std/depr.cerro/cerrno.syn.verify.cpp

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)