wininet: Declare and fix the MSG_WAITALL value. Add MSG_INTERRUPT.

Francois Gouget fgouget at free.fr
Mon Dec 1 04:08:58 CST 2008


---

MSG_WAITALL and MSG_INTERRUPT are supposed to only be declared by 
winsock2.h. Here we declare it in winsock.h too. I don't know if that 
matter much.

Also wininet and winhttp are doig things like 'foo & MSG_WAITALL' so 
setting it to 0 seems really is wrong.


 dlls/winhttp/winhttp_private.h |    2 +-
 dlls/wininet/internet.h        |   14 +++++++-------
 include/winsock.h              |    4 ++++
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h
index b564d4f..5dc9c63 100644
--- a/dlls/winhttp/winhttp_private.h
+++ b/dlls/winhttp/winhttp_private.h
@@ -35,7 +35,7 @@
 #if defined(__MINGW32__) || defined (_MSC_VER)
 # include <ws2tcpip.h>
 # ifndef MSG_WAITALL
-#  define MSG_WAITALL 0
+#  define MSG_WAITALL              0x0008
 # endif
 #else
 # define closesocket close
diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h
index bb694e9..d5b11b9 100644
--- a/dlls/wininet/internet.h
+++ b/dlls/wininet/internet.h
@@ -43,14 +43,14 @@
 #endif
 
 #if defined(__MINGW32__) || defined (_MSC_VER)
-#include "ws2tcpip.h"
-#ifndef MSG_WAITALL
-#define MSG_WAITALL 0
-#endif
+# include <ws2tcpip.h>
+# ifndef MSG_WAITALL
+#  define MSG_WAITALL              0x0008
+# endif
 #else
-#define closesocket close
-#define ioctlsocket ioctl
-#endif /* __MINGW32__ */
+# define closesocket close
+# define ioctlsocket ioctl
+#endif
 
 /* used for netconnection.c stuff */
 typedef struct
diff --git a/include/winsock.h b/include/winsock.h
index dd202ea..4dafb9c 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -791,6 +791,8 @@ typedef struct WS(WSAData)
 #define MSG_OOB                    0x0001
 #define MSG_PEEK                   0x0002
 #define MSG_DONTROUTE              0x0004
+#define MSG_WAITALL                0x0008
+#define MSG_INTERRUPT              0x0010
 #define MSG_PARTIAL                0x8000
 #define MSG_MAXIOVLEN              16
 #else /* USE_WS_PREFIX */
@@ -799,6 +801,8 @@ typedef struct WS(WSAData)
 #define WS_MSG_OOB                 0x0001
 #define WS_MSG_PEEK                0x0002
 #define WS_MSG_DONTROUTE           0x0004
+#define WS_MSG_WAITALL             0x0008
+#define WS_MSG_INTERRUPT           0x0010
 #define WS_MSG_PARTIAL             0x8000
 #define WS_MSG_MAXIOVLEN           16
 #endif /* USE_WS_PREFIX */
-- 
1.5.6.5



More information about the wine-patches mailing list