#define _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \
_INTL_ATTRIBUTE_FORMAT ((_INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument))
+/* _INTL_ARG_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,...
+ must not be NULL. */
+/* Applies to: functions. */
+#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__
+# define _INTL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+#else
+# define _INTL_ARG_NONNULL(params)
+#endif
+
+
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
# undef fprintf
# define fprintf libintl_fprintf
extern int fprintf (FILE *, const char *, ...)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_fprintf; }
# endif
# undef vfprintf
# define vfprintf libintl_vfprintf
extern int vfprintf (FILE *, const char *, va_list)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vfprintf; }
# endif
# endif
# define printf libintl_printf
extern int printf (const char *, ...)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2)
+ _INTL_ARG_NONNULL ((1));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_printf; }
# endif
# undef vprintf
# define vprintf libintl_vprintf
extern int vprintf (const char *, va_list)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0)
+ _INTL_ARG_NONNULL ((1));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vprintf; }
# endif
# undef sprintf
# define sprintf libintl_sprintf
extern int sprintf (char *, const char *, ...)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_sprintf; }
# endif
# undef vsprintf
# define vsprintf libintl_vsprintf
extern int vsprintf (char *, const char *, va_list)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vsprintf; }
# endif
# undef snprintf
# define snprintf libintl_snprintf
extern int snprintf (char *, size_t, const char *, ...)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4)
+ _INTL_ARG_NONNULL ((3));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_snprintf; }
# endif
# undef vsnprintf
# define vsnprintf libintl_vsnprintf
extern int vsnprintf (char *, size_t, const char *, va_list)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0)
+ _INTL_ARG_NONNULL ((3));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vsnprintf; }
# endif
# undef asprintf
# define asprintf libintl_asprintf
extern int asprintf (char **, const char *, ...)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_asprintf; }
# endif
# undef vasprintf
# define vasprintf libintl_vasprintf
extern int vasprintf (char **, const char *, va_list)
- _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0);
+ _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vasprintf; }
# endif
# undef fwprintf
# define fwprintf libintl_fwprintf
-extern int fwprintf (FILE *, const wchar_t *, ...);
+extern int fwprintf (FILE *, const wchar_t *, ...)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_fwprintf; }
# endif
# undef vfwprintf
# define vfwprintf libintl_vfwprintf
-extern int vfwprintf (FILE *, const wchar_t *, va_list);
+extern int vfwprintf (FILE *, const wchar_t *, va_list)
+ _INTL_ARG_NONNULL ((1, 2));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vfwprintf; }
# endif
# undef wprintf
# define wprintf libintl_wprintf
-extern int wprintf (const wchar_t *, ...);
+extern int wprintf (const wchar_t *, ...)
+ _INTL_ARG_NONNULL ((1));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_wprintf; }
# endif
# undef vwprintf
# define vwprintf libintl_vwprintf
-extern int vwprintf (const wchar_t *, va_list);
+extern int vwprintf (const wchar_t *, va_list)
+ _INTL_ARG_NONNULL ((1));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vwprintf; }
# endif
# undef swprintf
# define swprintf libintl_swprintf
-extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...)
+ _INTL_ARG_NONNULL ((1, 3));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_swprintf; }
# endif
# undef vswprintf
# define vswprintf libintl_vswprintf
-extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list)
+ _INTL_ARG_NONNULL ((1, 3));
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
namespace std { using ::libintl_vswprintf; }
# endif