[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] patch to compile grub2 in msys/mingw environment
From: |
Robert Millan |
Subject: |
Re: [PATCH] patch to compile grub2 in msys/mingw environment |
Date: |
Wed, 18 Mar 2009 11:15:42 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Mar 17, 2009 at 01:54:22PM +0800, Bean wrote:
> >
> > It seems you defined the mingw32 version of grub_millisleep unconditionally.
>
> 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 implemented
twice:
> +#ifndef __MINGW32__
> void
> grub_millisleep (grub_uint32_t ms)
> {
> @@ -320,6 +321,7 @@ grub_millisleep (grub_uint32_t ms)
> ts.tv_nsec = (ms % 1000) * 1000000;
> nanosleep (&ts, NULL);
> }
> +#endif
>
> void
> grub_arch_sync_caches (void *address __attribute__ ((unused)),
> @@ -361,6 +363,12 @@ void sleep (int s)
> Sleep (s * 1000);
> }
>
> +void
> +grub_millisleep (grub_uint32_t ms)
> +{
> + Sleep (ms);
> +}
> +
why not put them together anyway? Like #ifdef __MINGW32__ ... #else ... #endif
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."