This reverts commit
c8494d88:
"build-sys: fix UL_SCANF_TYPE_MODIFIER for icc"
plus fix the check prog, because it found "%as" to be valid on
systems where "%a" is used for float conversion.
icc warns about "%ms" but it works anyways. Our AC_RUN_IFELSE prog
should do it right now regardless of compiler warnings.
Note "%ms" is POSIX.1-2008 standard but still not available on
many systems. Maybe it's time to remove "%as" fallback for old
glibc which is even less portable.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
int main()
{
int i;
+ int rc = 1;
char *s;
i = sscanf("x", $1, &s);
+ if (i == 1 && *s == 'x')
+ rc = 0;
free(s);
- if (i == 1)
- return 0;
- return 1;
+ return rc;
}])
-ul_save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-Werror ${CPPFLAGS}"
AC_CACHE_VAL([scanf_cv_alloc_modifier],
AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%ms"])])],
[scanf_cv_alloc_modifier=ms],
[scanf_cv_alloc_modifier=no])]
)
)
-CPPFLAGS="$ul_save_CPPFLAGS"
AC_MSG_CHECKING([scanf string alloc modifiers])
AS_CASE([$scanf_cv_alloc_modifier],