Sync up some Windows build fixes from the ippsample fork.
diff --git a/cups/cups.h b/cups/cups.h
index 7001ba4..c9bea80 100644
--- a/cups/cups.h
+++ b/cups/cups.h
@@ -24,8 +24,8 @@
 #  if defined(WIN32) && !defined(__CUPS_SSIZE_T_DEFINED)
 #    define __CUPS_SSIZE_T_DEFINED
 #    include <stddef.h>
-/* Windows does not support the ssize_t type, so map it to off_t... */
-typedef off_t ssize_t;			/* @private@ */
+/* Windows does not support the ssize_t type, so map it to long... */
+typedef long ssize_t;			/* @private@ */
 #  endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
 
 #  include "file.h"
diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c
index a8237eb..a1a7c5c 100644
--- a/cups/http-addrlist.c
+++ b/cups/http-addrlist.c
@@ -61,18 +61,22 @@
     int             *cancel)		/* I - Pointer to "cancel" variable */
 {
   int			val;		/* Socket option value */
-#ifdef O_NONBLOCK
-  int			flags,		/* Socket flags */
-			remaining;	/* Remaining timeout */
+#ifndef WIN32
+  int			flags;		/* Socket flags */
+#endif /* !WIN32 */
+  int			remaining;	/* Remaining timeout */
   int			i,		/* Looping var */
 			nfds,		/* Number of file descriptors */
 			fds[100],	/* Socket file descriptors */
 			result;		/* Result from select() or poll() */
   http_addrlist_t	*addrs[100];	/* Addresses */
+#ifndef HAVE_POLL
+  int			max_fd = -1;	/* Highest file descriptor */
+#endif /* !HAVE_POLL */
+#ifdef O_NONBLOCK
 #  ifdef HAVE_POLL
   struct pollfd		pfds[100];	/* Polled file descriptors */
 #  else
-  int			max_fd = -1;	/* Highest file descriptor */
   fd_set		input_set,	/* select() input set */
 			output_set;	/* select() output set */
   struct timeval	timeout;	/* Timeout */
@@ -220,7 +224,9 @@
 	continue;
       }
 
+#ifndef WIN32
       fcntl(fds[nfds], F_SETFL, flags);
+#endif /* !WIN32 */
 
 #ifndef HAVE_POLL
       if (fds[nfds] > max_fd)
diff --git a/cups/string-private.h b/cups/string-private.h
index 0868cba..8b1140b 100644
--- a/cups/string-private.h
+++ b/cups/string-private.h
@@ -42,6 +42,13 @@
 #    include <bstring.h>
 #  endif /* HAVE_BSTRING_H */
 
+#  if defined(WIN32) && !defined(__CUPS_SSIZE_T_DEFINED)
+#    define __CUPS_SSIZE_T_DEFINED
+#    include <stddef.h>
+/* Windows does not support the ssize_t type, so map it to long... */
+typedef long ssize_t;			/* @private@ */
+#  endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
+
 
 /*
  * C++ magic...