From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 976 invoked by alias); 29 Mar 2011 14:28:34 -0000 Received: (qmail 959 invoked by uid 22791); 29 Mar 2011 14:28:33 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 14:28:29 +0000 Received: by qwa26 with SMTP id 26so191312qwa.0 for ; Tue, 29 Mar 2011 07:28:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.114.80 with SMTP id d16mr4591583qcq.18.1301408908264; Tue, 29 Mar 2011 07:28:28 -0700 (PDT) Received: by 10.229.97.206 with HTTP; Tue, 29 Mar 2011 07:28:28 -0700 (PDT) In-Reply-To: <201103291523.46954.pedro@codesourcery.com> References: <201103291523.46954.pedro@codesourcery.com> Date: Tue, 29 Mar 2011 15:41:00 -0000 Message-ID: Subject: Re: [RFC] Missing sleep function for mingw hosts From: Kai Tietz To: Pedro Alves Cc: gdb-patches@sourceware.org, Pierre Muller , Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg01174.txt.bz2 2011/3/29 Pedro Alves : > On Tuesday 29 March 2011 14:00:32, Pierre Muller wrote: >> =A0 Hi Eli, >> > > I found that there is a substitute for sleep in gnulib: >> > > >> > >> http://git.savannah.gnu.org/gitweb/?p=3Dgnulib.git;a=3Dblob;f=3Dlib/slee= p.c;hb=3Dd60 >> > > f3b0c6b0f93a601acd1cfd3923f94ca05abb0 >> > > >> > > =A0 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. =A0We don't import the whole thing. = =A0We > currently import the memmem module. =A0We 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 > Yes, this sounds to me like a good solution. The usleep function is available for mingw runtime, so this looks simpler to me, too. Regards, Kai