diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-09-06 20:30:16 -0400 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2007-09-19 23:15:21 +0200 |
commit | 8b7f16fc375a0314fe4d45c591706538a2c65871 (patch) | |
tree | dc03b5dbeb448c40fcb7b25ec3bd80ed34ec1a78 /include | |
parent | 45be3f7d8dd87cb957ddd1c432c094cbe511bbfa (diff) | |
download | util-linux-old-8b7f16fc375a0314fe4d45c591706538a2c65871.tar.gz |
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.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/nls.h b/include/nls.h index f571ca50..dd0440c9 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 |