aboutsummaryrefslogtreecommitdiffstats
path: root/pc/gawkmisc.pc
diff options
context:
space:
mode:
Diffstat (limited to 'pc/gawkmisc.pc')
-rw-r--r--pc/gawkmisc.pc29
1 files changed, 17 insertions, 12 deletions
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index ce45b6d8..239f3f8f 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -716,18 +716,6 @@ dlsym (void *handle, const char *name)
#endif /* DYNAMIC */
#ifdef HAVE_SOCKETS
-
-void
-init_sockets(void)
-{
- WSADATA winsockData;
- int errcode;
-
- if ((errcode = WSAStartup (0x101, &winsockData)) != 0
- || winsockData.wVersion != 0x101)
- fatal(_("cannot start Winsock (%d)"), errcode);
-}
-
int
socket_to_fd(SOCKET s)
{
@@ -862,6 +850,23 @@ w32_shutdown (int fd, int how)
#endif /* __MINGW32__ */
+#if defined(__DJGPP__) || defined(__MINGW32__)
+
+void
+init_sockets(void)
+{
+#ifdef HAVE_SOCKETS
+ WSADATA winsockData;
+ int errcode;
+
+ if ((errcode = WSAStartup (0x101, &winsockData)) != 0
+ || winsockData.wVersion != 0x101)
+ fatal(_("cannot start Winsock (%d)"), errcode);
+#endif
+}
+
+#endif /* __DJGPP__ || __MINGW32__ */
+
#ifdef __DJGPP__
int