summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRuediger Meier2016-03-13 03:19:26 +0100
committerRuediger Meier2016-03-13 21:47:57 +0100
commit544d4069216539b730a952ba47d6471b96cdd72b (patch)
tree03dda5087fc66d896e10140864b0f1fb07162905 /configure.ac
parenttests: don't use system's mount commands (diff)
downloadkernel-qcow2-util-linux-544d4069216539b730a952ba47d6471b96cdd72b.tar.gz
kernel-qcow2-util-linux-544d4069216539b730a952ba47d6471b96cdd72b.tar.xz
kernel-qcow2-util-linux-544d4069216539b730a952ba47d6471b96cdd72b.zip
build-sys: fix again UL_SCANF_TYPE_MODIFIER
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>
Diffstat (limited to 'configure.ac')
-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],