summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2013-03-09 18:04:59 -0700
committerGary V. Vaughan <gary@gnu.org>2013-09-18 20:53:33 +0700
commit0b85e7900bcb0fda336c7516f76ad205fbd1d864 (patch)
tree193dd0aa92fe67180d017bc81e565753652c5441
parentddcce81a92b0fb9bf03fa7ac26dd6276b2f8d850 (diff)
downloadm4-0b85e7900bcb0fda336c7516f76ad205fbd1d864.tar.gz
build: fix large diversions on mingw
Gnulib's clean-temp module defaults to using _O_TEMPORARY on mingw, which has the effect of deleting a file the first time it is closed. This resulted in a testsuite failure in 146.diversions, with m4 complaining that it could not create a temporary file for holding a diversion. In reality, m4 was trying to rename the file, but because mingw does not allow renaming an open file, we have to close it first - but closing it first deleted the file. For now, we will just work around the gnulib issue by disabling the use of _O_TEMPORARY. This was probably introduced in commit da5f6db (1.4.13), although my testing environment was painfully slow to confirm this, so I did not call out a 'regression since xyz' in the NEWS entry. * gl/lib/clean-temp.c.diff: New file. Signed-off-by: Eric Blake <eblake@redhat.com>
-rw-r--r--gl/lib/clean-temp.c.diff14
-rw-r--r--po/Makevars2
2 files changed, 15 insertions, 1 deletions
diff --git a/gl/lib/clean-temp.c.diff b/gl/lib/clean-temp.c.diff
new file mode 100644
index 00000000..2eafde69
--- /dev/null
+++ b/gl/lib/clean-temp.c.diff
@@ -0,0 +1,14 @@
+diff --git i/lib/clean-temp.c w/lib/clean-temp.c
+index 40ec02f..1053312 100644
+--- i/lib/clean-temp.c
++++ w/lib/clean-temp.c
+@@ -582,6 +582,9 @@ static bool
+ supports_delete_on_close ()
+ {
+ static int known; /* 1 = yes, -1 = no, 0 = unknown */
++ /* M4 wants to close and later reopen a temporary file, so
++ delete-on-close must not be used. */
++ known = -1;
+ if (!known)
+ {
+ OSVERSIONINFO v;
diff --git a/po/Makevars b/po/Makevars
index fb241d66..118868e6 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -41,4 +41,4 @@ MSGID_BUGS_ADDRESS = bug-m4@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
+EXTRA_LOCALE_CATEGORIES =