aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-26 13:08:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-26 13:08:18 +0000
commit9d7330d8790be54c3885e23359b25534974cfb82 (patch)
tree9914a4e4a04e358dccceaf8ee3f0d085ce1ab7e8
parent26a5954fa07ee33b9efdfba9009cd86ddf6a67c8 (diff)
Since Windows doesn't have/use the POSIX prototype for send() and recv(), we
typecast the third argument in the macros to avoid compiler warnings.
-rw-r--r--lib/setup.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/setup.h b/lib/setup.h
index ddd61b523..8ec4649af 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -174,8 +174,11 @@ typedef unsigned char bool;
#if !defined(__GNUC__) || defined(__MINGW32__)
#define sclose(x) closesocket(x)
-#define sread(x,y,z) recv(x,y,z, SEND_4TH_ARG)
-#define swrite(x,y,z) (size_t)send(x,y,z, SEND_4TH_ARG)
+
+/* Since Windows doesn't have/use the POSIX prototype for send() and recv(),
+ we typecast the third argument in the macros to avoid compiler warnings. */
+#define sread(x,y,z) recv(x,y,(int)(z), SEND_4TH_ARG)
+#define swrite(x,y,z) (size_t)send(x,y, (int)(z), SEND_4TH_ARG)
#undef HAVE_ALARM
#else
/* gcc-for-win is still good :) */