Commit 128d06aa authored by Christian Beier's avatar Christian Beier

Only define strncasecmp to _strnicmp when using MS compiler.

Redefining strncasecmp to _strnicmp makes libvncclient hang forever in
SetFormatAndEncodings() on Windows when built with MinGW64.

Reported by Tobias Doerffel <tobias.doerffel@gmail.com>, thanks!
parent 71ad3229
......@@ -31,13 +31,9 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#else
#define strncasecmp _strnicmp
#endif
#include <errno.h>
#ifndef WIN32
#include <pwd.h>
#endif
#include <errno.h>
#include <rfb/rfbclient.h>
#ifdef LIBVNCSERVER_HAVE_LIBZ
#include <zlib.h>
......
......@@ -74,6 +74,11 @@
#define LIBVNCSERVER_WORDS_BIGENDIAN
#endif
/* MS compilers don't have strncasecmp */
#ifdef _MSC_VER
#define strncasecmp _strnicmp
#endif
#if !defined(WIN32) || defined(__MINGW32__)
#define max(a,b) (((a)>(b))?(a):(b))
#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment