#endif
#include <assert.h>
-#ifdef WINDOWS
-# include <winsock.h>
-#else
+#ifndef WINDOWS
# include <sys/socket.h>
# include <netdb.h>
# include <netinet/in.h>
-#ifndef __BEOS__
-# include <arpa/inet.h>
-#endif
-#endif /* WINDOWS */
+# ifndef __BEOS__
+# include <arpa/inet.h>
+# endif
+#endif /* not WINDOWS */
#include <errno.h>
#ifdef HAVE_STRING_H
wget_sockaddr_set_address (&bsa, ip_default_family, 0, &bind_address);
if (bind (sock, &bsa.sa, sockaddr_len ()))
{
- close (sock);
+ CLOSE (sock);
sock = -1;
goto out;
}
if (connect_with_timeout (sock, &sa.sa, sockaddr_len (),
opt.connect_timeout) < 0)
{
- close (sock);
+ CLOSE (sock);
sock = -1;
goto out;
}