summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9393cba)
raw | patch | inline | side by side (parent: 9393cba)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 9 Apr 2002 21:34:13 +0000 (21:34 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 9 Apr 2002 21:34:13 +0000 (21:34 +0000) |
configure.ac | patch | blob | history | |
src/rrd_graph.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index a9d872644d25ded53bebfd074433a8bb747522ce..d6557f5ee43ab8540afc87c9b4fbb6bf2cb8894b 100644 (file)
--- a/configure.ac
+++ b/configure.ac
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h)
+AC_CHECK_HEADERS(fcntl.h time.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/time.h sys/times.h sys/param.h sys/resource.h float.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl for each function found we get a definition in config.h
dnl of the form HAVE_FUNCTION
-AC_CHECK_FUNCS(strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
+AC_CHECK_FUNCS(tzset setlocale strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
dnl HP-UX 11.00 does not have finite but does have isfinite as a macro
AC_CHECK_FUNCS(fpclassify, ,
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index cc2861f3f82f41b201e44e296fa4e75838719061..c58326fa9c4cddb7fb7f620eca377125db79b092 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
#include <io.h>
#include <fcntl.h>
#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
#include "rrd_graph.h"
#include "rrd_graph_helper.h"
{
image_desc_t im;
+#ifdef HAVE_TZSET
+ tzset();
+#endif
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_ALL,"");
+#endif
+
+
rrd_graph_init(&im);
rrd_graph_options(argc,argv,&im);