summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Frysinger2007-09-07 02:30:16 +0200
committerKarel Zak2007-09-19 23:15:21 +0200
commit8b7f16fc375a0314fe4d45c591706538a2c65871 (patch)
treedc03b5dbeb448c40fcb7b25ec3bd80ed34ec1a78 /include
parentblockdev: add missing description about option --report in manpage (diff)
downloadkernel-qcow2-util-linux-8b7f16fc375a0314fe4d45c591706538a2c65871.tar.gz
kernel-qcow2-util-linux-8b7f16fc375a0314fe4d45c591706538a2c65871.tar.xz
kernel-qcow2-util-linux-8b7f16fc375a0314fe4d45c591706538a2c65871.zip
build-sys: nls/locale handling in util-linux-ng general
On Monday 03 September 2007, Karel Zak wrote: > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592 > > I agree that we need a better support for compilation without > locales, but from my point of view NLS != all locales stuff. The NLS > support is subset only. thinking about the input from everyone, i'd propose the attached ... Only pull in locale.h as needed and move it to the common nls.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r--include/nls.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/nls.h b/include/nls.h
index f571ca505..dd0440c9a 100644
--- a/include/nls.h
+++ b/include/nls.h
@@ -7,6 +7,13 @@ int main(int argc, char *argv[]);
#define LOCALEDIR "/usr/share/locale"
#endif
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#else
+# undef setlocale
+# define setlocale(Category, Locale) /* empty */
+#endif
+
#ifdef ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
@@ -16,7 +23,6 @@ int main(int argc, char *argv[]);
# define N_(String) (String)
# endif
#else
-# include <locale.h>
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
# undef textdomain