Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ljw3k-0002lq-7I for mharc-grub-devel@gnu.org; Wed, 18 Mar 2009 09:43:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ljw3i-0002lC-BT for grub-devel@gnu.org; Wed, 18 Mar 2009 09:43:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ljw3e-0002kc-Vd for grub-devel@gnu.org; Wed, 18 Mar 2009 09:43:50 -0400 Received: from [199.232.76.173] (port=37637 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljw3e-0002kZ-Pm for grub-devel@gnu.org; Wed, 18 Mar 2009 09:43:46 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:9348) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ljw3e-0005l9-4e for grub-devel@gnu.org; Wed, 18 Mar 2009 09:43:46 -0400 Received: by ti-out-0910.google.com with SMTP id y8so34966tia.10 for ; Wed, 18 Mar 2009 06:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kRauY9yS9+mOaNsuja6B+YrjhZTFNSircgccuRUDv68=; b=IFDm9yjSlj2KXy512J3CHN3dICOeA33UhAaDiBeHQuriYDxnxshIsY5rJYgNP1y+2s z5L6TefcydFFGMoAYAL34MaqJHh2I8JxyeDicQ8kuPd+3cQ/rDjyyde+aTaJUbpUkuTb RFKhiEeA4mUA/CRVXa5PYx9b+cQHjRFWLZHCs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DCDp3gcrNVPJlqURzHINaV1xXBqOHQjUQLJNI4rrTSMEL023Dv6sxRbZ2dKwUvqSc3 H+E72iRJ1lEfCcG6n1vipByczlF7gVrTOvu2yE5/am7nlCd2pnDhO9Vsa0iWcVG1REyf WxpsKe2m6cZng8mbAH6GXIAfcXKKWigIA8zCI= MIME-Version: 1.0 Received: by 10.110.16.15 with SMTP id 15mr616321tip.53.1237383813940; Wed, 18 Mar 2009 06:43:33 -0700 (PDT) In-Reply-To: <20090318101542.GC20072@thorin> References: <20090315154002.GC24554@thorin> <20090318101542.GC20072@thorin> Date: Wed, 18 Mar 2009 21:43:33 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] patch to compile grub2 in msys/mingw environment X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 13:43:50 -0000 On Wed, Mar 18, 2009 at 6:15 PM, Robert Millan wrote: > On Tue, Mar 17, 2009 at 01:54:22PM +0800, Bean wrote: >> > >> > It seems you defined the mingw32 version of grub_millisleep unconditio= nally. >> >> Hi, >> >> Are you suggesting adding some test in configure.ac ? Although >> grub_millisleep for mingw32 uses Windows API Sleep, I guess it's safe >> to assume it's present. > > I just meant that when __MINGW32__ is not defined, the function is implem= ented > twice: > >> +#ifndef __MINGW32__ >> =A0void >> =A0grub_millisleep (grub_uint32_t ms) >> =A0{ >> @@ -320,6 +321,7 @@ grub_millisleep (grub_uint32_t ms) >> =A0 =A0ts.tv_nsec =3D (ms % 1000) * 1000000; >> =A0 =A0nanosleep (&ts, NULL); >> =A0} >> +#endif >> >> =A0void >> =A0grub_arch_sync_caches (void *address __attribute__ ((unused)), >> @@ -361,6 +363,12 @@ void sleep (int s) >> =A0 =A0Sleep (s * 1000); >> =A0} >> >> +void >> +grub_millisleep (grub_uint32_t ms) >> +{ >> + =A0Sleep (ms); >> +} >> + > > why not put them together anyway? =A0Like #ifdef __MINGW32__ ... #else ..= . #endif Hi, The header file is included after grub_millisleep, so Sleep is not defined yet, perhaps it'd be better to move #include to the beginning of file. --=20 Bean