]> sjero.net Git - wget/commitdiff
Use correctly FIONBIO values.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 17 Apr 2011 11:07:01 +0000 (13:07 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 17 Apr 2011 11:07:01 +0000 (13:07 +0200)
src/ChangeLog
src/gnutls.c
src/wget.h

index 548de6294a0569bd3489b68404eee0d3dd9456d9..39390a5fe45f1f2f8093084a21bc92431d9372e1 100644 (file)
@@ -1,3 +1,10 @@
+2011-04-17  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * wget.h [HAVE_LIBSSL32]: Define HAVE_SSL.
+
+       * gnutls.c (wgnutls_peek): Use correctly FIONBIO codes under Mingw32.
+       Reported by: Ray Satiro <raysatiro@yahoo.com>
+
 2011-04-13  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * openssl.c (openssl_poll): Check if the specified timeout is zero after
index 564170fec4213e30878e9c51d176e146349a7be5..a1054a4d89c9804dd3f31b794e22924c2b7a022b 100644 (file)
@@ -197,8 +197,8 @@ wgnutls_peek (int fd, char *buf, int bufsize, void *arg)
         return ret;
 #else
       /* XXX: Assume it was blocking before.  */
-      const int zero = 0;
-      ret = ioctl (fd, FIONBIO, &zero);
+      const int one = 1;
+      ret = ioctl (fd, FIONBIO, &one);
       if (ret < 0)
         return ret;
 #endif
@@ -224,8 +224,8 @@ wgnutls_peek (int fd, char *buf, int bufsize, void *arg)
       if (ret < 0)
         return ret;
 #else
-      const int one = 1;
-      ret = ioctl (fd, FIONBIO, &one);
+      const int zero = 0;
+      ret = ioctl (fd, FIONBIO, &zero);
       if (ret < 0)
         return ret;
 #endif
index fce89e7a9f92eab8df55c9a7a65b001d26fc05ff..c7c5e2cb1dd0ebd4c09419569fe174c5c199c81d 100644 (file)
@@ -52,7 +52,7 @@ as that of the covered work.  */
 #endif
 
 /* Is OpenSSL or GNUTLS available? */
-#if defined HAVE_LIBSSL || defined HAVE_LIBGNUTLS
+#if defined HAVE_LIBSSL || defined HAVE_LIBSSL32 || defined HAVE_LIBGNUTLS
 # define HAVE_SSL
 #endif