From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21338 invoked by alias); 29 Mar 2011 14:23:57 -0000 Received: (qmail 21327 invoked by uid 22791); 29 Mar 2011 14:23:55 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 14:23:50 +0000 Received: (qmail 28282 invoked from network); 29 Mar 2011 14:23:49 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Mar 2011 14:23:49 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFC] Missing sleep function for mingw hosts Date: Tue, 29 Mar 2011 15:40:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.1; x86_64; ; ) Cc: "Pierre Muller" , "'Eli Zaretskii'" References: <004701cbede4$0ee18c20$2ca4a460$@muller@ics-cnrs.unistra.fr> <003001cbee11$49bb0880$dd311980$@muller@ics-cnrs.unistra.fr> In-Reply-To: <003001cbee11$49bb0880$dd311980$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103291523.46954.pedro@codesourcery.com> X-IsSubscribed: yes 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/msg01173.txt.bz2 On Tuesday 29 March 2011 14:00:32, Pierre Muller wrote: > Hi Eli, > > > I found that there is a substitute for sleep in gnulib: > > > > > > http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/sleep.c;hb=d60 > > > 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? > > > > 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. gnulib has a mechanism (which we are already using) where we just import the modules we need. We don't import the whole thing. We currently import the memmem module. We would just need to import the "sleep" module in addition (and whatever dependencies that may have --- which are handled automatically by gnulib's import script). I have no clue why that `sleep' is necessary, but in any case, can't we use already existing `gdb_usleep' function instead and be done with it? -- Pedro Alves