Re: [PATCH] Update after gnulib changed, v2

Bruno Haible <[email protected]>
Newsgroups gmane.comp.gnu.m4.bugs
Message-ID <6700412.J8jd2Gf7tH@omega>
A gnulib override is no longer needed. Please use this patch instead.
0001-Update-after-gnulib-changed.patch (text/x-patch, 2.1 KB)
From 2639bdc228b00f7847f825063d9299d8d9733be0 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Sat, 4 Jul 2020 10:29:44 +0200
Subject: [PATCH] Update after gnulib changed.

* src/output.c (m4_tmpfile, m4_tmpopen): Update fopen_temp invocations.
* gl/lib/clean-temp.c.diff: Remove file, no longer needed.
---
 gl/lib/clean-temp.c.diff | 14 --------------
 src/output.c             |  6 +++---
 2 files changed, 3 insertions(+), 17 deletions(-)
 delete mode 100644 gl/lib/clean-temp.c.diff

diff --git a/gl/lib/clean-temp.c.diff b/gl/lib/clean-temp.c.diff
deleted file mode 100644
index 2eafde6..0000000
--- a/gl/lib/clean-temp.c.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-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/src/output.c b/src/output.c
index a4ad527..f5dee7c 100644
--- a/src/output.c
+++ b/src/output.c
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989-1994, 2004-2014, 2016-2017 Free Software
+   Copyright (C) 1989-1994, 2004-2014, 2016-2017, 2020 Free Software
    Foundation, Inc.
 
    This file is part of GNU M4.
@@ -225,7 +225,7 @@ m4_tmpfile (int divnum)
     }
   name = m4_tmpname (divnum);
   register_temp_file (output_temp_dir, name);
-  file = fopen_temp (name, O_BINARY ? "wb+" : "w+");
+  file = fopen_temp (name, O_BINARY ? "wb+" : "w+", false);
   if (file == NULL)
     {
       unregister_temp_file (output_temp_dir, name);
@@ -267,7 +267,7 @@ m4_tmpopen (int divnum, bool reread)
     }
   name = m4_tmpname (divnum);
   /* We need update mode, to avoid truncation.  */
-  file = fopen_temp (name, O_BINARY ? "rb+" : "r+");
+  file = fopen_temp (name, O_BINARY ? "rb+" : "r+", false);
   if (file == NULL)
     M4ERROR ((EXIT_FAILURE, errno,
               "cannot create temporary file for diversion"));
-- 
2.7.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.