summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ac8edae)
raw | patch | inline | side by side (parent: ac8edae)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 27 Oct 2009 16:18:43 +0000 (16:18 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 27 Oct 2009 16:18:43 +0000 (16:18 +0000) |
diff --git a/program/configure.ac b/program/configure.ac
index c5fe57d4eba819bfd379860969fe72e5bcbf9b23..f21892fb6022050f722a2e606630ff2023d4ee77 100644 (file)
--- a/program/configure.ac
+++ b/program/configure.ac
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h time.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h)
+AC_CHECK_HEADERS(stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.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(tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
+AC_CHECK_FUNCS(tzset fsync mbstowcs opendir readdir chdir chroot getuid strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
AC_FUNC_STRERROR_R
diff --git a/program/src/rrd_dump.c b/program/src/rrd_dump.c
index 57bd0b8d278f431b78bcbfabc7f122aff84e095e..3b7867f44551a7cd55ce8b745c2639c146816ea4 100644 (file)
--- a/program/src/rrd_dump.c
+++ b/program/src/rrd_dump.c
#include "rrd_rpncalc.h"
#include "rrd_client.h"
-#ifdef HAVE_LOCALE_H
#include <locale.h>
-#endif
#if !(defined(NETWARE) || defined(WIN32))
extern char *tzname[2];
return (-1);
}
-#ifdef HAVE_SETLOCALE
old_locale = setlocale(LC_NUMERIC, "C");
-#endif
+
if (opt_header == 1) {
CB_PUTS("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
rrd_free(&rrd);
-#ifdef HAVE_SETLOCALE
setlocale(LC_NUMERIC, old_locale);
-#endif
return rrd_close(rrd_file);
index b1cb663ca6bb1cd92050c8c3ec2e302f6ec90327..d3aa62697bed75bd563ada45ddcde66ed0018dff 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
#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_client.h"
index fc6f17be4ea6148755b8e45654969a1dec0d237f..d75247dc9e299943ad44bbfa05841ff62105abbe 100644 (file)
return (-1);
}
-#ifdef HAVE_SETLOCALE
old_locale = setlocale(LC_NUMERIC, "C");
-#endif
rrd = parse_file(argv[optind]);
-#ifdef HAVE_SETLOCALE
setlocale(LC_NUMERIC, old_locale);
-#endif
if (rrd == NULL)
return (-1);
diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c
index 7464b3cd7f7789c97cea01976b31ccd555c5e59b..302669d6641ff428a317e2e1474219dbfdc75d7d 100644 (file)
--- a/program/src/rrd_tool.c
+++ b/program/src/rrd_tool.c
#include "rrd_xport.h"
#include "rrd_i18n.h"
-#ifdef HAVE_LOCALE_H
#include <locale.h>
-#endif
+
void PrintUsage(
char *cmd);
#ifdef MUST_DISABLE_FPMASK
fpsetmask(0);
#endif
-#ifdef HAVE_LOCALE_H
+
/* initialize locale settings
according to localeconv(3) */
setlocale(LC_ALL, "");
-#endif
#if defined(HAVE_LIBINTL_H) && defined(BUILD_LIBINTL)
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);