2009-03-21 Bean <bean123ch@gmail.com>

* util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
	instead of stat in mingw environment.

	* util/misc.c (grub_millisleep): Use Sleep in mingw environment.

	* aclocal.m4 (grub_CHECK_LINK_DIR): New function.

	* configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
	AC_CONFIG_LINKS.
This commit is contained in:
bean 2009-03-21 07:48:28 +00:00
parent 2156d5ba73
commit 1f4147aaf0
8 changed files with 92 additions and 6 deletions

View file

@ -43,6 +43,11 @@
# include <malloc.h>
#endif
#ifdef __MINGW32__
#include <windows.h>
#include <winioctl.h>
#endif
char *progname = 0;
int verbosity = 0;
@ -311,6 +316,16 @@ grub_get_time_ms (void)
return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
}
#ifdef __MINGW32__
void
grub_millisleep (grub_uint32_t ms)
{
Sleep (ms);
}
#else
void
grub_millisleep (grub_uint32_t ms)
{
@ -321,6 +336,8 @@ grub_millisleep (grub_uint32_t ms)
nanosleep (&ts, NULL);
}
#endif
void
grub_arch_sync_caches (void *address __attribute__ ((unused)),
grub_size_t len __attribute__ ((unused)))
@ -349,9 +366,6 @@ asprintf (char **buf, const char *fmt, ...)
#ifdef __MINGW32__
#include <windows.h>
#include <winioctl.h>
void sync (void)
{
}