2009-01-01 Yves Blusseau <yves.blusseau@zetam.org>
* configure.ac: check external intl library * Makefile.in: add compiler and linker flags to properly compile with intl library * include/grub/i18n.h: add a check to disable NLS * util/misc.c (grub_util_init_nls): new function * include/grub/util/misc.h: likewise * util/elf/grub-mkimage.c: use the new function below to initialize NLS * util/grub-editenv.c: likewise * util/grub-emu.c: likewise * util/grub-fstest.c: likewise * util/grub-mkdevicemap.c: likewise * util/grub-mkfont.c: likewise * util/grub-mkrelpath.c: likewise * util/grub-probe.c: likewise * util/i386/pc/grub-mkimage.c: likewise * util/i386/pc/grub-setup.c: likewise * util/sparc64/ieee1275/grub-mkimage.c: likewise * util/sparc64/ieee1275/grub-ofpathname.c: likewise * util/sparc64/ieee1275/grub-setup.c: likewise * util/mkisofs/mkisofs.h: add a check to disable NLS * util/mkisofs/mkisofs.c: likewise
This commit is contained in:
parent
cec573c894
commit
2f1a3acf75
20 changed files with 115 additions and 70 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
Copyright 1993 Yggdrasil Computing, Incorporated
|
||||
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009,2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -645,9 +645,11 @@ int FDECL2(main, int, argc, char **, argv){
|
|||
char *log_file = 0;
|
||||
|
||||
set_program_name (argv[0]);
|
||||
#if ENABLE_NLS
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
if (argc < 2)
|
||||
usage();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
Copyright 1993 Yggdrasil Computing, Incorporated
|
||||
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009,2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -30,8 +30,21 @@
|
|||
#include <prototyp.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <locale.h>
|
||||
#include <libintl.h>
|
||||
#if ENABLE_NLS
|
||||
|
||||
# include <locale.h>
|
||||
# include <libintl.h>
|
||||
|
||||
#else /* ! ENABLE_NLS */
|
||||
|
||||
/* Disabled NLS.
|
||||
The casts to 'const char *' serve the purpose of producing warnings
|
||||
for invalid uses of the value returned from these functions.
|
||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||
contain "#define const". */
|
||||
# define gettext(Msgid) ((const char *) (Msgid))
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
#define _(str) gettext(str)
|
||||
#define N_(str) str
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue