Re: [PATCH] config.mak.uname: Define FREAD_READS_DIRECTORIES for GNU/Hurd

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

 



On Wed, Apr 22, 2020 at 11:50 AM Jessica Clarke <jrtc27@xxxxxxxxxx> wrote:
>
> On 22 Apr 2020, at 19:48, Brandon Casey <drafnel@xxxxxxxxx> wrote:

> > introduced
> > this feature that would make fopen() fail when opening a directory for
> > use on the platforms where fread() of a directory did not fail,
> > instead of trying to wrap fread().
>
> Then the current autoconf test is wrong and likely causing confusion:
>
> > AC_RUN_IFELSE(
> >         [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
> >                 [[
> >                 FILE *f = fopen(".", "r");
> >                 return f != NULL;]])],
> >         [ac_cv_fread_reads_directories=no],
> >         [ac_cv_fread_reads_directories=yes])
> > ])

Yes, we should attempt to call fread() there. If either the fopen()
fails or the fread() fails, then that should mean that
FREAD_READS_DIRECTORIES is not necessary.

-Brandon



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux