break;
}
+ /* Don't allow Windows to cache the write: flush it to disk */
+ _commit(fd);
+
bytes_remaining -= bytes_written;
}
return 0;
}
+int posix_fadvise(int fd, off_t offset, off_t len, int advice)
+{
+ return 0;
+}
+
int posix_madvise(void *addr, size_t len, int advice)
{
log_err("%s is not implemented\n", __func__);
int i;
int rc;
- if (timeout != -1)
+ if (timeout != -1) {
to = &tv;
-
- to->tv_sec = timeout / 1000;
- to->tv_usec = (timeout % 1000) * 1000;
+ to->tv_sec = timeout / 1000;
+ to->tv_usec = (timeout % 1000) * 1000;
+ }
FD_ZERO(&readfds);
FD_ZERO(&writefds);
errno = ENOSPC;
WSACleanup();
+
return ret;
}
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+ return inet_pton(AF_INET, cp, inp);
+}
+
int inet_pton(int af, const char *restrict src, void *restrict dst)
{
INT status = SOCKET_ERROR;