Use register_printf_specifier instead of deprecated register_printf_function, if available

This commit is contained in:
Martin Willi
2009-11-12 13:16:46 +01:00
parent 0850e33518
commit f6bbcec390
3 changed files with 29 additions and 11 deletions
+12 -6
View File
@@ -373,12 +373,18 @@ AC_TRY_RUN(
[AC_MSG_RESULT([no])])
AC_CHECK_FUNC(
[register_printf_function],
[AC_DEFINE(HAVE_PRINTF_HOOKS)],
[
AC_MSG_NOTICE([printf does not support custom format specifiers!])
vstr=true
]
[register_printf_specifier],
dnl new specifier functions with argument length
[AC_DEFINE(HAVE_PRINTF_SPECIFIER)],
[AC_CHECK_FUNC(
dnl deprecated function without argument length
[register_printf_function],
[AC_DEFINE(HAVE_PRINTF_FUNCTION)],
[
AC_MSG_NOTICE([printf does not support custom format specifiers!])
vstr=true
]
)]
)
if test x$vstr = xtrue; then