bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22087: Problem with stdbuf configure test for 8.24 on Solaris with S


From: Bob Proulx
Subject: bug#22087: Problem with stdbuf configure test for 8.24 on Solaris with Studio C compiler.
Date: Thu, 3 Dec 2015 14:02:30 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

Paul Eggert wrote:
> How about the attached (untested) patch instead? It should fix the
> underlying problem, and thus avoid the need for fiddling with compiler
> flags.

> diff --git a/configure.ac b/configure.ac
> index 66c8cbe..3f546e9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -475,7 +475,8 @@ AC_LINK_IFELSE(
>      {
>        stdbuf = 1;
>      }]],[[
> -    return !(stdbuf == 1);]])
> +    if (stdbuf != 1)
> +      return 1;]])
>    ],
>    [stdbuf_supported=yes])
>  AC_MSG_RESULT([$stdbuf_supported])

Fallthrough return 0?  Or is a return 0 already defaulted?  It stood
out to me that the previous return was unconditional and without an
else or a fallthrough this is a change from the previous control flow.

  -    return !(stdbuf == 1);]])
  +    if (stdbuf != 1)
  +      return 1;
  +    return 0;]])

??

Bob





reply via email to

[Prev in Thread] Current Thread [Next in Thread]