diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2014-03-26 10:35:02 +0100 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-03-26 10:35:02 +0100 |
commit | 406f619a33e3b0e01cc04e8e77a90ee93b229602 (patch) | |
tree | eac2653e6f8ffa6f1e495ef087ca3fb341fb9cce /lib/warnless.c | |
parent | c930db776b4046d2977e64c52779ea2402ac2d24 (diff) |
Imported Upstream version 7.36.0
Diffstat (limited to 'lib/warnless.c')
-rw-r--r-- | lib/warnless.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/warnless.c b/lib/warnless.c index 7a4b01eb..778f098f 100644 --- a/lib/warnless.c +++ b/lib/warnless.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -400,6 +400,20 @@ curl_socket_t curlx_sitosk(int i) #endif /* USE_WINSOCK */ +#if defined(WIN32) || defined(_WIN32) + +ssize_t curlx_read(int fd, void *buf, size_t count) +{ + return (ssize_t)read(fd, buf, curlx_uztoui(count)); +} + +ssize_t curlx_write(int fd, const void *buf, size_t count) +{ + return (ssize_t)write(fd, buf, curlx_uztoui(count)); +} + +#endif /* WIN32 || _WIN32 */ + #if defined(__INTEL_COMPILER) && defined(__unix__) int curlx_FD_ISSET(int fd, fd_set *fdset) |