aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-06-30 20:28:41 +0000
committerWerner Koch <[email protected]>2015-06-30 20:28:41 +0000
commit232af382e563fcbe15589a3ccae7d6908a17c44d (patch)
treedae4d92d1224900f5a15643e192fc352326cfd2b /common/util.h
parentagent: Use different translation func for Pinentry strings. (diff)
downloadgnupg-232af382e563fcbe15589a3ccae7d6908a17c44d.tar.gz
gnupg-232af382e563fcbe15589a3ccae7d6908a17c44d.zip
Flag the L_() function with attribute format_arg.
* agent/agent.h (LunderscorePROTO): New. * common/util.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. * common/i18n.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. Use for i18n_localegettext. Expand LunderscorePROTO. * agent/genkey.c (check_passphrase_constraints): Use xtryasprintf again to keep the old translations. -- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index d5ddc1f13..b92d78c4d 100644
--- a/common/util.h
+++ b/common/util.h
@@ -153,6 +153,14 @@
/* GCC attributes. */
+#ifndef GNUPG_GCC_ATTR_FORMAT_ARG
+#if __GNUC__ >= 3 /* Actually 2.8 but testing the major is easier. */
+# define GNUPG_GCC_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a)))
+#else
+# define GNUPG_GCC_ATTR_FORMAT_ARG(a)
+#endif
+#endif
+
#if __GNUC__ >= 4
# define GNUPG_GCC_A_SENTINEL(a) __attribute__ ((sentinel(a)))
#else