gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/src


From: gsasl-commit
Subject: CVS gsasl/src
Date: Tue, 7 Feb 2006 10:26:58 +0100

Update of /home/cvs/gsasl/src
In directory dopio:/tmp/cvs-serv22615

Modified Files:
        gsasl.c 
Log Message:
Initialize ws2_32, if necessary.


--- /home/cvs/gsasl/src/gsasl.c 2005/10/23 11:45:04     1.79
+++ /home/cvs/gsasl/src/gsasl.c 2006/02/07 09:26:58     1.80
@@ -1,5 +1,5 @@
 /* gsasl.c --- Command line interface to libgsasl.
- * Copyright (C) 2002, 2003, 2004, 2005  Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006  Simon Josefsson
  *
  * This file is part of GNU SASL.
  *
@@ -24,6 +24,10 @@
 #include "imap.h"
 #include "smtp.h"
 
+#ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+
 #ifdef HAVE_LIBGNUTLS
 # include <gnutls/gnutls.h>
 gnutls_session session;
@@ -276,6 +280,19 @@
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
+#ifdef HAVE_WS2TCPIP_H
+  {
+    WORD wVersionRequested;
+    WSADATA wsaData;
+    int r;
+
+    wVersionRequested = MAKEWORD(2, 0);
+    r = WSAStartup( wVersionRequested, &wsaData);
+    if (r)
+      error (EXIT_FAILURE, 0, _("Cannot initialize Windows sockets.");
+  }
+#endif
+
   if (cmdline_parser (argc, argv, &args_info) != 0)
     return 1;
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]