We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8848607 commit 0aa9359Copy full SHA for 0aa9359
1 file changed
test/integ/new_response_types.cpp
@@ -19,7 +19,12 @@
19
*/
20
21
#include <curl/curl.h>
22
+#if defined(_WIN32) && !defined(__CYGWIN__)
23
+#include <io.h>
24
+#include <fcntl.h>
25
+#else
26
#include <unistd.h>
27
+#endif
28
#include <cstring>
29
#include <memory>
30
#include <string>
@@ -66,7 +71,11 @@ class pipe_resource : public http_resource {
66
71
public:
67
72
shared_ptr<http_response> render_GET(const http_request&) {
68
73
int pipefd[2];
74
75
+ if (_pipe(pipefd, 4096, _O_BINARY) != 0) {
76
69
77
if (pipe(pipefd) != 0) {
78
70
79
return std::make_shared<empty_response>(500);
80
}
81
const char* msg = "hello from pipe";
0 commit comments