delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/07/25/02:50:13

Date: Tue, 25 Jul 2000 09:46:11 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com, Piotr Eljasiak <eljasiak AT neptun DOT gdansk DOT tpsa DOT pl>
Subject: Re: Patch to make getlogin() examine env. var. USERNAME
In-Reply-To: <397C8CE0.C615DE0A@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1000725094521.22846A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 24 Jul 2000, Richard Dawe wrote:

> If getlogin() defaults to "dosuser" in the absence of USERNAME, etc., is
> there any point defining it DJGPP.ENV? It seems like the definition in
> DJGPP.ENV is redundant.

You are assuming that every program which needs to know the username
does so by calling `getlogin'.  This assumption is not true.  Some of
them examine the environment directly, or have different order of
precedence between relevant variables.

But even if the definition in DJGPP.ENV is redundant, USER was there
for a long time, and I don't think it did any harm.  So removing it
would IMHO require a real problem that it causes somewhere.  Being
redundant isn't such a problem.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019