From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20681: Build failure [MSYS2/MINGW64, OSX] Date: Mon, 01 Jun 2015 22:01:55 +0300 Message-ID: <83r3pvs15o.fsf@gnu.org> References: <55671056.9030604@alice.it> <83oal4wq59.fsf@gnu.org> <55685B1B.1040507@alice.it> <55689A39.7080804@cs.ucla.edu> <5568C1C8.2090406@cs.ucla.edu> <83siaeuzzk.fsf@gnu.org> <83lhg6uuyy.fsf@gnu.org> <83oal0u8g0.fsf@gnu.org> <834mmrtqos.fsf@gnu.org> <83vbf7s4yw.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1433185404 16497 80.91.229.3 (1 Jun 2015 19:03:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 19:03:24 +0000 (UTC) Cc: 20681@debbugs.gnu.org, eggert@cs.ucla.edu, nandryshak@gmail.com, angelo.graziosi@alice.it To: Andreas =?UTF-8?Q?Gr=C3=BCnbacher?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 01 21:03:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YzUzQ-0001uW-Ui for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 21:03:13 +0200 Original-Received: from localhost ([::1]:54002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzUzQ-0000Yd-Cl for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 15:03:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzUzL-0000Vd-6w for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 15:03:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzUzG-00029H-At for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 15:03:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzUzG-00029B-8O for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 15:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YzUzF-0007NK-MS for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 15:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jun 2015 19:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20681 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20681-submit@debbugs.gnu.org id=B20681.143318534028301 (code B ref 20681); Mon, 01 Jun 2015 19:03:01 +0000 Original-Received: (at 20681) by debbugs.gnu.org; 1 Jun 2015 19:02:20 +0000 Original-Received: from localhost ([127.0.0.1]:36399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzUyZ-0007MO-76 for submit@debbugs.gnu.org; Mon, 01 Jun 2015 15:02:20 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:61341) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzUyW-0007M8-0h for 20681@debbugs.gnu.org; Mon, 01 Jun 2015 15:02:17 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NPA00C004UDQ200@a-mtaout22.012.net.il> for 20681@debbugs.gnu.org; Mon, 01 Jun 2015 22:02:09 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NPA00CKF4VKES90@a-mtaout22.012.net.il>; Mon, 01 Jun 2015 22:02:09 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103454 Archived-At: > Date: Mon, 1 Jun 2015 20:41:02 +0200 > From: Andreas Grünbacher > Cc: Nick Andryshak , 20681@debbugs.gnu.org, > Paul Eggert , Angelo Graziosi > > 2015-06-01 19:39 GMT+02:00 Eli Zaretskii : > > ??? If it were true, set-permissions.c would compile on Windows. It > > doesn't. > > I've already explained, at length, why it currently doesn't compile, and > at least three ways of how it could be fixed. > > > So there's more to this job than just copying the code. > > Yes, adding some #ifdefs and autoconf checks, that kind of thing. > That's not so hard. You have just explained at length why using emulation of Posix ACL APIs would be wrong on Windows, so I assumed that copying the Emacs implementation with minimal changes into Gnulib must also be wrong in your opinion. > >> > There's also the minor (but important for Emacs) point of supporting > >> > file names with characters outside of the current system codepage, > >> > which Gnulib can only provide in UTF-8 locales, something that doesn't > >> > exist on Windows. > >> > >> This has nothing to do with get_permissions and set_permissions. > > > > It's a reason not to use Gnulib for any file-related operations in > > Emacs on Windows, because Emacs on Windows uses Unicode APIs to access > > files by their names. > > So it's okay to have this function in emacs: > > src/w32.c:acl_get_file (const char *fname, acl_type_t type) > > but the same interface in gnulib wouldn't be okay? Right ... Emacs on Windows pretends to live in a UTF-8 locale, so file names are encoded in UTF-8 before they are passed to functions like acl_get_file; then acl_get_file and other such functions convert the file names to UTF-16 before calling Windows Unicode APIs. This works well for Emacs, but Gnulib is not just for Emacs, it is used by many other projects that build out of the box with MinGW. Most, if not all, of those projects do NOT pass UTF-8 file names to library functions, and many of them don't even have facilities that exist in Emacs to encode file names before calling library functions -- they simply pass C char * strings to them, which will only work on Windows if those strings are encoded in the current system codepage. Therefore, functions that assume UTF-8 encoded file name CANNOT be added to Gnulib, as they will break every project except Emacs. Gnulib on Windows _requires_ file names in the system codepage, which is no longer acceptable for Emacs, because Emacs has broken out of this limitation several releases ago, and it can now visit files whose names are not limited to system codepage. > I'll stop this discussion now, you're just not making sense. Maybe you should study the subject more deeply, before passing such judgments.