X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=program%2Fsrc%2Frrd_tool.h;h=f21a17a7eb0d27f2c3bc41880d0feb627e0d1040;hb=bdc919b5c5713db4cf3647eefe538c906f5bfeb1;hp=780cd05ea9054403167084e1c686496342347fcb;hpb=033f54c1cf24ad6f9f428856c45d739564ca86d1;p=rrdtool-all.git diff --git a/program/src/rrd_tool.h b/program/src/rrd_tool.h index 780cd05e..f21a17a7 100644 --- a/program/src/rrd_tool.h +++ b/program/src/rrd_tool.h @@ -48,12 +48,33 @@ extern "C" { /* Sorry: don't know autoconf as well how to check the exist of dirent.h ans sys/stat.h */ -#include -#include -#include -/* + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif #endif -*/ + +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + + #if HAVE_UNISTD_H # include #endif @@ -139,6 +160,7 @@ int rrd_fetch_fn(char *filename, enum cf_en cf_idx, rrd_value_t **data); void rrd_free(rrd_t *rrd); +void rrd_freemem(void *mem); void rrd_init(rrd_t *rrd); int rrd_open(char *file_name, FILE **in_file, rrd_t *rrd, int rdwr);