* patches to make rrdtool compile on win32 (trunk and 1.4)
[rrdtool.git] / win32 / rrd_config.h.msvc
index 7c55d5a..7855b2d 100644 (file)
@@ -1,66 +1,60 @@
-/* rrd_config.h.msvc. Hand-tweaked rrd_config.h for MSVC compiler. */\r
-#ifndef WIN32 \r
-#error This rrd_config.h is created for Win32 platform! \r
-#endif \r
-#ifndef RRD_CONFIG_H\r
-#define RRD_CONFIG_H\r
-\r
-#include <math.h>\r
-#include <float.h>\r
-#include <direct.h>\r
-\r
-/* the placeholders will be filled in by get_ver.awk */\r
-/* http://cm.bell-labs.com/cm/cs/awkbook/index.html */\r
-#define NUMVERS @@NUMVERS@@\r
-#define PACKAGE_VERSION "@@PACKAGE_VERSION@@"\r
-\r
-#define PACKAGE_NAME "rrdtool"\r
-#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION\r
-\r
-#define HAVE_STRFTIME 1\r
-#define HAVE_TIME_H 1\r
-#define HAVE_LOCALE_H 1\r
-#define HAVE_TZSET 1\r
-#define HAVE_SETLOCALE 1\r
-#define HAVE_MATH_H 1\r
-#define HAVE_FLOAT_H 1\r
-#define HAVE_MEMMOVE 1\r
-#define HAVE_MALLOC_H 1\r
-#define HAVE_MKTIME 1\r
-#define HAVE_STRFTIME 1\r
-#define HAVE_STRING_H 1\r
-#define HAVE_VSNPRINTF 1\r
-#define HAVE_SYS_TYPES_H 1\r
-#define HAVE_SYS_STAT_H 1\r
-\r
-/* Define to 1 if you have the ANSI C header files. */\r
-#define STDC_HEADERS 1\r
-\r
-#define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF)\r
-#define isnan _isnan\r
-#define finite _finite\r
-#define snprintf _snprintf\r
-#define vsnprintf _vsnprintf\r
-#define strftime strftime_ \r
-#define strtoll(p, e, b) _strtoi64(p, e, b)\r
-\r
-/* realloc does not support NULL as argument */\r
-#define NO_NULL_REALLOC 1\r
-#if NO_NULL_REALLOC\r
-# define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))\r
-#else\r
-# define rrd_realloc(a,b) realloc((a), (b))\r
-#endif      \r
-\r
-/* Vertical label angle: 90.0 (default) or 270.0 */\r
-#define RRDGRAPH_YLEGEND_ANGLE 90.0\r
-\r
-#define RRD_DEFAULT_FONT "arial.ttf"\r
-/* #define RRD_DEFAULT_FONT "DejaVuSansMono-Roman.ttf" */\r
-\r
-/* #define WITH_PIECHART 1 */\r
-\r
-/* #define DEBUG 1 */\r
-\r
-#endif /* RRD_CONFIG_H */\r
-\r
+/* config.h.msvc.  Hand-tweaked config.h for MSVC compiler.  */
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include <math.h>
+#include <float.h>
+#include <direct.h>
+#include <ctype.h>
+
+/* realloc does not support NULL as argument */
+
+#define HAVE_STRFTIME 1
+#define HAVE_TIME_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_TZSET 1
+#define HAVE_SETLOCALE 1
+#define HAVE_MATH_H 1
+#define HAVE_FLOAT_H 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MKTIME 1
+#define HAVE_STRFTIME 1
+#define HAVE_STRING_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+#define NUMVERS 1.4030
+#define PACKAGE_NAME "rrdtool"
+#define PACKAGE_VERSION "1.4.3"
+#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
+
+#define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF)
+#define isnan _isnan
+#define finite _finite
+#define snprintf _snprintf
+//#define vsnprintf _vsnprintf
+//#define strftime strftime_
+
+#define NO_NULL_REALLOC 1
+#if NO_NULL_REALLOC
+# define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))
+#else
+# define rrd_realloc(a,b) realloc((a), (b))
+#endif
+
+/* Vertical label angle: 90.0 (default) or 270.0 */
+#define RRDGRAPH_YLEGEND_ANGLE 90.0
+
+#define RRD_DEFAULT_FONT "Courier"
+
+/* #define DEBUG 1 */
+
+__inline int round(double a){int x = (a + 0.5); return x;}
+
+#endif                          /* CONFIG_H */