2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2009,2010 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
23 #include <grub/symbol.h>
25 /* NLS can be disabled through the configure --disable-nls option. */
26 #if (defined(ENABLE_NLS) && ENABLE_NLS) || !defined (GRUB_UTIL)
28 extern const char *(*EXPORT_VAR(grub_gettext
)) (const char *s
) __attribute__ ((format_arg (1)));
35 # endif /* GRUB_UTIL */
37 #else /* ! (defined(ENABLE_NLS) && ENABLE_NLS) */
40 The casts to 'const char *' serve the purpose of producing warnings
41 for invalid uses of the value returned from these functions.
42 On pre-ANSI systems without 'const', the config.h file is supposed to
43 contain "#define const". */
44 static inline const char * __attribute__ ((always_inline
,format_arg (1)))
45 gettext (const char *str
)
50 #endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
53 static inline const char * __attribute__ ((always_inline
,format_arg (1)))
59 static inline const char * __attribute__ ((always_inline
,format_arg (1)))
62 return grub_gettext(str
);
64 #endif /* GRUB_UTIL */
68 #endif /* GRUB_I18N_H */