changeset 29106:097ee0559043

Notify xgettext about functions that have a format string argument.
author Bruno Haible <bruno@clisp.org>
date Sun, 28 Oct 2007 21:39:15 +0100
parents e4952f2c089d
children 7826261dc074
files ChangeLog modules/error modules/vasprintf modules/verror modules/xprintf modules/xvasprintf
diffstat 6 files changed, 50 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Oct 27 22:12:07 2007 -0700
+++ b/ChangeLog	Sun Oct 28 21:39:15 2007 +0100
@@ -1,3 +1,12 @@
+2007-10-28  Bruno Haible  <bruno@clisp.org>
+
+	* modules/error: Add a notice recommending to change XGETTEXT_OPTIONS.
+	Invoke AM_GETTEXT_OPTION if it exists.
+	* modules/vasprintf: Likewise.
+	* modules/verror: Likewise.
+	* modules/xprintf: Likewise.
+	* modules/xvasprintf: Likewise.
+
 2007-10-27  Ben Pfaff  <blp@gnu.org>
 
 	* lib/math.in.h: Define isfinite macro and prototypes for
--- a/modules/error	Sat Oct 27 22:12:07 2007 -0700
+++ b/modules/error	Sun Oct 28 21:39:15 2007 +0100
@@ -1,6 +1,11 @@
 Description:
 error() and error_at_line() functions: Error reporting.
 
+Notice:
+If you are using GNU gettext version 0.16.1 or older, add the following options
+to XGETTEXT_OPTIONS in your po/Makevars:
+  --flag=error:3:c-format --flag=error_at_line:5:c-format
+
 Files:
 lib/error.h
 lib/error.c
@@ -11,6 +16,9 @@
 
 configure.ac:
 gl_ERROR
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
+   AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
 
 Makefile.am:
 
--- a/modules/vasprintf	Sat Oct 27 22:12:07 2007 -0700
+++ b/modules/vasprintf	Sun Oct 28 21:39:15 2007 +0100
@@ -1,6 +1,11 @@
 Description:
 vsprintf with automatic memory allocation.
 
+Notice:
+If you are using GNU gettext version 0.16.1 or older, add the following options
+to XGETTEXT_OPTIONS in your po/Makevars:
+  --flag=asprintf:2:c-format --flag=vasprintf:2:c-format
+
 Files:
 lib/vasprintf.c
 lib/asprintf.c
@@ -14,6 +19,9 @@
 configure.ac:
 gl_FUNC_VASPRINTF
 gl_STDIO_MODULE_INDICATOR([vasprintf])
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+   AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
 
 Makefile.am:
 
--- a/modules/verror	Sat Oct 27 22:12:07 2007 -0700
+++ b/modules/verror	Sun Oct 28 21:39:15 2007 +0100
@@ -1,6 +1,11 @@
 Description:
 verror() and verror_at_line() functions: Error reporting with va_list.
 
+Notice:
+If you are using GNU gettext version 0.16.1 or older, add the following options
+to XGETTEXT_OPTIONS in your po/Makevars:
+  --flag=verror:3:c-format --flag=verror_at_line:5:c-format
+
 Files:
 lib/verror.h
 lib/verror.c
@@ -10,6 +15,9 @@
 xvasprintf
 
 configure.ac:
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_XGETTEXT_OPTION([--flag=verror:3:c-format])
+   AM_XGETTEXT_OPTION([--flag=verror_at_line:5:c-format])])
 
 Makefile.am:
 lib_SOURCES += verror.h verror.c
--- a/modules/xprintf	Sat Oct 27 22:12:07 2007 -0700
+++ b/modules/xprintf	Sun Oct 28 21:39:15 2007 +0100
@@ -1,6 +1,12 @@
 Description:
 a wrapper around printf that calls error upon ENOMEM or EILSEQ errors
 
+Notice:
+If you are using GNU gettext version 0.16.1 or older, add the following options
+to XGETTEXT_OPTIONS in your po/Makevars:
+  --flag=xprintf:1:c-format --flag=xvprintf:1:c-format
+  --flag=xfprintf:2:c-format --flag=xvfprintf:2:c-format
+
 Files:
 lib/xprintf.h
 lib/xprintf.c
@@ -13,6 +19,11 @@
 stdio
 
 configure.ac:
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_XGETTEXT_OPTION([--flag=xprintf:1:c-format])
+   AM_XGETTEXT_OPTION([--flag=xvprintf:1:c-format])
+   AM_XGETTEXT_OPTION([--flag=xfprintf:2:c-format])
+   AM_XGETTEXT_OPTION([--flag=xvfprintf:2:c-format])])
 
 Makefile.am:
 lib_SOURCES += xprintf.h xprintf.c
--- a/modules/xvasprintf	Sat Oct 27 22:12:07 2007 -0700
+++ b/modules/xvasprintf	Sun Oct 28 21:39:15 2007 +0100
@@ -1,6 +1,10 @@
 Description:
 vasprintf and asprintf with out-of-memory checking.  Also see xalloc-die.
 
+Notice:
+If you are using GNU gettext version 0.16.1 or older, add the following options
+to XGETTEXT_OPTIONS in your po/Makevars: --flag=xasprintf:1:c-format
+
 Files:
 lib/xvasprintf.h
 lib/xvasprintf.c
@@ -16,6 +20,8 @@
 
 configure.ac:
 gl_XVASPRINTF
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_XGETTEXT_OPTION([--flag=xasprintf:1:c-format])])
 
 Makefile.am:
 lib_SOURCES += xvasprintf.h xvasprintf.c xasprintf.c