bug-gnulib
[Top][All Lists]
Advanced

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

Re: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell


From: Paul Eggert
Subject: Re: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell
Date: Tue, 16 Aug 2022 12:11:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/16/22 10:47, Eli Zaretskii wrote:

(Why are you talking about MS-DOS?)

I mistakenly thought it was an MS-DOS problem because tempname.c ordinarily would use clock_gettime on MinGW. I didn't know Emacs 'configure' deliberately suppresses MinGW's clock_gettime.


Thanks, but why not use 'random' instead?  Emacs does have it on all
platforms, including MS-Windows.  AFAIU, it's better than 'rand'.

If the code used 'random' then the Gnulib 'tempname' module would need to add a dependency on the Gnulib 'random' module, which would in turn add a cascading dependency on Gnulib's 'random_r' module. It's better to avoid this dependency if we can easily do so.

Come to think of it, we don't need to use 'rand' either, since tempname.c already has a good-enough pseudorandom generator. I installed into Gnulib the attached patch, which I hope fixes the Emacs problem without changing glibc's generated code (once this gets migrated back into glibc).


If I understand things correctly this should make the names random
enough on MS-DOS, though Emacs itself still needs a patch as I mentioned
a few minutes ago.

Why would Emacs need that patch?

In another part of this thread you rejected that patch, on the grounds that fixing the unlikely Emacs bug is more trouble than it's worth. So I'll drop that suggestion.

Attachment: 0001-tempname-generate-better-names-for-MinGW-Emacs.patch
Description: Text Data


reply via email to

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