From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KXEtz-00011m-GE for mharc-grub-devel@gnu.org; Sun, 24 Aug 2008 08:41:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXEtx-00010f-Bv for grub-devel@gnu.org; Sun, 24 Aug 2008 08:41:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXEtu-0000y2-N8 for grub-devel@gnu.org; Sun, 24 Aug 2008 08:41:00 -0400 Received: from [199.232.76.173] (port=54375 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXEtu-0000xt-Gu for grub-devel@gnu.org; Sun, 24 Aug 2008 08:40:58 -0400 Received: from mailout07.t-online.de ([194.25.134.83]:35638) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXEtu-0002nS-3j for grub-devel@gnu.org; Sun, 24 Aug 2008 08:40:58 -0400 Received: from fwd32.aul.t-online.de by mailout07.sul.t-online.de with smtp id 1KXEtr-00019Z-02; Sun, 24 Aug 2008 14:40:55 +0200 Received: from [10.3.2.2] (SP9Dd0ZLQhfR38Egm+Cu27yetSipKaclNYKWShqTundU+nrjcodboZrvzP2jr8dgCC@[217.235.209.215]) by fwd32.aul.t-online.de with esmtp id 1KXEtp-1LOlea0; Sun, 24 Aug 2008 14:40:53 +0200 Message-ID: <48B156D5.4020203@t-online.de> Date: Sun, 24 Aug 2008 14:40:53 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: SP9Dd0ZLQhfR38Egm+Cu27yetSipKaclNYKWShqTundU+nrjcodboZrvzP2jr8dgCC X-TOI-MSGID: 95d84fd0-15ca-456a-b245-80ed8e0b7eb5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Mingw support for grub2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2008 12:41:01 -0000 Bean wrote: > Hi, > > This patch add support for mingw, now you can create native executable > for windows. > > Nice! Does grub-setup work? > ... > --- a/include/grub/util/misc.h > +++ b/include/grub/util/misc.h > ... > +#ifdef __MINGW32__ > + > +#include > + > +grub_int64_t fseeko (FILE *fp, grub_int64_t offset, int whence); > +grub_int64_t ftello (FILE *fp); > The mingw runtime provides fseeko64/ftello64(), see /usr/include/mingw/stdio.h So the following may work: #ifdef __MINGW32__ #define fseeko fseeko64 #define ftello ftello64 #endif or use inline functions. > +void sync (void); > +int asprintf (char **buf, const char *fmt, ...); > + > I would suggest to add AC_CHECK_FUNC(asprintf) to configure. asprintf() is a GNU extension and not part of C99 or POSIX. > +grub_int64_t grub_util_get_disk_size (char *name); > + > +#define sleep Sleep > The Sleep() parameter specifies milliseconds. #define sleep(s) Sleep((s)*1000) or inline void sleep(unsigned s) { Sleep(s * 1000); } or add sleep() to util/misc.c to avoid global inclusion of the namespace polluter windows.h :-) Christian