Re: [patch] compile: rm -rf -> ftw()+rmdir()+unlink() [Re: [patch] compile: Fix MinGW build]

Jan Kratochvil
2014-12-18T18:14:51Z

On Wed, 17 Dec 2014 23:41:53 +0100, Pedro Alves wrote:
> See https://www.gnu.org/software/gnulib/manual/html_node/ftw.html:
>
> "This function is missing on some platforms: Mac OS X 10.3, FreeBSD 5.2.1,
> NetBSD 3.0, Minix 3.1.8, mingw, MSVC 9, BeOS. "

This list does not say much and it is even obsolete, at least "mingw" supports
ftw(); although Eli disagrees in:
https://sourceware.org/ml/gdb-patches/2014-12/msg00540.html

On MacOS X GDB does not work anyway, FreeBSD latest stable release is 10.1 so
5.2.1 seems irrelevant, NetBSD 6.1.5 vs. 3.0 likewise, for other OS I have no
idea if they are supported by GDB and nobody knows - configure.{host,tgt}
triplets naming are too cryptic to quickly check it by someone not familiar
with that platform and there is no official list of supported platforms
I asked for recently at least in:

Message-ID: <20140817211647.GA17152@host2.jankratochvil.net>
On Sun, 17 Aug 2014 23:16:47 +0200, Jan Kratochvil wrote:
# This is one of the general problems of GDB that one cannot do any change
# affecting platforms which one cannot (or at least not easily enough) test on.
#
# Platform not automatically being tested by Jenkins for any patch submitted to
# Gerrit should be officially unsupported.

> So it seems to me that we should use the fts API instead of ftw. And then
> we'll either need to import the gnulib module, or start out with an
> autoconf check.

As global maintainer Eli asked for ftw()->fts() (despite I do not see there
valid technical argument in that mail myself) going to implement it; otherwise
I would not see from the platform list at
https://www.gnu.org/software/gnulib/manual/html_node/ftw.html
if ftw() is really supported on all GDB hosts or not.

Jan