aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/Makefile2
-rw-r--r--locale/localedef.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/locale/Makefile b/locale/Makefile
index c3abc2c62e..74959e628a 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -25,7 +25,7 @@ headers = locale.h
distribute = localeinfo.h categories.def \
$(localedef-modules:=.c) $(locale-modules:=.c) \
$(lib-modules:=.c) config.h hash.h iso-4217.def \
- keyword.gperf keyword.h localedef.h token.h
+ keyword.gperf keyword.h localedef.h token.h error.h
routines = setlocale loadlocale localeconv nl_langinfo
categories = ctype messages monetary numeric time collate
aux = $(categories:%=lc-%) $(categories:%=C-%)
diff --git a/locale/localedef.c b/locale/localedef.c
index c331e11888..fceebc5635 100644
--- a/locale/localedef.c
+++ b/locale/localedef.c
@@ -24,6 +24,7 @@ Cambridge, MA 02139, USA. */
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
+#include "error.h"
#include "localedef.h"
@@ -60,10 +61,6 @@ static const struct option long_options[] =
};
-/* This is defined in error-msg.h. */
-extern int warning_cntr;
-
-
/* Prototypes for local functions. */
static void usage (int status) __attribute__ ((noreturn));
static int construct_output_path (const char *path);
@@ -169,7 +166,7 @@ main(int argc, char *argv[])
/* We are now able to write the data files. If warning were given we
do it only if it is explicitly requested (--force). */
- if (warning_cntr == 0 || force_output != 0)
+ if (error_message_count == 0 || force_output != 0)
if (cannot_write != 0)
error (0, 0, gettext ("cannot write output file `%s': %s"),
output_path, strerror (cannot_write));