Use Winapi on both cygwin and mingw32 to share more code between both.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-09-23 11:21:09 +02:00
parent d68d01573b
commit 7e518ca84f
30 changed files with 1984 additions and 1670 deletions

View file

@ -132,7 +132,13 @@ grub_hostfs_open (struct grub_file *file, const char *name)
file->data = data;
#if defined (__CYGWIN__) || defined (__MINGW32__)
fseek (f, 0, SEEK_END);
file->size = ftello (f);
fseek (f, 0, SEEK_SET);
#else
file->size = grub_util_get_fd_size (fileno (f), name, NULL);
#endif
return GRUB_ERR_NONE;
}