]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
libgettextpo: Fix compilation error on FreeBSD (regression 2023-09-16).
authorBruno Haible <bruno@clisp.org>
Mon, 18 Sep 2023 19:28:25 +0000 (21:28 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 18 Sep 2023 19:28:25 +0000 (21:28 +0200)
* gettext-tools/libgettextpo/gettext-po.c (po_file_write, po_error_logger,
po_message_check_format): Use orig_error, orig_error_at_line instead of the
error, error_at_line symbols.

gettext-tools/libgettextpo/gettext-po.c

index 782c4a66ca7502f43d89ce307878ac72abb61372..6f0b001c32cd4610b4ae9aa0fd165579cbfa7580 100644 (file)
@@ -272,8 +272,8 @@ po_file_write (po_file_t file, const char *filename, po_error_handler_t handler)
   msgdomain_list_print (file->mdlp, filename, &output_format_po, true, false);
 
   /* Restore error handler.  */
-  po_error             = error;
-  po_error_at_line     = error_at_line;
+  po_error             = orig_error;
+  po_error_at_line     = orig_error_at_line;
   po_multiline_warning = multiline_warning;
   po_multiline_error   = multiline_error;
 
@@ -1337,7 +1337,7 @@ po_error_logger (const char *format, ...)
 
   va_start (args, format);
   if (vasprintf (&error_message, format, args) < 0)
-    error (EXIT_FAILURE, 0, _("memory exhausted"));
+    orig_error (EXIT_FAILURE, 0, _("memory exhausted"));
   va_end (args);
   po_error (0, 0, "%s", error_message);
   free (error_message);
@@ -1362,5 +1362,5 @@ po_message_check_format (po_message_t message, po_error_handler_t handler)
                              mp->is_format, mp->range, NULL, po_error_logger);
 
   /* Restore error handler.  */
-  po_error = error;
+  po_error = orig_error;
 }