Compiling utils fail when disable NLS with the --disable-nls switch.
"mkfs.c:46: error: 'LC_ALL' undeclared (first use in this function)"
It is due to a missing locale.h header : When enabling NLS, nls.h
includes libintl.h, which in turn includes locale.h. When disabling NLS,
libintl.h isn't anymore included nor locale.h, which is needed for the
setlocale() calls.
Signed-off-by: Gabriel Barazer <gabriel@oxeva.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
+#ifndef UTIL_LINUX_NLS_H
+#define UTIL_LINUX_NLS_H
+
int main(int argc, char *argv[]);
#ifndef LOCALEDIR
# define N_(String) (String)
# endif
#else
+# include <locale.h>
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
# undef textdomain
# define N_(Text) (Text)
#endif
-
+#endif /* UTIL_LINUX_NLS_H */