bug-gnulib
[Top][All Lists]
Advanced

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

Re: link-follow and mingw


From: Jim Meyering
Subject: Re: link-follow and mingw
Date: Tue, 22 Sep 2009 15:08:41 +0200

Eric Blake wrote:
> According to Eric Blake on 9/4/2009 11:58 AM:
>> Unfortunately, I don't have linkat working yet
>
> Still true, but here's another piece of the puzzle.
>
> fcntl_h.m4 created a symlink conftest.sym, but never cleaned it up; as a
> result, an ill-timed link-follow.m4 failed to create a symlink by the same
> name and was aborting, and assuming incorrectly that Linux link() follows
> symlinks.

Thanks for the investigation!

> +2009-09-22  Eric Blake  <address@hidden>
> +
> +     link-follow: ensure correct result
> +     * m4/fcntl_h.m4 (gl_FCNTL_H): Clean up temporary file.
> +     * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Distinguish
> +     between possible failures.
> +
>  2009-09-21  Eric Blake  <address@hidden>
>
>       open, openat: minor optimization
> diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
> index 5eed088..118a4fa 100644
> --- a/m4/fcntl_h.m4
> +++ b/m4/fcntl_h.m4
> @@ -1,4 +1,4 @@
> -# serial 4
> +# serial 5
>  # Configure fcntl.h.
>  dnl Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
>  dnl This file is free software; the Free Software Foundation
> @@ -38,6 +38,7 @@ AC_DEFUN([gl_FCNTL_H],
>             if (symlink (".", sym) != 0
>                 || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
>               status |= 32;
> +           unlink (sym);

At first I wondered why it would be necessary to unlink sym, a file
named "conftest.sym" here, when right after this test, the usual
rm -fr conftest* would remove it for us?  Then I looked, and see
that what I recalled is no longer the case.  While in some places,
autoconf-generated configure files do indeed run

    rm -f conftest*

it's not run after this sort of test.
Here, this is what's (now?) run:

    rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
      conftest.$ac_objext conftest.beam conftest.$ac_ext

and that doesn't remove the carefully-named temporary file.

Has autoconf changed this over the years?
Or is this accidental fall-out from some other change?

I don't have time to investigate right now,
but will eventually audit for other assumptions like this.




reply via email to

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