aboutsummaryrefslogtreecommitdiff
path: root/gl/nl_langinfo.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-19 23:27:12 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-19 23:27:12 +0200
commit26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch)
treec4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/nl_langinfo.c
parent5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff)
downloadmonitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/nl_langinfo.c')
-rw-r--r--gl/nl_langinfo.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gl/nl_langinfo.c b/gl/nl_langinfo.c
index e81c81e7..771c9533 100644
--- a/gl/nl_langinfo.c
+++ b/gl/nl_langinfo.c
@@ -1,6 +1,6 @@
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2010 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,6 +67,10 @@ rpl_nl_langinfo (nl_item item)
return "";
}
# endif
+# if GNULIB_defined_T_FMT_AMPM
+ case T_FMT_AMPM:
+ return "%I:%M:%S %p";
+# endif
# if GNULIB_defined_ERA
case ERA:
/* The format is not standardized. In glibc it is a sequence of strings
@@ -93,6 +97,12 @@ rpl_nl_langinfo (nl_item item)
strings, appended in memory. */
return "\0\0\0\0\0\0\0\0\0\0";
# endif
+# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS
+ case YESEXPR:
+ return "^[yY]";
+ case NOEXPR:
+ return "^[nN]";
+# endif
default:
break;
}
@@ -131,7 +141,8 @@ nl_langinfo (nl_item item)
{
static char buf[2 + 10 + 1];
- /* Woe32 has a function returning the locale's codepage as a number. */
+ /* The Windows API has a function returning the locale's codepage as
+ a number. */
sprintf (buf, "CP%u", GetACP ());
return buf;
}