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/program@1818 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_graph.c
src/rrd_graph.h

index a0de36e..594c9f6 100644 (file)
@@ -6,11 +6,16 @@
 
 
 #include <sys/stat.h>
 
 
 #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"
 
 #ifdef WIN32
 #include "strftime.h"
-#include "plbasename.h"
 #endif
 
 #include "rrd_tool.h"
 #endif
 
 #include "rrd_tool.h"
index f029fd1..0593d4a 100644 (file)
 #include <cairo-ps.h>
 #include <pango/pangocairo.h>
 
 #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"
 
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"