From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VxDKD-000432-LD for mharc-grub-devel@gnu.org; Sun, 29 Dec 2013 05:10:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxDK3-00041v-Gr for grub-devel@gnu.org; Sun, 29 Dec 2013 05:10:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxDJv-0001hK-4F for grub-devel@gnu.org; Sun, 29 Dec 2013 05:10:15 -0500 Received: from mail-la0-x232.google.com ([2a00:1450:4010:c03::232]:65515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxDJu-0001gT-Sh for grub-devel@gnu.org; Sun, 29 Dec 2013 05:10:07 -0500 Received: by mail-la0-f50.google.com with SMTP id el20so4959757lab.37 for ; Sun, 29 Dec 2013 02:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=7tNMoOFtw3SaZURNlgjYmNsJMY3D6RnCOZIqaD/aZXo=; b=dlO/ZL8jnm6NUVhgde5iQMbHim9+bRSOFlQhMxTpS+ALsFH34Qy4tpC7j8uMNIOmBM FFI36CvCbFPXdyOJB7bTSvtIEbkeNQbtYocys+lgLvCiWdyz685w/Ccf89qWFyKWMLt4 bECKc6PIKnKunvHNxpR9jE9GGbAbFj/n9SZUty37YGcQHkhHAeW9CibqDoo3Lo9UsPoF hVUb4oqaAw0DV6iS8a6WBt68refB6y/09Rm7i6pnDtjNweAvrlfAdLkOtkXeXCvP2pLh e45PW7onGOgELNJ+tfXNpKXexinCQOi5GeA/4+WJzJafwbRMMiuwgCHcKjC7AkQP+bbN mtaw== X-Received: by 10.112.159.69 with SMTP id xa5mr349895lbb.89.1388311805870; Sun, 29 Dec 2013 02:10:05 -0800 (PST) Received: from localhost.localdomain (ppp91-76-134-134.pppoe.mtu-net.ru. [91.76.134.134]) by mx.google.com with ESMTPSA id t9sm32390841lat.1.2013.12.29.02.10.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Dec 2013 02:10:05 -0800 (PST) From: Andrey Borzenkov To: grub-devel@gnu.org Subject: [PATCH] fix 32 bit compilation on MinGW-w64 Date: Sun, 29 Dec 2013 14:10:00 +0400 Message-Id: <1388311800-27081-1-git-send-email-arvidjaar@gmail.com> X-Mailer: git-send-email 1.8.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::232 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 10:10:24 -0000 Use _FILE_OFFSET_BITS macro to distinguish between native MinGW and 32 bit under MinGW-64. The latter does not require fseeko/ftello redefinition which it already does in case of _FILE_OFFSET_BITS=64. --- include/grub/osdep/hostfile_windows.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h index 36615b2..79efcfa 100644 --- a/include/grub/osdep/hostfile_windows.h +++ b/include/grub/osdep/hostfile_windows.h @@ -69,8 +69,11 @@ enum grub_util_fd_open_flags_t #if defined (__MINGW32__) && !defined (__MINGW64__) +/* 32 bit on MinGW-64 already redefines them if _FILE_OFFSET_BITS=64 */ +#if !defined(_FILE_OFFSET_BITS) #define fseeko fseeko64 #define ftello ftello64 +#endif #endif -- tg: (093dec7..) u/mingw/fseeko (depends on: master)