summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f467b80)
raw | patch | inline | side by side (parent: f467b80)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 13 Feb 2010 11:30:17 +0000 (11:30 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 13 Feb 2010 11:30:17 +0000 (11:30 +0000) |
configure.ac | patch | blob | history | |
src/rrd_graph.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 07231b79dfa159555c2796de735634711732f8d9..d18fe9ecbb6d9d6e1094602a2076a3b13eac49ac 100644 (file)
--- a/configure.ac
+++ b/configure.ac
CHECK_FOR_WORKING_MS_ASYNC
+dnl do we have nl_langinfo(_NL_TIME_WEEK_1STDAY)
+AC_CHECK_FUNCS(_NL_TIME_WEEK_1STDAY, ,
+ [AC_MSG_CHECKING([for nl_langinfo(_NL_TIME_WEEK_1STDAY) with langinfo.h])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(_NL_TIME_WEEK_1STDAY)]])],[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE__NL_TIME_WEEK_1STDAY)],[AC_MSG_RESULT(no)])])
+
dnl Do we need getopt_long
dnl even when including our own getopt implementation
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index 390a66ec162ebe8ee80c48cf3932a62bf5eab7ed..9e23a4af06efa10ec652a8643cc0528c80211196 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
return 0;
}
-
static int find_first_weekday(void){
static int first_weekday = -1;
if (first_weekday == -1){
-#if defined(HAVE_NL_LANGINFO)
+#ifdef HAVE__NL_TIME_WEEK_1STDAY
/* according to http://sourceware.org/ml/libc-locales/2009-q1/msg00011.html */
long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
if (week_1stday_l == 19971130) first_weekday = 0; /* Sun */