Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]

Eli Zaretskii
2014-12-16T03:40:06Z

> Date: Mon, 15 Dec 2014 23:55:51 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org,
> ktietz@redhat.com
>
> On Mon, 15 Dec 2014 23:28:01 +0100, Jan Kratochvil wrote:
> > The 'compile' project needs a larger port effort to run on MS-Windows.
>
> For example there is also
>
> compile/compile.c:
> zap = concat ("rm -rf ", dir, (char *) NULL);
> system (zap);

Yuck! Do we really allow such atrocities in GDB? What if 'rm' is
some unrelated or even malicious script?

I think this should be replaced by suitable C function calls. IMO,
this kind of programming is OK for prototyping, but not for the final
code.