From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.devel Subject: Issues with Windows gcc -mno-cygwin (Mingw) Date: 18 Mar 2003 18:14:09 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1048007991 15023 80.91.224.249 (18 Mar 2003 17:19:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2003 17:19:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 18 18:19:50 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vKkg-0003uB-00 for ; Tue, 18 Mar 2003 18:19:50 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18vKl2-0004PB-00 for ; Tue, 18 Mar 2003 18:20:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vKjY-0006ML-03 for emacs-devel@quimby.gnus.org; Tue, 18 Mar 2003 12:18:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vKhV-0004pm-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 12:16:33 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vKfx-00042F-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 12:15:00 -0500 Original-Received: from [193.28.100.165] (helo=mail.epost.de) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vKfC-0003Jp-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 12:14:10 -0500 Original-Received: from cicero.benny.turtle-trading.net.epost.de (193.99.153.6) by mail.epost.de (6.7.015) id 3E589924002584C7 for emacs-devel@gnu.org; Tue, 18 Mar 2003 18:14:09 +0100 Original-To: emacs-devel@gnu.org Original-Lines: 27 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12443 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12443 --=-=-= Hi all, I have compiled the CVS HEAD with the Cygwin Mingw cross-environment (gcc -mno-cygwin). I have had two problems: - The cygpath issue. The Makefiles have the necessary code to use the Cygwin cygpath utility, but it's commented out. I appreciate that the situation is not very stable in that area, but could we consider a conditional and a configure item for this? We do need that code as long as we want Emacs to support Cygwin at compile-time, but not at run-time, because without that code the Makefile will provide Cygwin paths to ELisp. - Problem with _fmode (global MSC variable set to O_BINARY as the default file mode). For a simple patch see below. Strictly speaking I think the real problem is that this is not handled without the _fmode hack. The code should just use its own global variable (or even more simply just add O_BINARY everywhere) instead of using this brittle compiler/runtime dependent solution. so long, benny --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=fmode.diff Index: unexw32.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/unexw32.c,v retrieving revision 1.22 diff -c -r1.22 unexw32.c *** unexw32.c 4 Feb 2003 14:03:13 -0000 1.22 --- unexw32.c 18 Mar 2003 16:19:04 -0000 *************** *** 83,88 **** --- 83,92 ---- PIMAGE_SECTION_HEADER heap_section; + /* Needed by the Mingw CRT to override _fmode, setting down in _start + doesn't work, it gets reset somewhere in mainCRTStartup() */ + int _fmode = O_BINARY; + #ifdef HAVE_NTGUI HINSTANCE hinst = NULL; HINSTANCE hprevinst = NULL; --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --=-=-=--