Skip to content

[libc++] Undeprecate POSIX STREAM macros. #88296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libcxx/include/__system_error/errc.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ enum class errc
// macros. So GCC does not need the pushing and popping.
//
// TODO Remove this when the deprecated constants are removed.
//
// Note based on the post-review comments in
// https://github.com/llvm/llvm-project/pull/80542 libc++ no longer deprecates
// the macros. Since C libraries may start to deprecate these POSIX macros the
// deprecation warning avoidance is kept.
#if defined(_LIBCPP_COMPILER_CLANG_BASED)
# define _LIBCPP_SUPPRESS_DEPRECATED_ERRC_PUSH _LIBCPP_SUPPRESS_DEPRECATED_PUSH
# define _LIBCPP_SUPPRESS_DEPRECATED_ERRC_POP _LIBCPP_SUPPRESS_DEPRECATED_POP
Expand Down
18 changes: 6 additions & 12 deletions libcxx/include/cerrno
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,11 @@ Macros:
# pragma GCC system_header
#endif

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

#endif // _LIBCPP_CERRNO
37 changes: 0 additions & 37 deletions libcxx/test/std/depr.cerro/cerrno.syn.verify.cpp

This file was deleted.