summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-11-06 13:40:17 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-11-06 13:40:17 +0000
commitc08eff2883a952dd0f9325c51ad7968370452b02 (patch)
tree72080b810e039359df54696191cebf66f21d677b /Build/source/texk/web2c/lib
parente8386671e9408e3e71d63a518a5d8851689c3e7c (diff)
MinGW64 build: Fix minor glitches, avoid compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@35527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/lib')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c17
2 files changed, 11 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 566d6d43aac..99eb4bb6b6b 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmfmp.c: Avoid MinGW64 warnings (INVALID_SOCKET => -1).
+
2014-11-03 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
* texmfmp.c: Indentation.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 7d224726e59..00e32e63283 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -1127,10 +1127,7 @@ ipc_make_name (void)
return ipc_addr_len;
}
-#ifndef INVALID_SOCKET
-# define INVALID_SOCKET (-1)
-#endif
-static int sock = INVALID_SOCKET;
+static int sock = -1;
#ifdef WIN32
# define CLOSE_SOCKET(s) closesocket (s); WSACleanup ()
@@ -1141,7 +1138,7 @@ static int sock = INVALID_SOCKET;
static int
ipc_is_open (void)
{
- return sock != INVALID_SOCKET;
+ return sock != -1;
}
static void
@@ -1154,7 +1151,7 @@ ipc_open_out (void) {
#ifdef IPC_DEBUG
fputs ("tex: Opening socket for IPC output ...\n", stderr);
#endif
- if (sock != INVALID_SOCKET) {
+ if (sock != -1) {
return;
}
@@ -1170,13 +1167,13 @@ ipc_open_out (void) {
sock = socket (IPC_AF, SOCK_STREAM, 0);
#ifdef IPC_DEBUG
- if(sock != INVALID_SOCKET)
+ if(sock != -1)
fprintf(stderr, "tex: Socket handle is %d\n", sock);
else
fprintf(stderr, "tex: Socket is invalid.\n");
#endif
- if (sock != INVALID_SOCKET) {
+ if (sock != -1) {
if (connect (sock, ipc_addr, ipc_addr_len) != 0 ||
#ifdef WIN32
ioctlsocket (sock, FIONBIO, &mode) < 0
@@ -1185,7 +1182,7 @@ ipc_open_out (void) {
#endif
) {
CLOSE_SOCKET (sock);
- sock = INVALID_SOCKET;
+ sock = -1;
#ifdef IPC_DEBUG
fputs ("tex: IPC socket cannot be connected.\n", stderr);
fputs ("tex: Socket is closed.\n", stderr);
@@ -1206,7 +1203,7 @@ ipc_close_out (void)
#endif
if (ipc_is_open ()) {
CLOSE_SOCKET (sock);
- sock = INVALID_SOCKET;
+ sock = -1;
}
}