From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] implement grub_millisleep in util/misc.c for grub-emu
Date: Sat, 28 Feb 2009 21:51:49 +0100 [thread overview]
Message-ID: <49A9A3E5.8050804@t-online.de> (raw)
In-Reply-To: <20090221232530.GA3980@thorin>
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 <sys/time.h>
>> #include <unistd.h>
>>
>> +#define _POSIX_C_SOURCE 199309L
>> +#include <time.h>
>>
>
> 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
next prev parent reply other threads:[~2009-02-28 20:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 18:49 [PATCH] implement grub_millisleep in util/misc.c for grub-emu Felix Zielcke
2009-02-21 23:25 ` Robert Millan
2009-02-28 20:51 ` Christian Franke [this message]
2009-02-28 20:56 ` Christian Franke
2009-03-04 10:26 ` Felix Zielcke
-- strict thread matches above, loose matches on Subject: below --
2009-02-22 1:29 Kalamatee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49A9A3E5.8050804@t-online.de \
--to=christian.franke@t-online.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.