X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_tool.h;h=7280e7448c1a9d3d7b47def89efad0810eb2ffed;hb=c47bbeca17b665a5f60a1c328be0590a148ea5e8;hp=780cd05ea9054403167084e1c686496342347fcb;hpb=5c240077e0a6f12a27972a13ba3f694c2989ba35;p=rrdtool.git diff --git a/src/rrd_tool.h b/src/rrd_tool.h index 780cd05..7280e74 100644 --- a/src/rrd_tool.h +++ b/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