aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-03-08 20:53:08 +0000
committerWerner Koch <[email protected]>2010-03-08 20:53:08 +0000
commit2811c6e175abb2d881f75673b2d32bd1c968ea73 (patch)
tree027801349cbcf037a0a327112f56a48d16677c1b /src
parentAdd a mapping for ESPIPE on W32CE. (diff)
downloadlibgpg-error-2811c6e175abb2d881f75673b2d32bd1c968ea73.tar.gz
libgpg-error-2811c6e175abb2d881f75673b2d32bd1c968ea73.zip
Use format_arg attribute
Diffstat (limited to 'src')
-rw-r--r--src/w32-add.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/w32-add.h b/src/w32-add.h
index 9bbf6b9..54be911 100644
--- a/src/w32-add.h
+++ b/src/w32-add.h
@@ -1,5 +1,14 @@
## w32-add.h - Snippet to be be included into gpg-error.h.
-## (Comments are indicated by a double hash mark)
+## Comments are indicated by a double hash mark. Due to a
+## peculiarity of the script the first used line must not
+## start with a hash mark.
+
+/* Decide whether to use the format_arg attribute. */
+#if _GPG_ERR_GCC_VERSION > 20800
+# define _GPG_ERR_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a)))
+#else
+# define _GPG_ERR_ATTR_FORMAT_ARG(a)
+#endif
/* A lean gettext implementation based on GNU style mo files which are
required to be encoded in UTF-8. There is a limit on 65534 entries
@@ -7,10 +16,13 @@
const char *_gpg_w32_bindtextdomain (const char *domainname,
const char *dirname);
const char *_gpg_w32_textdomain (const char *domainname);
-const char *_gpg_w32_gettext (const char *msgid);
-const char *_gpg_w32_dgettext (const char *domainname, const char *msgid);
+const char *_gpg_w32_gettext (const char *msgid)
+ _GPG_ERR_ATTR_FORMAT_ARG (1);
+const char *_gpg_w32_dgettext (const char *domainname, const char *msgid)
+ _GPG_ERR_ATTR_FORMAT_ARG (2);
const char *_gpg_w32_dngettext (const char *domainname, const char *msgid1,
- const char *msgid2, unsigned long int n);
+ const char *msgid2, unsigned long int n)
+ _GPG_ERR_ATTR_FORMAT_ARG (2) _GPG_ERR_ATTR_FORMAT_ARG (3);
const char *_gpg_w32_gettext_localename (void);
int _gpg_w32_gettext_use_utf8 (int value);