$(TOP)/win32/$(RRD_LIB_NAME).dll $(TOP)/win32/$(RRD_LIB_NAME).lib: \\r
$(TOP)/win32/$(RRD_LIB_NAME).def $(TOP)/win32/$(RRD_LIB_NAME).res \\r
$(RRD_LIB_OBJ_LIST)\r
- cl /nologo /MT /LD /Zi /Fe$(TOP)/win32/$(RRD_LIB_NAME).dll \\r
+ cl /nologo /MD /LD /Zi /Fe$(TOP)/win32/$(RRD_LIB_NAME).dll \\r
/Fd$(TOP)/win32/$(RRD_LIB_NAME).pdb \\r
$(TOP)/win32/$(RRD_LIB_NAME).def $(TOP)/win32/$(RRD_LIB_NAME).res \\r
$(RRD_LIB_OBJ_LIST) /link $(THIRD_PARTY_LIB) $(LD_FLAGS)\r
\r
$(TOP)/win32/rrdtool.exe: $(TOP)/win32/rrdtool.res $(TOP)/src/rrd_tool.obj \\r
$(TOP)/win32/$(RRD_LIB_NAME).lib\r
- cl /nologo /MT /Zi /Fe$@ $(TOP)/win32/rrdtool.res $(TOP)/src/rrd_tool.obj \\r
+ cl /nologo /MD /Zi /Fe$@ $(TOP)/win32/rrdtool.res $(TOP)/src/rrd_tool.obj \\r
$(TOP)/win32/$(RRD_LIB_NAME).lib /link $(LD_FLAGS)\r
#Just waiting for antivirus program to finished check tasks\r
-@ping 1.1.1.1 -n 1 -w 1000 > NUL\r
\r
$(TOP)/win32/rrdupdate.exe: $(TOP)/win32/rrdupdate.res $(TOP)/src/rrdupdate.obj \\r
$(TOP)/src/plbasename.obj $(TOP)/win32/$(RRD_LIB_NAME).lib\r
- cl /nologo /MT /Zi /Fe$@ $(TOP)/win32/rrdupdate.res $(TOP)/src/rrdupdate.obj \\r
+ cl /nologo /MD /Zi /Fe$@ $(TOP)/win32/rrdupdate.res $(TOP)/src/rrdupdate.obj \\r
$(TOP)/src/plbasename.obj $(TOP)/win32/$(RRD_LIB_NAME).lib /link $(LD_FLAGS)\r
#Just waiting for antivirus program to finished check tasks\r
-@ping 1.1.1.1 -n 1 -w 1000 > NUL\r
$(TOP)/win32/rrdcgi.exe: $(TOP)/win32/rrdcgi.res $(TOP)/src/rrd_cgi.obj \\r
$(TOP)/src/optparse.obj \\r
$(TOP)/win32/$(RRD_LIB_NAME).lib\r
- cl /nologo /MT /Zi /Fe$@ $(TOP)/win32/rrdcgi.res $(TOP)/src/rrd_cgi.obj \\r
+ cl /nologo /MD /Zi /Fe$@ $(TOP)/win32/rrdcgi.res $(TOP)/src/rrd_cgi.obj \\r
$(TOP)/src/optparse.obj \\r
$(TOP)/win32/$(RRD_LIB_NAME).lib /link $(LD_FLAGS)\r
#Just waiting for antivirus program to finished check tasks\r
-mt -manifest $(TOP)/win32/uac.manifest -outputresource:$(TOP)/win32/rrdcgi.exe;#1\r
\r
{$(TOP)/src}.c{$(TOP)/src}.obj:\r
- cl /nologo /MT /DWIN32 /c $(CPPFLAGS) /Fo$@ $<\r
+ cl /nologo /MD /DWIN32 /c $(CPPFLAGS) /Fo$@ $<\r
\r
{$(TOP)/win32}.rc{$(TOP)/win32}.res:\r
rc /nologo /I./src /fo$@ $<\r
\r
{$(TOP)/win32}.c{$(TOP)/win32}.obj:\r
- cl /nologo /MT /DWIN32 /c $(CPPFLAGS) /Fo$@ $<\r
+ cl /nologo /MD /DWIN32 /c $(CPPFLAGS) /Fo$@ $<\r
#define HAVE_TZSET 1
/* Misc Missing Windows defines */
+#undef PATH_MAX /* PATH_MAX is defined in win32/dirent.h too. Relevant, if included before rrd_config.h */
#define PATH_MAX 1024
-/*
- * Windows Sockets errors redefined as regular Berkeley error constants.
- */
-#define ENOBUFS WSAENOBUFS
-#define ENOTCONN WSAENOTCONN
-
#include <ctype.h>
#include <direct.h>
#include <stdlib.h>
#include <WinSock.h>
+#include <errno.h> /* errno.h has to be included before the redefinitions of ENOBUFS and ENOTCONN below */
+/*
+ * Windows Sockets errors redefined as regular Berkeley error constants.
+ */
+#undef ENOBUFS /* undefine first, because this is defined in errno.h and redefined here */
+#define ENOBUFS WSAENOBUFS
+#undef ENOTCONN /* undefine first, because this is defined in errno.h and redefined here */
+#define ENOTCONN WSAENOTCONN
-#include <errno.h>
#include "mkstemp.h"
-
+#if _MSC_VER < 1900
#define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF)
#define isnan _isnan
-#define finite _finite
#define snprintf _snprintf
+#endif
+
+#define finite _finite
#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))
#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
#define strcasecmp _stricmp
// in MSVC++ 12.0 / Visual Studio 2013 is a definition of round in math.h
// some values of _MSC_VER
+//MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
//MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
//MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
//MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)