Code

Only include libgen.h when we have it. use pbbasename if we do not. Also fixes #223.
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 27 May 2009 13:11:22 +0000 (13:11 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 27 May 2009 13:11:22 +0000 (13:11 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1818 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_graph.c
program/src/rrd_graph.h

index a0de36e43672c46c992dfc81a25ea7efad740d7f..594c9f6df525375f6dda0d5deea4d780c21172c2 100644 (file)
@@ -6,11 +6,16 @@
 
 
 #include <sys/stat.h>
-#include <libgen.h>
+
+/* for basename */
+#ifdef HAVE_LIBGEN_H
+#  include <libgen.h>
+#eles
+#include "plbasename.h"
+#endif
 
 #ifdef WIN32
 #include "strftime.h"
-#include "plbasename.h"
 #endif
 
 #include "rrd_tool.h"
index f029fd1f3e14157f1d064b1963c6ada00f777ece..0593d4a931207c1351c3d235c121d160c99a298c 100644 (file)
 #include <cairo-ps.h>
 #include <pango/pangocairo.h>
 
-#ifdef HAVE_LIBGEN_H
-/* for basename */
-#  include <libgen.h>
-#endif
 
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"