diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 23:27:12 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 23:27:12 +0200 |
commit | 26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch) | |
tree | c4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/nl_langinfo.c | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/nl_langinfo.c')
-rw-r--r-- | gl/nl_langinfo.c | 15 |
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 @@ | |||
1 | /* nl_langinfo() replacement: query locale dependent information. | 1 | /* nl_langinfo() replacement: query locale dependent information. |
2 | 2 | ||
3 | Copyright (C) 2007-2010 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2013 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
@@ -67,6 +67,10 @@ rpl_nl_langinfo (nl_item item) | |||
67 | return ""; | 67 | return ""; |
68 | } | 68 | } |
69 | # endif | 69 | # endif |
70 | # if GNULIB_defined_T_FMT_AMPM | ||
71 | case T_FMT_AMPM: | ||
72 | return "%I:%M:%S %p"; | ||
73 | # endif | ||
70 | # if GNULIB_defined_ERA | 74 | # if GNULIB_defined_ERA |
71 | case ERA: | 75 | case ERA: |
72 | /* The format is not standardized. In glibc it is a sequence of strings | 76 | /* The format is not standardized. In glibc it is a sequence of strings |
@@ -93,6 +97,12 @@ rpl_nl_langinfo (nl_item item) | |||
93 | strings, appended in memory. */ | 97 | strings, appended in memory. */ |
94 | return "\0\0\0\0\0\0\0\0\0\0"; | 98 | return "\0\0\0\0\0\0\0\0\0\0"; |
95 | # endif | 99 | # endif |
100 | # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS | ||
101 | case YESEXPR: | ||
102 | return "^[yY]"; | ||
103 | case NOEXPR: | ||
104 | return "^[nN]"; | ||
105 | # endif | ||
96 | default: | 106 | default: |
97 | break; | 107 | break; |
98 | } | 108 | } |
@@ -131,7 +141,8 @@ nl_langinfo (nl_item item) | |||
131 | { | 141 | { |
132 | static char buf[2 + 10 + 1]; | 142 | static char buf[2 + 10 + 1]; |
133 | 143 | ||
134 | /* Woe32 has a function returning the locale's codepage as a number. */ | 144 | /* The Windows API has a function returning the locale's codepage as |
145 | a number. */ | ||
135 | sprintf (buf, "CP%u", GetACP ()); | 146 | sprintf (buf, "CP%u", GetACP ()); |
136 | return buf; | 147 | return buf; |
137 | } | 148 | } |