diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-04 09:52:02 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-04 09:52:02 +0000 |
commit | bc4eca8d682e6e8c0f05ffcab3d38d3030782cd2 (patch) | |
tree | ae21c7743135e58f924d65edec595731bd437395 /Build/source/texk | |
parent | 196d52388aa9f7f3e3a4978af7a9891629e4c0d5 (diff) |
Avoid to #define SOCK_NONBLOCK
git-svn-id: svn://tug.org/texlive/trunk@22300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index cb8b3645619..0c95e98973e 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,8 @@ +2011-05-04 Peter Breitenlohner <peb@mppmu.mpg.de> + + * texmfmp.c (ipc_open_out): Avoid to #define SOCK_NONBLOCK which + conflicts with newer GNU C library headers. + 2011-05-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * openclose.c (recorder_change_filename): on windows, an opened file diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index b4be503a174..c672ae10704 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -946,9 +946,6 @@ static void ipc_open_out (void) { #ifdef WIN32 u_long mode = 1; -#define SOCK_NONBLOCK(s) ioctlsocket (s, FIONBIO, &mode) -#else -#define SOCK_NONBLOCK(s) fcntl (s, F_SETFL, O_NONBLOCK) #endif #ifdef IPC_DEBUG fputs ("tex: Opening socket for IPC output ...\n", stderr); @@ -964,8 +961,13 @@ ipc_open_out (void) { sock = socket (PF_UNIX, SOCK_STREAM, 0); if (sock >= 0) { - if (connect (sock, ipc_addr, ipc_addr_len) != 0 - || SOCK_NONBLOCK (sock) < 0) { + if (connect (sock, ipc_addr, ipc_addr_len) != 0 || +#ifdef WIN32 + ioctlsocket (sock, FIONBIO, &mode) < 0 +#else + fcntl (sock, F_SETFL, O_NONBLOCK) < 0 +#endif + ) { close (sock); sock = -1; return; |