bug-gnulib
[Top][All Lists]
Advanced

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

Re: realpath(path,NULL)


From: Jim Meyering
Subject: Re: realpath(path,NULL)
Date: Wed, 11 May 2011 19:35:51 +0200

Bruno Haible wrote:
> It was reported in <https://savannah.gnu.org/bugs/?33273> that the test 
> program
> of canonicalize.m4 leads to a crash and a dialog box while running 'configure'
> on MacOS X 10.4.
>
> Actually I reproduce it also on MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.4 with
> this small test program:
> ==============================================================
> #include <stdlib.h>
> int
> main ()
> {
>   char *name1 = realpath ("conftest.a", NULL);
>   char *name2 = realpath ("conftest.b/../conftest.a", NULL);
>   char *name3 = realpath ("conftest.a/", NULL);
>   return !(name1 && *name1 == '/' && !name2 && !name3);
> }
> ===============================================================
>
> Here is a proposed fix:
>
> 2011-05-11  Bruno Haible  <address@hidden>
>
>       canonicalize, canonicalize-lgpl: Avoid crash dialog on MacOS X.
>       * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add GL_NOCRASH code.
>       * modules/canonicalize (Depends-on): Add 'nocrash'.
>       * modules/canonicalize-lgpl (Depends-on): Likewise.
>       * doc/posix-functions/realpath.texi: Update platforms list.
>       Reported by Ryan Schmidt <address@hidden>.

Nice work.  Thanks!
I was pleasantly surprised to see how concise the change is.



reply via email to

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