From 8b7f16fc375a0314fe4d45c591706538a2c65871 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 6 Sep 2007 20:30:16 -0400 Subject: 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 --- include/nls.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/nls.h') 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 +#else +# undef setlocale +# define setlocale(Category, Locale) /* empty */ +#endif + #ifdef ENABLE_NLS # include # define _(Text) gettext (Text) @@ -16,7 +23,6 @@ int main(int argc, char *argv[]); # define N_(String) (String) # endif #else -# include # undef bindtextdomain # define bindtextdomain(Domain, Directory) /* empty */ # undef textdomain -- cgit v1.2.3-55-g7522