which is the case with --disabled-nls.
* include/grub/i18n.h: Use (defined(ENABLE_NLS)
&& ENABLE_NLS) instead of ENABLE_NLS in all #if preprocessor macros.
* util/misc.c: Likewise.
* util/mkisofs/mkisofs.c: Likewise.
* util/mkisofs/mkisofs.h: Likewise.
+2010-03-27 Grégoire Sutre <gregoire.sutre@gmail.com>
+
+ Fix a build failure (-Wundef -Werror) when ENABLE_NLS is not defined,
+ which is the case with --disabled-nls.
+
+ * include/grub/i18n.h: Use (defined(ENABLE_NLS)
+ && ENABLE_NLS) instead of ENABLE_NLS in all #if preprocessor macros.
+ * util/misc.c: Likewise.
+ * util/mkisofs/mkisofs.c: Likewise.
+ * util/mkisofs/mkisofs.h: Likewise.
+
2010-03-27 Vladimir Serbinenko <phcoder@gmail.com>
Simplify Apple CC support.
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
+#if (defined(ENABLE_NLS) && ENABLE_NLS)
# ifdef GRUB_UTIL
# endif /* GRUB_UTIL */
-#else /* ! ENABLE_NLS */
+#else /* ! (defined(ENABLE_NLS) && ENABLE_NLS) */
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
# define grub_gettext(str) ((const char *) (str))
# endif /* GRUB_UTIL */
-#endif /* ENABLE_NLS */
+#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
#ifdef GRUB_UTIL
# define _(str) gettext(str)
void
grub_util_init_nls (void)
{
-#if ENABLE_NLS
+#if (defined(ENABLE_NLS) && ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
-#endif /* ENABLE_NLS */
+#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
}
#endif
char *log_file = 0;
set_program_name (argv[0]);
-#if ENABLE_NLS
+#if (defined(ENABLE_NLS) && ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
-#endif /* ENABLE_NLS */
+#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
if (argc < 2)
usage();
#include <prototyp.h>
#include <sys/stat.h>
-#if ENABLE_NLS
+#if (defined(ENABLE_NLS) && ENABLE_NLS)
# include <locale.h>
# include <libintl.h>
-#else /* ! ENABLE_NLS */
+#else /* ! (defined(ENABLE_NLS) && ENABLE_NLS) */
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
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 */
+#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
#define _(str) gettext(str)
#define N_(str) str