]> granicus.if.org Git - curl/commitdiff
Since Windows doesn't have/use the POSIX prototype for send() and recv(), we
authorDaniel Stenberg <daniel@haxx.se>
Tue, 26 Apr 2005 13:08:18 +0000 (13:08 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 26 Apr 2005 13:08:18 +0000 (13:08 +0000)
typecast the third argument in the macros to avoid compiler warnings.

lib/setup.h

index ddd61b523906ed8ce2d59ccf002b1a0673d12b18..8ec4649af15a4177133cd1431ad048367e3de472 100644 (file)
@@ -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 :) */