From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VwslS-0001j0-V7 for mharc-grub-devel@gnu.org; Sat, 28 Dec 2013 07:13:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwslJ-0001hq-1H for grub-devel@gnu.org; Sat, 28 Dec 2013 07:13:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwslA-00030L-KF for grub-devel@gnu.org; Sat, 28 Dec 2013 07:13:00 -0500 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:34191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwslA-00030G-CL for grub-devel@gnu.org; Sat, 28 Dec 2013 07:12:52 -0500 Received: by mail-lb0-f177.google.com with SMTP id q8so4611736lbi.8 for ; Sat, 28 Dec 2013 04:12: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; bh=Vqaxwk+OD+8+So74/4/ZdKTV17KRF9AMJk6Jy74h9xc=; b=tBbmWEQrkQeDkJIy1Vp9vMEzwcyDbBZJ1jR5ibsgtYCQ7SMZO1zfbku0nxhlR5/dKM R9HoisEvOeZfqrH+vU9QZNaHhRxkIOMKghxxdHZxjrCeMwxlE0fd0hQ1h609Q3b/GPRE gDV46EOxAeuBy2BmT8OYzWCjsVE/yb8ZcfKkNeUwEnbumC4Y2ZGj8xH+xV1fovIS7aID Gf5ri0UhxnSxfk9MddiDDPbZE9JRu41zAvPGjvJpoabgm1syirlBY5+efOh4AGrizQPq PU6bAsF0ymUn5oh14IrqtNg3XF8QYlRMlr4uWVmgzMP2/pys8Qju1pS4QDa2NhrN66SK Vnlg== X-Received: by 10.112.218.74 with SMTP id pe10mr21438988lbc.19.1388232771154; Sat, 28 Dec 2013 04:12:51 -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 di11sm29798496lac.0.2013.12.28.04.12.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Dec 2013 04:12:50 -0800 (PST) From: Andrey Borzenkov To: grub-devel@gnu.org Subject: [PATCH] rename FILE to avoid conflict with stdio on mingw Date: Sat, 28 Dec 2013 16:12:46 +0400 Message-Id: <1388232766-23712-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:c04::231 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: Sat, 28 Dec 2013 12:13:09 -0000 On mingw libintl.h includes stdio.h which causes error due to redefinition of FILE. Reimplement without enum to make it less likely to conflict with system headers. grub-core/commands/macbless.c:40:11: error: 'FILE' redeclared as different kind of symbol { NONE, FILE, DIR } found; ^ In file included from c:\mingw\include\libintl.h:314:0, from ./include/grub/i18n.h:33, from ./include/grub/misc.h:27, from ./include/grub/list.h:25, from ./include/grub/command.h:24, from grub-core/commands/macbless.c:20: c:\mingw\include\stdio.h:145:3: note: previous declaration of 'FILE' was here } FILE; ^ --- grub-core/commands/macbless.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/grub-core/commands/macbless.c b/grub-core/commands/macbless.c index c521083..3f96a7e 100644 --- a/grub-core/commands/macbless.c +++ b/grub-core/commands/macbless.c @@ -36,8 +36,8 @@ struct find_node_context { grub_uint64_t inode_found; char *dirname; - enum - { NONE, FILE, DIR } found; + int found; + int is_dir; }; static int @@ -53,7 +53,8 @@ find_inode (const char *filename, && grub_strcasecmp (ctx->dirname, filename) == 0))) { ctx->inode_found = info->inode; - ctx->found = info->dir ? DIR : FILE; + ctx->found = 1; + ctx->is_dir = info->dir; } return 0; } @@ -175,7 +176,7 @@ grub_mac_bless_file (grub_device_t dev, const char *path_in, int intel) grub_free (path); return grub_mac_bless_inode (dev, (grub_uint32_t) ctx.inode_found, - (ctx.found == DIR), intel); + ctx.is_dir, intel); } static grub_err_t -- tg: (989af02..) u/mingw/macbless_stdio_file_conflict (depends on: master)