[Top][All Lists]

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


From: Eli Zaretskii
Subject: Re: $USERPROFILE for $HOME on W32
Date: Fri, 26 Nov 2004 00:04:19 +0200

> From: Stefan Monnier <address@hidden>
> Date: Thu, 25 Nov 2004 11:00:39 -0500
> Cc: address@hidden
> Here is a new patch.  Could people try it out and tell me if it works?
> And tell me how to fix it

I still think, like Jason, that all the environment variables frobbing
on w32 should be in w32.c:init_environment, not in Lisp.  Moving it to
Lisp means, e.g., that temacs will have different ideas about HOME
etc. than the dumped Emacs, which I think might confuse someone some
day.  See below for another reason.

>  getpwuid (int uid)
>  {
>    if (uid == the_passwd.pw_uid)
> -    return &the_passwd;
> +    {
> +      /* Set dir and shell from environment variables. */
> +      strcpy (the_passwd.pw_dir, getenv ("HOME"));
> +      strcpy (the_passwd.pw_shell, getenv ("SHELL"));
> +      return &the_passwd;
> +    }
>    return NULL;
>  }

This change means that we run this code every time getpwuid is called.
That's too excessive, I think, and could be avoided if all the
environment frobbing were done in C.

reply via email to

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