]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
libgettextpo: Don't rely on the undocumented variable libgettextpo_program_name.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Apr 2019 09:00:35 +0000 (11:00 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Apr 2019 09:00:35 +0000 (11:00 +0200)
* gnulib-local/lib/xerror.c: If IN_LIBGETTEXTPO is defined, include
getprogname.h instead of progname.h and define program_name as a macro.
* gnulib-local/lib/error-progname.c: Likewise.
* gettext-tools/src/po-xerror.c: Likewise.
* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Remove progname.
Pass --avoid=progname to gnulib-tool invocation for libgettextpo.

autogen.sh
gettext-tools/src/po-xerror.c
gnulib-local/lib/error-progname.c
gnulib-local/lib/xerror.c

index 2de683b71e4b506cd5c52af251a4ddb299e17837..1e0ed89783ac896c0ab9f0340698e29cf54b9699 100755 (executable)
@@ -297,7 +297,6 @@ if ! $skip_gnulib; then
     markup
     minmax
     open
-    progname
     relocatable-lib
     sigpipe
     stdbool
@@ -332,7 +331,7 @@ if ! $skip_gnulib; then
     realloc-posix
   '
   $GNULIB_TOOL --dir=gettext-tools --source-base=libgettextpo --m4-base=libgettextpo/gnulib-m4 --macro-prefix=gtpo --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local --local-symlink \
-    --import $GNULIB_MODULES_LIBGETTEXTPO $GNULIB_MODULES_LIBGETTEXTPO_OTHER || exit $?
+    --import --avoid=progname $GNULIB_MODULES_LIBGETTEXTPO $GNULIB_MODULES_LIBGETTEXTPO_OTHER || exit $?
   # Overwrite older versions of .m4 files with the up-to-date version.
   cp gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4
   cp gettext-runtime/m4/intl.m4 gettext-tools/gnulib-m4/intl.m4
index 63bf89c82fa99dea6e03d8934c5e85a8dfc804d9..d916d2a370265961632257849e9eb3a071625d5b 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handling during reading and writing of PO files.
-   Copyright (C) 2005-2007, 2013 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2013, 2019 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
    This program is free software: you can redistribute it and/or modify
 #include <stdlib.h>
 
 #include "message.h"
-#include "progname.h"
 #include "error-progname.h"
 #include "xalloc.h"
 #include "xerror.h"
 #include "error.h"
 #include "xvasprintf.h"
 #include "po-error.h"
+#if IN_LIBGETTEXTPO
+# include "getprogname.h"
+# define program_name getprogname ()
+#else
+# include "progname.h"
+#endif
 #include "gettext.h"
 
 #define _(str) gettext (str)
index 25e3cb205cc401dfeaab29808f0874237b3e3d8b..cc2fefef6242c0d5975a7428ec3c26a7e7891d27 100644 (file)
@@ -1,5 +1,5 @@
 /* Use of program name in error-reporting functions.
-   Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2006, 2019 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
 
 #include <stdio.h>
 
-#include "progname.h"
+#if IN_LIBGETTEXTPO
+# include "getprogname.h"
+# define program_name getprogname ()
+#else
+# include "progname.h"
+#endif
 
 
 /* Indicates whether errors and warnings get prefixed with program_name.
index 8e180de80bf878a75dc36479181ddbaf93ff7c6b..532cbc86299b80b2be2359758ff3301340c9f447 100644 (file)
@@ -1,5 +1,5 @@
 /* Multiline error-reporting functions.
-   Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2006, 2019 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
 #include <string.h>
 
 #include "error.h"
-#include "progname.h"
 #include "error-progname.h"
 #include "mbswidth.h"
+#if IN_LIBGETTEXTPO
+# include "getprogname.h"
+# define program_name getprogname ()
+#else
+# include "progname.h"
+#endif
 
 /* Emit a multiline warning to stderr, consisting of MESSAGE, with the
    first line prefixed with PREFIX and the remaining lines prefixed with