1 /*****************************************************************************
2 * RRDtool 1.4.2 Copyright by Tobi Oetiker, 1997-2009
3 *****************************************************************************
4 * rrd_tool.h Common Header File
5 *****************************************************************************/
14 #include "../rrd_config.h"
15 #elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
16 #include "../win32/config.h"
21 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
23 /* Win32 only includes */
25 #include <float.h> /* for _isnan */
26 #include <io.h> /* for chdir */
28 struct tm *localtime_r(
44 /* unix-only includes */
45 #if !defined isnan && !defined HAVE_ISNAN
52 /* local include files -- need to be after the system ones */
53 #ifdef HAVE_GETOPT_LONG
57 #include "rrd_getopt.h"
60 #include "rrd_format.h"
63 #define max(a,b) ((a) > (b) ? (a) : (b))
67 #define min(a,b) ((a) < (b) ? (a) : (b))
70 #define DIM(x) (sizeof(x)/sizeof(x[0]))
76 /* HELPER FUNCTIONS */
84 const char *file_name,
86 int rrd_fetch_fn (const char *filename,
91 unsigned long *ds_cnt,
97 int rrd_fetch_fn_libdbi(const char *filename, enum cf_en cf_idx,
98 time_t *start,time_t *end,
100 unsigned long *ds_cnt,
105 #define RRD_READONLY (1<<0)
106 #define RRD_READWRITE (1<<1)
107 #define RRD_CREAT (1<<2)
108 #define RRD_READAHEAD (1<<3)
109 #define RRD_COPY (1<<4)
110 #define RRD_EXCL (1<<5)
114 enum dst_en dst_conv(
119 off_t rrd_get_header_size(
125 #endif /* _RRD_TOOL_H */