### Please describe the problem.

Attempting to do *anything* with an S3 reomote using git-annex on windows fails with error code 10093 (i.e. WSA_NOT_INITIALISED). 

### What steps will reproduce the problem?

Assuming you have a disabled S3 remote called "the-cloud" (e.g. a fresh clone)
[[!format sh """
C:\annex> git annex enableremote "the-cloud"
enableremote the-cloud gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more information
(checking bucket...) (creating bucket in ap-southeast-2...) git-annex-old: FailedConnectionException2 "my-bucket-name.s3-ap-southeast-2.amazonaws.com" 80 False getAddrInfo: does not exist (error 10093)
"""]]

### What version of git-annex are you using? On what operating system?

git-annex 5.20150113-gcf247cf on windows 8.1

### Please provide any additional information below.

This error is caused by the Winsock library not being initialised before a socket operation is attempted. The patch below fixes the issue, and it should be a no-op on non-Windows platforms.

[[!format patch """
diff --git a/git-annex.hs b/git-annex.hs
index cdaa754..0eed9db 100644
--- a/git-annex.hs
+++ b/git-annex.hs
@@ -21,8 +21,10 @@ import Utility.UserInfo
 import Utility.Env
 #endif

+import Network.Socket (withSocketsDo)
+
 main :: IO ()
-main = do
+main = withSocketsDo $ do
        ps <- getArgs
        run ps =<< getProgName
   where
"""]]

> Thanks very much for the patch! [[done]] --[[Joey]]
