summaryrefslogtreecommitdiffstats
path: root/lib/warnless.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/warnless.h')
-rw-r--r--lib/warnless.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/warnless.h b/lib/warnless.h
index 2a53016..e5a02c8 100644
--- a/lib/warnless.h
+++ b/lib/warnless.h
@@ -69,18 +69,13 @@ curl_socket_t curlx_sitosk(int i);
#endif /* USE_WINSOCK */
-#if defined(WIN32)
+#if defined(_WIN32)
ssize_t curlx_read(int fd, void *buf, size_t count);
ssize_t curlx_write(int fd, const void *buf, size_t count);
-#undef read
-#define read(fd, buf, count) curlx_read(fd, buf, count)
-#undef write
-#define write(fd, buf, count) curlx_write(fd, buf, count)
-
-#endif /* WIN32 */
+#endif /* _WIN32 */
#if defined(__INTEL_COMPILER) && defined(__unix__)
@@ -97,3 +92,15 @@ unsigned short curlx_ntohs(unsigned short usnum);
#endif /* __INTEL_COMPILER && __unix__ */
#endif /* HEADER_CURL_WARNLESS_H */
+
+#ifndef HEADER_CURL_WARNLESS_H_REDEFS
+#define HEADER_CURL_WARNLESS_H_REDEFS
+
+#if defined(_WIN32)
+#undef read
+#define read(fd, buf, count) curlx_read(fd, buf, count)
+#undef write
+#define write(fd, buf, count) curlx_write(fd, buf, count)
+#endif
+
+#endif /* HEADER_CURL_WARNLESS_H_REDEFS */