* include/grub/i18n.h: Always enable grub_gettext.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-21 20:12:41 +02:00
parent 228cfa97ca
commit 39fbb79aa1
2 changed files with 7 additions and 11 deletions

View file

@ -1,3 +1,7 @@
2010-05-21 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/i18n.h: Always enable grub_gettext.
2010-05-21 Vladimir Serbinenko <phcoder@gmail.com> 2010-05-21 Vladimir Serbinenko <phcoder@gmail.com>
* kern/i386/pc/init.c (make_install_device): Fix a leftover usage of old * kern/i386/pc/init.c (make_install_device): Fix a leftover usage of old

View file

@ -22,10 +22,10 @@
#include <config.h> #include <config.h>
#include <grub/symbol.h> #include <grub/symbol.h>
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
/* NLS can be disabled through the configure --disable-nls option. */ /* NLS can be disabled through the configure --disable-nls option. */
#if (defined(ENABLE_NLS) && ENABLE_NLS) #if (defined(ENABLE_NLS) && ENABLE_NLS) || !defined (GRUB_UTIL)
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
# ifdef GRUB_UTIL # ifdef GRUB_UTIL
@ -41,19 +41,11 @@ extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
for invalid uses of the value returned from these functions. for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */ contain "#define const". */
# ifdef GRUB_UTIL
static inline const char * __attribute__ ((always_inline)) static inline const char * __attribute__ ((always_inline))
gettext (const char *str) gettext (const char *str)
{ {
return str; return str;
} }
# else
static inline const char * __attribute__ ((always_inline))
grub_gettext (const char *str)
{
return str;
}
# endif /* GRUB_UTIL */
#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */ #endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */