summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac10
1 files changed, 4 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 8d808b7a0..0bfe28cc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -539,16 +539,15 @@ AC_DEFUN([UL_SCANF_TYPE_MODIFIER], [dnl
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],
@@ -582,7 +581,6 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier],
[scanf_cv_alloc_modifier=no])]
)
)
-CPPFLAGS="$ul_save_CPPFLAGS"
AC_MSG_CHECKING([scanf string alloc modifiers])
AS_CASE([$scanf_cv_alloc_modifier],