On 8/16/22 09:25, Eli Zaretskii wrote: > why does this work differently on > different platforms? Platforms that lack clock_gettime and CLOCK_MONOTONIC fall back on a deterministic algorithm. Presumably MS-DOS one of the few such platforms, which is why the problem is observed only on MS-DOS. How about something like the attached patch to Gnulib's lib/tempname.c? 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. If this patch isn't good enough for MS-DOS, what sort of random bits are easily available on that platform? We don't need anything cryptographically secure; a higher-res clock should suffice.