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



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to