From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3864 invoked by alias); 29 Mar 2011 13:10:57 -0000 Received: (qmail 3706 invoked by uid 22791); 29 Mar 2011 13:10:55 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 13:10:50 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [130.79.200.186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p2TDAaCK065932 ; Tue, 29 Mar 2011 15:10:36 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [130.79.204.10]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2TD0Yb6005794 ; Tue, 29 Mar 2011 15:00:34 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2TD0XMd055040 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Tue, 29 Mar 2011 15:00:34 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <004701cbede4$0ee18c20$2ca4a460$@muller@ics-cnrs.unistra.fr> In-Reply-To: Subject: RE: [RFC] Missing sleep function for mingw hosts Date: Tue, 29 Mar 2011 14:23:00 -0000 Message-ID: <003001cbee11$49bb0880$dd311980$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2011-03/txt/msg01171.txt.bz2 Hi Eli, thanks for your comments. > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: mardi 29 mars 2011 14:37 > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFC] Missing sleep function for mingw hosts >=20 > > From: "Pierre Muller" > > Date: Tue, 29 Mar 2011 09:36:46 +0200 > > > > mingw does not have a sleep function in its library. > > This prevents currently successful compilation of > > mingw64 with --enable-targets=3Dall option. >=20 > You say "mingw64" -- does that mean it does compile with mingw32? If > so, how come it fails with the 64-bit build? No, it's just the configuration that I used, but this failure also appears for mingw32. ../../../archer/gdb/remote-mips.c: In function `mips_enter_debug': ../../../archer/gdb/remote-mips.c:1353: warning: implicit declaration of functio n `sleep' make: *** [remote-mips.o] Error 1=20 > > I found that there is a substitute for sleep in gnulib: > > > http://git.savannah.gnu.org/gitweb/?p=3Dgnulib.git;a=3Dblob;f=3Dlib/sleep.c= ;hb=3Dd60 > > f3b0c6b0f93a601acd1cfd3923f94ca05abb0 > > > > What is the rule to add new parts into gnulib subdirectory? > > Would inclusion of gnulib sleep.c source code > > be possible to fix the above problem? >=20 > I'd rather we had a replacement in win32-nat.c, instead of importing > gobs of gnulib stuff needed to provide such a trivial replacement. > gnulib is GPL, so we can simply copy the code into our sources. This is not really the right place: the problem triggers due to some other target, (remote-mips.c line 1353) so the code should be also available if only that target is selected (i.e. without windows-nat.c ). The best place in my opinion would be mingw-hdep.c, the only thing is that this would mean adding a mingw-hdep.h header and inserting that header into remote-mips.c source... The big difference with using gnulib code is that the same failure would not appear again the next time someone adds a call to sleep somewhere else inside the GDB sources. Pierre