Skip to content

[SYCL] Fix the build breakage after #6469 #6506

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 1 commit into from
Aug 1, 2022
Merged
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
18 changes: 14 additions & 4 deletions sycl/include/sycl/detail/iostream_proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
#include <ostream>

namespace std {
extern istream cin; /// Linked to standard input
extern ostream cout; /// Linked to standard output
extern ostream cerr; /// Linked to standard error (unbuffered)
extern ostream clog; /// Linked to standard error (buffered)
#ifdef _WIN32
#define __SYCL_EXTERN_STREAM_ATTRS __declspec(dllimport)
#else
#define __SYCL_EXTERN_STREAM_ATTRS
#endif // _WIN32
/// Linked to standard input
extern __SYCL_EXTERN_STREAM_ATTRS istream cin;
/// Linked to standard output
extern __SYCL_EXTERN_STREAM_ATTRS ostream cout;
/// Linked to standard error (unbuffered)
extern __SYCL_EXTERN_STREAM_ATTRS ostream cerr;
/// Linked to standard error (buffered)
extern __SYCL_EXTERN_STREAM_ATTRS ostream clog;
#undef __SYCL_EXTERN_STREAM_ATTRS
} // namespace std