diff options
author | Dan McGee <dan@archlinux.org> | 2007-10-22 23:52:55 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-10-22 23:52:55 -0500 |
commit | 8b1fb61df26649e1dec626ef9120fc787a831fcc (patch) | |
tree | 399e6558ad5e9a4f8d283b771b1a9837254b32b7 /src/pacman/pacman.c | |
parent | 0c4f7d821c1cd4ce559476595e2108f75b3dde7c (diff) |
Ensure all localization stuff is correctly guarded
Anything dealing with libintl and localization should be correctly guarded
inside an ENABLE_NLS block on both the pacman and libalpm sides.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r-- | src/pacman/pacman.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 2f6f9280..705edafa 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -30,7 +30,6 @@ #include <unistd.h> #include <sys/types.h> #include <sys/utsname.h> /* uname */ -#include <libintl.h> /* bindtextdomain, textdomain */ #include <locale.h> /* setlocale */ #include <time.h> /* time_t */ #if defined(PACMAN_DEBUG) && defined(HAVE_MTRACE) @@ -168,6 +167,7 @@ static void version(void) /** Sets up gettext localization. Safe to call multiple times. */ /* Inspired by the monotone function localize_monotone. */ +#if defined(ENABLE_NLS) static void localize(void) { static int init = 0; @@ -178,6 +178,7 @@ static void localize(void) init = 1; } } +#endif /** Set user agent environment variable. */ @@ -730,7 +731,9 @@ int main(int argc, char *argv[]) signal(SIGSEGV, cleanup); /* i18n init */ +#if defined(ENABLE_NLS) localize(); +#endif /* set user agent for downloading */ setuseragent(); |