From 53cc1fa18a3b96d2c31a145d971017564fca39bb Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 18 Feb 2016 08:29:07 -0600 Subject: use namespaced rfbMax macro (issue #102) Not using generic 'max', avoids conflicts with stl_algobase.h --- libvncclient/listen.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libvncclient') diff --git a/libvncclient/listen.c b/libvncclient/listen.c index 739cd9f..e989d6a 100644 --- a/libvncclient/listen.c +++ b/libvncclient/listen.c @@ -30,9 +30,6 @@ #ifdef WIN32 #define close closesocket #include -#ifdef _MINGW32 -#undef max -#endif // #ifdef _MINGW32 #else // #ifdef WIN32 #include #include @@ -99,7 +96,7 @@ listenForIncomingConnections(rfbClient* client) if(listen6Socket >= 0) FD_SET(listen6Socket, &fds); - r = select(max(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL); + r = select(rfbMax(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL); if (r > 0) { if (FD_ISSET(listenSocket, &fds)) @@ -195,9 +192,9 @@ listenForIncomingConnectionsNoFork(rfbClient* client, int timeout) FD_SET(client->listen6Sock, &fds); if (timeout < 0) - r = select(max(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, NULL); + r = select(rfbMax(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, NULL); else - r = select(max(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, &to); + r = select(rfbMax(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, &to); if (r > 0) { -- cgit v1.2.1