summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2012-07-06 15:45:20 -0400
committerBen Kaduk <kaduk@mit.edu>2012-07-06 16:34:28 -0400
commit7afeca0d0f821e12298d6987a9d1cd65be7539b0 (patch)
tree149904f35e11c07132b960eaa2f604b4ed5b542a /src/include
parenta7a0fb374869e77b380e658fa698622f1adcdbe4 (diff)
Allow using locales when gettext is absent
Previously, if configure did not detect dgettext(), we disabled anything that smelled like localization, inadvertently including setlocale(). Now that we use setlocale(LC_ALL, ""), we have localized dates available as well as messages, so we should not disable calls to setlocale() any more. Since the routines from locale.h are only used in a relatively small number of places, just include the header directly in those files and remove it from k5-platform.h.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/k5-platform.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h
index 951652497..c92729117 100644
--- a/src/include/k5-platform.h
+++ b/src/include/k5-platform.h
@@ -41,7 +41,7 @@
* + mkstemp
* + zap (support function; macro is in k5-int.h)
* + path manipulation
- * + _, N_, dgettext, bindtextdomain, setlocale (for localization)
+ * + _, N_, dgettext, bindtextdomain (for localization)
*/
#ifndef K5_PLATFORM_H
@@ -1061,13 +1061,12 @@ int k5_path_isabs(const char *path);
/*
* Localization macros. If we have gettext, define _ appropriately for
- * translating a string. If we do not have gettext, define _, bindtextdomain,
- * and setlocale as no-ops. N_ is always a no-op; it marks a string for
+ * translating a string. If we do not have gettext, define _ and
+ * bindtextdomain as no-ops. N_ is always a no-op; it marks a string for
* extraction to pot files but does not translate it.
*/
#ifdef ENABLE_NLS
#include <libintl.h>
-#include <locale.h>
#define KRB5_TEXTDOMAIN "mit-krb5"
#define _(s) dgettext(KRB5_TEXTDOMAIN, s)
#else
@@ -1075,7 +1074,6 @@ int k5_path_isabs(const char *path);
#define dgettext(d, m) m
#define ngettext(m1, m2, n) (((n) == 1) ? m1 : m2)
#define bindtextdomain(p, d)
-#define setlocale(c, l)
#endif
#define N_(s) s