autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash fix on Windows/MinGW


From: Eric PAIRE
Subject: Re: Crash fix on Windows/MinGW
Date: Fri, 14 Apr 2006 13:23:05 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0

Oups,

I sent to you a wrong version of the patch.... Here is the right one.

Sorry,
Eric

Eric PAIRE wrote:

To all,

I have been facing a problem on Windows/MinGW with autoconf. The configure generated script crashes when called via "config.status --recheck":
../src/configure: config.log: Permission denied

The reason is that config.log cannot be truncated by configure because config.status already opened it (and Windows forbids truncating an open file). Here is the fix (tested on Windows/MinGW).

Best regards,
Eric


--- lib/autoconf/general.m4~    2006-04-14 12:37:15.913263000 +0200
+++ lib/autoconf/general.m4     2006-04-14 12:57:01.063010000 +0200
@@ -1103,6 +1103,11 @@
 m4_define([_AC_INIT_CONFIG_LOG],
 [m4_divert_text([INIT_PREPARE],
 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
+exec AS_MESSAGE_LOG_FD>/dev/null
+# Redirect first AS_MESSAGE_LOG_FD to /dev/null in order to be able to
+# truncate config.log in the case configure is run by "config.status --recheck"
+# with AS_MESSAGE_LOG_FD already opened on config.log (on Windows, truncating
+# an open file is forbidden).
 exec AS_MESSAGE_LOG_FD>config.log
 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
 This file contains any messages produced by compilers while
--- ChangeLog~  2006-04-14 12:44:01.000000000 +0200
+++ ChangeLog   2006-04-14 12:59:14.811001000 +0200
@@ -1,3 +1,9 @@
+2006-04-14  Eric PAIRE  <address@hidden>
+
+       * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Redirect first
+       AS_MESSAGE_LOG_FD to /dev/null in order to be able to truncate
+       config.log if already opened by "config.status --recheck" (on Windows).
+
 2006-04-14  Stepan Kasal  <address@hidden>
 
        * lib/Autom4te/FileUtils.pm (find_file): Fix a typo in the

reply via email to

[Prev in Thread] Current Thread [Next in Thread]