-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor details directory structure #32
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| // | ||
| // Copyright (c) 2026 Steve Gerbino | ||
| // | ||
| // 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) | ||
| // | ||
| // Official repository: https://github.com/cppalliance/corosio | ||
| // | ||
|
|
||
| #ifndef BOOST_COROSIO_DETAIL_CONFIG_BACKEND_HPP | ||
| #define BOOST_COROSIO_DETAIL_CONFIG_BACKEND_HPP | ||
|
|
||
| // | ||
| // Backend selection for I/O multiplexing and signal handling. | ||
| // | ||
| // I/O Backends: | ||
| // BOOST_COROSIO_BACKEND_IOCP - Windows I/O Completion Ports | ||
| // BOOST_COROSIO_BACKEND_EPOLL - Linux epoll | ||
| // BOOST_COROSIO_BACKEND_IO_URING - Linux io_uring (future) | ||
| // BOOST_COROSIO_BACKEND_KQUEUE - BSD/macOS kqueue (future) | ||
| // BOOST_COROSIO_BACKEND_POLL - POSIX poll fallback (future) | ||
| // | ||
| // Signal Backends: | ||
| // BOOST_COROSIO_SIGNAL_WIN - Windows (SetConsoleCtrlHandler + signal) | ||
| // BOOST_COROSIO_SIGNAL_POSIX - POSIX (sigaction) | ||
| // | ||
|
|
||
| #if defined(_WIN32) | ||
| #define BOOST_COROSIO_BACKEND_IOCP 1 | ||
| #define BOOST_COROSIO_SIGNAL_WIN 1 | ||
| #elif defined(__linux__) | ||
| #if defined(BOOST_COROSIO_USE_IO_URING) | ||
| #define BOOST_COROSIO_BACKEND_IO_URING 1 | ||
| #else | ||
| #define BOOST_COROSIO_BACKEND_EPOLL 1 | ||
| #endif | ||
| #define BOOST_COROSIO_SIGNAL_POSIX 1 | ||
| #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) | ||
| #define BOOST_COROSIO_BACKEND_KQUEUE 1 | ||
| #define BOOST_COROSIO_SIGNAL_POSIX 1 | ||
| #elif defined(__APPLE__) | ||
| #define BOOST_COROSIO_BACKEND_KQUEUE 1 | ||
| #define BOOST_COROSIO_SIGNAL_POSIX 1 | ||
| #else | ||
| // Fallback to poll for other POSIX systems | ||
| #define BOOST_COROSIO_BACKEND_POLL 1 | ||
| #define BOOST_COROSIO_SIGNAL_POSIX 1 | ||
| #endif | ||
|
|
||
| #endif // BOOST_COROSIO_DETAIL_CONFIG_BACKEND_HPP | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow explicit backend overrides and prevent multiple backend defines.
This block always defines platform defaults, which defeats explicit backend selection and can yield multiple
BOOST_COROSIO_BACKEND_*macros (e.g., user-defined IO_URING plus default EPOLL). That leads to ambiguous downstream#ifselection. Consider only defining defaults when no backend is already selected and add a single-backend sanity check.🛠️ Proposed fix (guard defaults + single-backend check)
📝 Committable suggestion
🤖 Prompt for AI Agents