Skip to content

Commit 7ee07ba

Browse files
[SYCL] Fix the build breakage after #6469 (#6506)
1 parent 784cfa1 commit 7ee07ba

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

sycl/include/sycl/detail/iostream_proxy.hpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@
33
#include <ostream>
44

55
namespace std {
6-
extern istream cin; /// Linked to standard input
7-
extern ostream cout; /// Linked to standard output
8-
extern ostream cerr; /// Linked to standard error (unbuffered)
9-
extern ostream clog; /// Linked to standard error (buffered)
6+
#ifdef _WIN32
7+
#define __SYCL_EXTERN_STREAM_ATTRS __declspec(dllimport)
8+
#else
9+
#define __SYCL_EXTERN_STREAM_ATTRS
10+
#endif // _WIN32
11+
/// Linked to standard input
12+
extern __SYCL_EXTERN_STREAM_ATTRS istream cin;
13+
/// Linked to standard output
14+
extern __SYCL_EXTERN_STREAM_ATTRS ostream cout;
15+
/// Linked to standard error (unbuffered)
16+
extern __SYCL_EXTERN_STREAM_ATTRS ostream cerr;
17+
/// Linked to standard error (buffered)
18+
extern __SYCL_EXTERN_STREAM_ATTRS ostream clog;
19+
#undef __SYCL_EXTERN_STREAM_ATTRS
1020
} // namespace std

0 commit comments

Comments
 (0)