diff options
author | Mike Frysinger | 2007-09-07 02:30:16 +0200 |
---|---|---|
committer | Karel Zak | 2007-09-19 23:15:21 +0200 |
commit | 8b7f16fc375a0314fe4d45c591706538a2c65871 (patch) | |
tree | dc03b5dbeb448c40fcb7b25ec3bd80ed34ec1a78 /include | |
parent | blockdev: add missing description about option --report in manpage (diff) | |
download | kernel-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.h | 8 |
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 |