From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: Re: Issues with Windows gcc -mno-cygwin (Mingw) Date: Wed, 19 Mar 2003 10:29:18 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <27974647.1048066158905.JavaMail.www@wwinf9808> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048066289 7414 80.91.224.249 (19 Mar 2003 09:31:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 19 Mar 2003 09:31:29 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Mar 19 10:31:28 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 18vZuy-0001vR-00 for ; Wed, 19 Mar 2003 10:31:28 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18vZvf-00009J-00 for ; Wed, 19 Mar 2003 10:32:11 +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 18vZtV-0006qh-00 for emacs-devel@quimby.gnus.org; Wed, 19 Mar 2003 04:29:57 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vZt6-0006MC-00 for emacs-devel@gnu.org; Wed, 19 Mar 2003 04:29:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vZt2-000669-00 for emacs-devel@gnu.org; Wed, 19 Mar 2003 04:29:29 -0500 Original-Received: from smtp3.wanadoo.fr ([193.252.22.27] helo=mwinf0402.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vZst-0005U2-00; Wed, 19 Mar 2003 04:29:19 -0500 Original-Received: from wwinf9808 (wwinf9808 [172.22.150.35]) by mwinf0402.wanadoo.fr (Postfix) with ESMTP id E15BB800054; Wed, 19 Mar 2003 10:29:18 +0100 (CET) Original-To: jasonr@gnu.org 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:12463 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12463 > The default runtime _fmode is text with all Windows compilers. Why is > this a problem only for mingw32's 20030208 build of GCC 3.2.2? I am sorry, it seems my messages wasn't clear enough. The problem is not related to the compiler (I got the same results with gcc 3.1 and 3.2). It is related to changes made in mingw-runtime between version 2.2 and 2.3. With mingw-runtime 2.2, Emacs compiles and run OOTB. With runtime 2.3 and 2.4, Emacs compiles OOTB, but fails at execution time with random errors, because of invalid data read. Here is an excerpt of the change log of mingw-runtime 2.3, which I think is related to IO mode change: 2002-10-19 Danny Smith * crt1.c: Define new macro __IN_MINGW_RUNTIME before including stdlib.h. Define WIN32_MEAN_AND_LEAN before including windows.h * include/stdlib.h (_fmode): Protect declaration as dllimported variable with __IN_MINGW_RUNTIME. 2002-10-19 Igor Pechtchanski * crt1.c: Include stdlib.h. 2002-10-19 Danny Smith * Makefile.in (CRT0S): Add txtmode.o binmode.o. (MINGW_OBJS): Add txtmode.o. (SRCDIST_FILES): Add txtmode.c binmode.c. crt1.c: Don't include fcntrl.h, stdlib.h. (_fmode): Declare, without dllimport attribute. (__p__fmode): Declare access function for dll's _fmode. (_mingw32_init_fmode): Sync dll _fmode with staticly linked _fmode for app. * txtmode.c: New file. * binmode.c: New file. * samples/fmode/test2.c: New file. * samples/fmode/jamfile: Add test2.exe target.