Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LdWAJ-0007Xq-W6 for mharc-grub-devel@gnu.org; Sat, 28 Feb 2009 15:52:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdWAI-0007Wi-JE for grub-devel@gnu.org; Sat, 28 Feb 2009 15:52:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdWAE-0007UA-VQ for grub-devel@gnu.org; Sat, 28 Feb 2009 15:52:05 -0500 Received: from [199.232.76.173] (port=50758 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdWAE-0007Ti-Ht for grub-devel@gnu.org; Sat, 28 Feb 2009 15:52:02 -0500 Received: from mailout09.t-online.de ([194.25.134.84]:52319) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LdWAE-0006yZ-5Q for grub-devel@gnu.org; Sat, 28 Feb 2009 15:52:02 -0500 Received: from fwd09.aul.t-online.de by mailout09.sul.t-online.de with smtp id 1LdWAC-0004PZ-00; Sat, 28 Feb 2009 21:52:00 +0100 Received: from [10.3.2.2] (SsSw9aZYwhDy99AQeUFwHNGtnLhAkKfFRBLnGzNFBFUnCP69E0c+3NriGlpYuoKwTS@[217.235.210.202]) by fwd09.aul.t-online.de with esmtp id 1LdWA0-1La2eu0; Sat, 28 Feb 2009 21:51:48 +0100 Message-ID: <49A9A3E5.8050804@t-online.de> Date: Sat, 28 Feb 2009 21:51:49 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: <1234723778.4746.7.camel@fz.local> <20090221232530.GA3980@thorin> In-Reply-To: <20090221232530.GA3980@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: SsSw9aZYwhDy99AQeUFwHNGtnLhAkKfFRBLnGzNFBFUnCP69E0c+3NriGlpYuoKwTS X-TOI-MSGID: d9642511-a2f1-47ef-8e69-cdd913324eee X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] implement grub_millisleep in util/misc.c for grub-emu 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: Sat, 28 Feb 2009 20:52:06 -0000 Robert Millan wrote: > On Sun, Feb 15, 2009 at 07:49:38PM +0100, Felix Zielcke wrote: > >> --- util/misc.c (revision 1996) >> +++ util/misc.c (working copy) >> @@ -27,6 +27,9 @@ >> #include >> #include >> >> +#define _POSIX_C_SOURCE 199309L >> +#include >> > > I'm not sure this is garanteed to work unless it's defined before any > header is included. Did it compile without warnings? > > At least with glibc headers, the #define from the patch has no effect, because at least unistd.h has already included features.h which handles these settings. There is no warning, because none of the headers define _POSIX_C_SOURCE. From features.h: /* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2 (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */ #if (...!defined (_POSIX_C_SOURCE)...) # define _POSIX_SOURCE 1 # if defined _XOPEN_SOURCE ... # ... # else # define _POSIX_C_SOURCE 200112L # endif #endif I would suggest to remove the #define and commit the patch. BTW: compiles fine on Cygwin, with or without the #define. -- Christian Franke