From: Michal Rokos <michal.rokos@nextsoft.cz>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: GIT <git@vger.kernel.org>
Subject: Re: [PATCH v3] autoconf: Test FREAD_READS_DIRECTORIES
Date: Tue, 4 Mar 2008 16:30:07 +0100 [thread overview]
Message-ID: <200803041630.07585.michal.rokos@nextsoft.cz> (raw)
In-Reply-To: <alpine.LSU.1.00.0803041458220.22527@racer.site>
Hello,
On Tuesday 04 March 2008 15:59:02 Johannes Schindelin wrote:
> On Tue, 4 Mar 2008, Michal Rokos wrote:
> > +AC_RUN_IFELSE(
> > + [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
> > + [[char c;
> > + FILE *f = fopen(".", "r");
> > + if (! f) return 0;
> > + if (f && fread(&c, 1, 1, f) > 0) return 1]])],
> > + [ac_cv_fread_reads_directories=no],
> > + [ac_cv_fread_reads_directories=yes])
>
> I do not see the issue addressed that I saw on msysGit.
ahh, sorry I've included some old one. Now it's
+AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ [[char c;
+ FILE *f = fopen(".", "r");
+ return f && fread(&c, 1, 1, f)]])],
+ [ac_cv_fread_reads_directories=no],
+ [ac_cv_fread_reads_directories=yes])
I've tried to reproduce, but I failed to do so. When I put "return 0;" it
detect that "no"; when I return something else, "yes" is detected - as it
should.
The C snippet in configure script looks like:
$ac_includes_default
int
main ()
{
char c;
FILE *f = fopen(".", "r");
return f && fread(&c, 1, 1, f)
;
return 0;
}
Does your autoconf create the same thing?
Michal
next prev parent reply other threads:[~2008-03-04 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 14:14 [PATCH v3] autoconf: Test FREAD_READS_DIRECTORIES Michal Rokos
2008-03-04 14:59 ` Johannes Schindelin
2008-03-04 15:30 ` Michal Rokos [this message]
2008-03-04 16:01 ` Johannes Schindelin
2008-03-04 15:32 ` Mike Ralphson
2008-03-04 16:22 ` Fwd: " Mike Ralphson
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=200803041630.07585.michal.rokos@nextsoft.cz \
--to=michal.rokos@nextsoft.cz \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).