On Wed, Mar 18, 2009 at 6:15 PM, Robert Millan <r...@aybabtu.com> wrote: > 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
Hi, The header file <windows.h> is included after grub_millisleep, so Sleep is not defined yet, perhaps it'd be better to move #include <windows.h> to the beginning of file. -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel