Re: [PATCH] Fix some temp file issues

2022-10-18 Thread Paul Smith
On Fri, 2022-10-07 at 21:37 -0700, Paul Eggert wrote: > On 10/7/22 05:36, Eli Zaretskii wrote: > > I'd appreciate a more high-level description of the idea of the > > change, in addition to the gory details. > > I gave it a shot in the attached patch, which is an improved version > of the

Re: [PATCH] Fix some temp file issues

2022-10-08 Thread Eli Zaretskii
> Date: Sat, 8 Oct 2022 21:23:53 -0700 > Cc: bug-make@gnu.org > From: Paul Eggert > > On 2022-10-08 21:19, Eli Zaretskii wrote: > > I meant the "b" part, not the "+" part. On systems where that changes > > the bytestream written to the file, the change might require a > > suitable change where

Re: [PATCH] Fix some temp file issues

2022-10-08 Thread Paul Eggert
On 2022-10-08 21:19, Eli Zaretskii wrote: I meant the "b" part, not the "+" part. On systems where that changes the bytestream written to the file, the change might require a suitable change where we read that stuff. If I understand things correctly the code was formerly using tmpfile which

Re: [PATCH] Fix some temp file issues

2022-10-08 Thread Eli Zaretskii
> Date: Sat, 8 Oct 2022 15:22:50 -0700 > Cc: bug-make@gnu.org > From: Paul Eggert > > On 2022-10-08 00:14, Eli Zaretskii wrote: > >> tmpfile uses "wb+" (POSIX requires this) and we should be consistent in > >> all the paths that create temporary FILE *. The attached patch adds a > >> comment

Re: [PATCH] Fix some temp file issues

2022-10-08 Thread Paul Eggert
On 2022-10-08 00:14, Eli Zaretskii wrote: tmpfile uses "wb+" (POSIX requires this) and we should be consistent in all the paths that create temporary FILE *. The attached patch adds a comment about this. I don't remember: where is this temporary file read? It's read by a different process

Re: [PATCH] Fix some temp file issues

2022-10-08 Thread Eli Zaretskii
> Date: Fri, 7 Oct 2022 21:37:24 -0700 > Cc: bug-make@gnu.org > From: Paul Eggert > > > I'd appreciate a more high-level description of the idea of the > > change, in addition to the gory details. > > I gave it a shot in the attached patch, which is an improved version of > the previous patch.

Re: [PATCH] Fix some temp file issues

2022-10-07 Thread Paul Eggert
6d14599b70719526b6086ed509 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 7 Oct 2022 21:31:15 -0700 Subject: [PATCH] Fix some temp file issues This patch was prompted by a linker warning "warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'" on Fedora 36.

Re: [PATCH] Fix some temp file issues

2022-10-07 Thread Eli Zaretskii
> From: Paul Eggert > Cc: Paul Eggert > Date: Fri, 7 Oct 2022 00:02:25 -0700 > > This patch was prompted by a linker warning "warning: the use of > `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'" on > Fedora 36. It also fixes a few unlikely bugs and simplifies the > code in a couple

[PATCH] Fix some temp file issues

2022-10-07 Thread Paul Eggert
This patch was prompted by a linker warning "warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'" on Fedora 36. It also fixes a few unlikely bugs and simplifies the code in a couple of places. * src/misc.c (get_tmpdir): Now extern, for os_anontmp. (get_tmpbase): New