windows version compiles, but won't link because of bad archive

This commit is contained in:
2022-01-12 15:53:49 -05:00
parent 2b59d8a4a3
commit 20801395e6
2 changed files with 228 additions and 369 deletions

View File

@@ -158,7 +158,7 @@ public:
driven_->drv_peek_outgoing(0, &nbytes, &bytes);
if (nbytes == 0) break;
int nwrote = console_write(bytes, nbytes);
assert(nwrote > 0);
if (nwrote <= 0) break;
driven_->drv_sent_outgoing(0, nwrote);
}
}
@@ -168,8 +168,7 @@ public:
read_console_recently_ = false;
while (true) {
int nread = console_read(buffer, 256);
if (nread == 0) break;
assert(nread > 0);
if (nread <= 0) break;
read_console_recently_ = true;
driven_->drv_recv_incoming(0, nread, buffer);
}
@@ -360,6 +359,7 @@ public:
void handle_socket_input_output() {
std::string err;
int mstimeout = 1000;
// Peek output buffers and determine channel release flags.
@@ -372,9 +372,9 @@ public:
}
}
// Construct the pollfd vector.
// Construct the struct pollfd vector.
int pollsize = listen_sockets_.size() + chans_.size() + 1;
std::vector<struct pollfd> pollvec(pollsize);
PollVector pollvec(pollsize);
int index = 0;
for (const auto &p : listen_sockets_) {
struct pollfd &pfd = pollvec[index++];
@@ -396,8 +396,8 @@ public:
fill_stdio_pollfd(pollvec, mstimeout, read_console_recently_);
// Do the poll.
int status = poll(&pollvec[0], pollvec.size(), mstimeout);
assert(status >= 0);
socket_poll(pollvec, mstimeout, err);
if_error_print_and_exit(err);
// Check listening sockets.
index = 0;