[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Mingw support for grub2
From: |
Bean |
Subject: |
[PATCH] Mingw support for grub2 |
Date: |
Sat, 23 Aug 2008 22:11:41 +0800 |
Hi,
This patch add support for mingw, now you can create native executable
for windows.
I still use cygwin to compile it:
./configure CC="gcc -mno-cygwin"
It might be possible to use pure mingw environment, but configure.ac
would need some modification.
2008-08-23 Bean <address@hidden>
* include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
#if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
* include/grub/util/misc.h: Add #include <grub/types.h>, add function
fseeko, ftello, sync, asprintf, grub_util_get_disk_size and sleep for
mingw.
* util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
to get size in mingw.
(open_device): Use flag O_BINARY.
(find_root_device): Add handling for mingw.
* util/hostfs.c: Add #include <grub/util/misc.h>
(grub_hostfs_open): Use "rb" flag to open file, use
grub_util_get_disk_size to get disk size.
* util/misc.c: Add #include <winioctl.h> and <stdarg.h> in mingw.
(fseeko): New function.
(ftello): Likewise.
(sync): Likewise.
(asprintf): Likewise.
(grub_util_get_disk_size): Likewise.
--
Bean
mingw.diff
Description: Text Data
- [PATCH] Mingw support for grub2,
Bean <=
Re: [PATCH] Mingw support for grub2, Bean, 2008/08/24