diff --git a/include/rfb/rfbproto.h b/include/rfb/rfbproto.h index 31522c8..22a5a75 100644 --- a/include/rfb/rfbproto.h +++ b/include/rfb/rfbproto.h @@ -71,11 +71,6 @@ #endif #endif -/* MS compilers don't have strncasecmp */ -#ifdef _MSC_VER -#define strncasecmp _strnicmp -#endif - #define rfbMax(a,b) (((a)>(b))?(a):(b)) #include #include diff --git a/src/encodings/vncauth.c b/src/encodings/vncauth.c index 676d2b0..83f66fa 100644 --- a/src/encodings/vncauth.c +++ b/src/encodings/vncauth.c @@ -21,12 +21,7 @@ * vncauth.c - Functions for VNC password management and authentication. */ -#include -#ifdef __STRICT_ANSI__ -#define _BSD_SOURCE -#define _POSIX_SOURCE -#define _XOPEN_SOURCE 600 -#endif +#include "rfb/rfbproto.h" #include #include #include diff --git a/src/rfbproto.c b/src/rfbproto.c index f34be7c..2ae0eaf 100644 --- a/src/rfbproto.c +++ b/src/rfbproto.c @@ -24,11 +24,6 @@ * rfbproto.c - functions to deal with client side of RFB protocol. */ -#ifdef __STRICT_ANSI__ -#define _BSD_SOURCE -#define _POSIX_SOURCE -#define _XOPEN_SOURCE 600 -#endif #include #include #include diff --git a/src/sasl.c b/src/sasl.c index 05066fe..65746b6 100644 --- a/src/sasl.c +++ b/src/sasl.c @@ -29,14 +29,8 @@ * sasl.c - functions to deal with client side of the SASL protocol. */ -#ifdef __STRICT_ANSI__ -#define _BSD_SOURCE -#define _POSIX_SOURCE -#define _XOPEN_SOURCE 600 -#endif - #include -#include +#include "rfb/rfbclient.h" #include "sockets.h" @@ -44,10 +38,6 @@ #include "tls.h" -#ifdef _MSC_VER -# define snprintf _snprintf /* MSVC went straight to the underscored syntax */ -#endif - /* * NB, keep in sync with similar method in qemud/remote.c */ diff --git a/src/sockets.c b/src/sockets.c index 5843c1d..a08fe3d 100644 --- a/src/sockets.c +++ b/src/sockets.c @@ -23,14 +23,6 @@ * sockets.c - functions to deal with sockets. */ -#ifdef __STRICT_ANSI__ -#define _BSD_SOURCE -#ifdef __linux__ -/* Setting this on other systems hides definitions such as INADDR_LOOPBACK. - * The check should be for __GLIBC__ in fact. */ -# define _POSIX_SOURCE -#endif -#endif #include #include #include diff --git a/src/vncviewer.c b/src/vncviewer.c index 2a7bd43..2ab6ff5 100644 --- a/src/vncviewer.c +++ b/src/vncviewer.c @@ -20,20 +20,11 @@ /* * vncviewer.c - the Xt-based VNC viewer. */ - -#ifdef _MSC_VER -#define strdup _strdup /* Prevent POSIX deprecation warnings */ -#endif - -#ifdef __STRICT_ANSI__ -#define _BSD_SOURCE -#define _POSIX_SOURCE -#endif #include #include #include #include -#include +#include "rfb/rfbclient.h" #include "tls.h" static void Dummy(rfbClient* client) {