Version 3.11.4

Some cleanup to common.gypi. This fixes some host/target combinations that weren't working in the Make build on Mac.

Handle EINTR in socket functions and continue incomplete sends. (issue 2098)

Fixed python deprecations.  (issue 1391)

Made socket send and receive more robust and return 0 on failure. (Chromium issue 15719)

Fixed GCC 4.7 (C++11) compilation.  (issue 2136)

Set '-m32' option for host and target platforms

Performance and stability improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/trunk@11619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index 9e377a1..2473949 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -1848,14 +1848,26 @@
 
 
 int Win32Socket::Send(const char* data, int len) const {
-  int status = send(socket_, data, len, 0);
-  return status;
+  if (len <= 0) return 0;
+  int written = 0;
+  while (written < len) {
+    int status = send(socket_, data + written, len - written, 0);
+    if (status == 0) {
+      break;
+    } else if (status > 0) {
+      written += status;
+    } else {
+      return 0;
+    }
+  }
+  return written;
 }
 
 
 int Win32Socket::Receive(char* data, int len) const {
+  if (len <= 0) return 0;
   int status = recv(socket_, data, len, 0);
-  return status;
+  return (status == SOCKET_ERROR) ? 0 : status;
 }