Subject: Re: bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time

From: Eli Zaretskii <[email-masked]>
Date: Tue, 25 May 2021 16:02:14 +0300

> From: Andrea Corallo <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 25 May 2021 12:34:27 +0000
> 
> +  /* Use `file-truename' or fall back to 'realpath' `expand-file-name'
> +     when the first is not available.  (`file-truename' is not
> +     available only for a short phases of the bootstrap before file.el
> +     is loaded).  */
> +
> +  if (NILP (Ffboundp (intern_c_string ("file-truename"))))
> +    {
> +#ifndef WINDOWSNT
> +      char *file_normalized = realpath (SSDATA (filename), NULL);
> +#else
> +      char *file_normalized = ??? ;
> +#endif
> +      filename = Fexpand_file_name (build_string (file_normalized), Qnil);
> +      xfree (file_normalized);
> +    }
> +  else
> +    filename = CALL1I (file-truename, filename);
>  
>    if (NILP (Ffile_exists_p (filename)))
>      xsignal1 (Qfile_missing, filename);

Thanks, I will try that.  But why not use realpath at all times, even
if file-truename is available?  They do the same thing, AFAIK, no?