From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1W2uKL-0000xw-HE for mharc-grub-devel@gnu.org; Mon, 13 Jan 2014 22:06:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2uKE-0000uR-7Z for grub-devel@gnu.org; Mon, 13 Jan 2014 22:06:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2uK8-0001QU-RT for grub-devel@gnu.org; Mon, 13 Jan 2014 22:05:58 -0500 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:58386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2uK8-0001QO-JX for grub-devel@gnu.org; Mon, 13 Jan 2014 22:05:52 -0500 Received: by mail-lb0-f176.google.com with SMTP id l4so5996625lbv.35 for ; Mon, 13 Jan 2014 19:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=IkmR1mkfYhR+y8ZpEsJRHeqj2n6gvTei205hTSC31yU=; b=I1wY11r0WcXGdO72zyd1MA0MBpDwaqzza2RWAmhM7xcBZURD11o697XEwQIEgCBJFm t1i53zIhf3gxbH9QDrYExS1ys35TidbVBhfVWDUybYNWIHOYboSJGu5q+WvnpLLWtqIh wgINTclQWj3FmG0cJpDTrkfsWV4HUF092w4aB6dE4MA3Geu9ntZT8hsJRP5/enXewzN8 0sYKXlAWiLgCSszkexB2UDZIKbwqwdWTpyyRa+8qX+ea9sfO7l/3O1/hw1BcDYC+tzr5 9tjJQnqbDEmjsKuWOC62LQSGjo3I24PZQjGgmfTawVhCbBVvE2qUKZ5WtsKqmC3RJKxF /acg== X-Received: by 10.112.198.65 with SMTP id ja1mr100315lbc.75.1389668751364; Mon, 13 Jan 2014 19:05:51 -0800 (PST) Received: from localhost.localdomain (ppp91-76-163-241.pppoe.mtu-net.ru. [91.76.163.241]) by mx.google.com with ESMTPSA id m5sm13649314laj.4.2014.01.13.19.05.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2014 19:05:50 -0800 (PST) From: Andrey Borzenkov To: grub-devel@gnu.org Subject: [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS Date: Tue, 14 Jan 2014 07:05:46 +0400 Message-Id: <1389668746-1117-1-git-send-email-arvidjaar@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1388311800-27081-1-git-send-email-arvidjaar@gmail.com> References: <1388311800-27081-1-git-send-email-arvidjaar@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::230 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: Tue, 14 Jan 2014 03:06:03 -0000 In 94cee4a4c201bb506377b2c26e072eee8cb19d6f I overlooked that config.h unconditionally sets _FILE_OFFSET_BITS, so it cannot be used to detect MinGW W64 environment. It looks like Emacs folks already found solution; instead of _FILE_OFFSET_BITS use _W64 as suggested in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00723.html --- include/grub/osdep/hostfile_windows.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h index 79efcfa..bf6451b 100644 --- a/include/grub/osdep/hostfile_windows.h +++ b/include/grub/osdep/hostfile_windows.h @@ -69,8 +69,8 @@ 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) +/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */ +#ifndef _W64 #define fseeko fseeko64 #define ftello ftello64 #endif -- tg: (0776112..) u/mingw/use-_w64-for-mingw-w64 (depends on: master)