From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26739 invoked by alias); 16 Dec 2014 09:04:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 26726 invoked by uid 89); 16 Dec 2014 09:04:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx4-phx2.redhat.com Received: from mx4-phx2.redhat.com (HELO mx4-phx2.redhat.com) (209.132.183.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 16 Dec 2014 09:04:10 +0000 Received: from zmail14.collab.prod.int.phx2.redhat.com (zmail14.collab.prod.int.phx2.redhat.com [10.5.83.16]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id sBG944tY024110; Tue, 16 Dec 2014 04:04:04 -0500 Date: Tue, 16 Dec 2014 09:04:00 -0000 From: Kai Tietz To: Eli Zaretskii Cc: Jan Kratochvil , brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org Message-ID: <999793426.28919122.1418720642324.JavaMail.zimbra@redhat.com> In-Reply-To: <83tx0ww9dl.fsf@gnu.org> References: <20141214182341.GA2908@host2.jankratochvil.net> <20141215182057.GA22226@host2.jankratochvil.net> <20141215183554.GB5457@adacore.com> <20141215184014.GA22610@host2.jankratochvil.net> <83y4q8wxk7.fsf@gnu.org> <20141215222801.GA28138@host2.jankratochvil.net> <20141215225551.GA28880@host2.jankratochvil.net> <83tx0ww9dl.fsf@gnu.org> Subject: Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/] MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-12/txt/msg00440.txt.bz2 ----- Urspr=C3=BCngliche Mail ----- > > Date: Mon, 15 Dec 2014 23:55:51 +0100 > > From: Jan Kratochvil > > Cc: brobecker@adacore.com, yao@codesourcery.com, > > gdb-patches@sourceware.org, > > ktietz@redhat.com > >=20 > > 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. > >=20 > > For example there is also > >=20 > > compile/compile.c: > > zap =3D concat ("rm -rf ", dir, (char *) NULL); > > system (zap); >=20 > Yuck! Do we really allow such atrocities in GDB? What if 'rm' is > some unrelated or even malicious script? >=20 > 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. >=20 Ouch, to use console is for sure a bad thing. To use POSIX-shell commands = is even worse. Why not using here instead an implementation using FTW-API?= At least mingw-w64 added this API recently to runtime for gcc's sake, so = implementation of an 'rm -rf' should be pretty easy. Kai