All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Bertrand Jacquin <beber@meleeweb.net>
Cc: kerolasa@gmail.com, util-linux <util-linux@vger.kernel.org>
Subject: Re: [pull] require C99, add robustness and small fixes
Date: Tue, 12 Jun 2012 10:36:43 +0200	[thread overview]
Message-ID: <20120612083643.GA23991@x2.net.home> (raw)
In-Reply-To: <20120611222938.GD25482@lemonhead.scabb>

On Tue, Jun 12, 2012 at 12:29:38AM +0200, Bertrand Jacquin wrote:
> # We might be on RHEL5 with a git checkout and so broken
> > > +  # autoconf. Check if CC is gcc and if it bails when given -std=gnu99.
> > > +  # If not, use that.  Yuck.
> > > +    if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
> > > +       CC="$CC -std=gnu99"
> > > +       AC_RUN_IFELSE(
> > > +          [AC_LANG_PROGRAM([],[[
> > > +  return 0;
> > > +      ]])],
> > > +      [],
> > > +      [AC_MSG_ERROR([Could not find a C99 compatible compiler])])
> > > +    else
> > > +      AC_MSG_ERROR([Could not find a C99 compatible compiler])
> > > +    fi
> > > +  fi
> > > +fi
> > 
> >  AC_PROG_CC_C99 sounds really like a better solution, although I have
> >  autoconf 2.68 on Fedora 16 :-(
> 
> This is also present in autoconf-2.68 (lib/autoconf/c.m4:1360)

 It seems that AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60.

 Anyway -- according to gnulib autoconf stuff -- there is an issue
 when AC_PROG_CC_C99 used together with AC_PROG_CC_STDC. For more
 details see gl_PROG_CC_C99 macro in coreutils or gnulib.

 I think we can exist without AC_PROG_CC_C99 for now, it seems better
 to explicitly enable some gcc warnings by UL_ADD_WARN() than add
 special workaround for AC_PROG_CC_C99, etc.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2012-06-12  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 21:11 [pull] require C99, add robustness and small fixes Sami Kerola
2012-06-10 21:46 ` Bertrand Jacquin
2012-06-11  9:48 ` Karel Zak
2012-06-11 20:19   ` Sami Kerola
2012-06-15 10:46     ` Karel Zak
2012-06-15 11:19       ` Karel Zak
2012-06-11 22:29   ` Bertrand Jacquin
2012-06-12  8:36     ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120612083643.GA23991@x2.net.home \
    --to=kzak@redhat.com \
    --cc=beber@meleeweb.net \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.