about summary refs log tree commit diff
path: root/locale/programs/localedef.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-05 23:29:24 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-05 23:29:24 +0000
commitf2b98f97ebc32b68271505131b745289f3255984 (patch)
treec0b00f281985b708c6b991648a05be6752f96868 /locale/programs/localedef.c
parent475361200b40615d2d459c8d6a7544fdf4f9533a (diff)
downloadglibc-f2b98f97ebc32b68271505131b745289f3255984.tar.gz
glibc-f2b98f97ebc32b68271505131b745289f3255984.tar.xz
glibc-f2b98f97ebc32b68271505131b745289f3255984.zip
Update.
	* inet/getnetgrent_r.c (innetgr): Add int* parameter to getfct
	definition and pass &errno in use of this variable.
	Reported by Simon Wilkinson <simon@sxw.org.uk> [PR libc/2911].

2002-02-04  Andreas Schwab  <schwab@suse.de>

	* locale/programs/localedef.h (WITH_CUR_LOCALE): Define.
	* locale/programs/charmap-dir.c: Wrap calls that output messages
	with WITH_CUR_LOCALE.  Include "localedef.h" first.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-address.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/linereader.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/repertoire.c: Likewise.

2002-02-05  Ulrich Drepper  <drepper@redhat.com>
Diffstat (limited to 'locale/programs/localedef.c')
-rw-r--r--locale/programs/localedef.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 1d09e8b46f..3c159560e9 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -31,10 +31,11 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <error.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 
-#include "error.h"
+#include "localedef.h"
 #include "charmap.h"
 #include "locfile.h"
 
@@ -189,7 +190,8 @@ main (int argc, char *argv[])
      defines error code 3 for this situation so I think it must be
      a fatal error (see P1003.2 4.35.8).  */
   if (sysconf (_SC_2_LOCALEDEF) < 0)
-    error (3, 0, _("FATAL: system does not define `_POSIX2_LOCALEDEF'"));
+    WITH_CUR_LOCALE (error (3, 0, _("\
+FATAL: system does not define `_POSIX2_LOCALEDEF'")));
 
   /* Process charmap file.  */
   charmap = charmap_read (charmap_file, verbose, be_quiet, 1);
@@ -202,7 +204,8 @@ main (int argc, char *argv[])
 
   /* Now read the locale file.  */
   if (locfile_read (&global, charmap) != 0)
-    error (4, errno, _("cannot open locale definition file `%s'"), input_file);
+    WITH_CUR_LOCALE (error (4, errno, _("\
+cannot open locale definition file `%s'"), input_file));
 
   /* Perhaps we saw some `copy' instructions.  */
   while (1)
@@ -217,8 +220,8 @@ main (int argc, char *argv[])
 	break;
 
       if (locfile_read (runp, charmap) != 0)
-	error (4, errno, _("cannot open locale definition file `%s'"),
-	       runp->name);
+	WITH_CUR_LOCALE (error (4, errno, _("\
+cannot open locale definition file `%s'"), runp->name));
     }
 
   /* Check the categories we processed in source form.  */
@@ -229,13 +232,14 @@ main (int argc, char *argv[])
   if (error_message_count == 0 || force_output != 0)
     {
       if (cannot_write_why != 0)
-	error (4, cannot_write_why, _("cannot write output files to `%s'"),
-	       output_path);
+	WITH_CUR_LOCALE (error (4, cannot_write_why, _("\
+cannot write output files to `%s'"), output_path));
       else
 	write_all_categories (locales, charmap, output_path);
     }
   else
-    error (4, 0, _("no output file produced because warning were issued"));
+    WITH_CUR_LOCALE (error (4, 0, _("\
+no output file produced because warning were issued")));
 
   /* This exit status is prescribed by POSIX.2 4.35.7.  */
   exit (error_message_count != 0);
@@ -485,13 +489,14 @@ add_to_readlist (int locale, const char *name, const char *repertoire_name,
     }
 
   if (generate && (runp->needed & (1 << locale)) != 0)
-    error (5, 0, _("circular dependencies between locale definitions"));
+    WITH_CUR_LOCALE (error (5, 0, _("\
+circular dependencies between locale definitions")));
 
   if (copy_locale != NULL)
     {
       if (runp->categories[locale].generic != NULL)
-	error (5, 0, _("cannot add already read locale `%s' a second time"),
-	       name);
+	WITH_CUR_LOCALE (error (5, 0, _("\
+cannot add already read locale `%s' a second time"), name));
       else
 	runp->categories[locale].generic =
 	  copy_locale->categories[locale].generic;
@@ -516,8 +521,8 @@ find_locale (int locale, const char *name, const char *repertoire_name,
 
   if ((result->avail & (1 << locale)) == 0
       && locfile_read (result, charmap) != 0)
-    error (4, errno, _("cannot open locale definition file `%s'"),
-	   result->name);
+    WITH_CUR_LOCALE (error (4, errno, _("\
+cannot open locale definition file `%s'"), result->name));
 
   return result;
 }
@@ -536,8 +541,8 @@ load_locale (int locale, const char *name, const char *repertoire_name,
 
   if ((result->avail & (1 << locale)) == 0
       && locfile_read (result, charmap) != 0)
-    error (4, errno, _("cannot open locale definition file `%s'"),
-	   result->name);
+    WITH_CUR_LOCALE (error (4, errno, _("\
+cannot open locale definition file `%s'"), result->name));
 
   return result;
 }