delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/07/24/08:20:21

Date: Mon, 24 Jul 2000 14:37:12 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Piotr Eljasiak <eljasiak AT neptun DOT gdansk DOT tpsa DOT pl>
cc: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>, djgpp-workers AT delorie DOT com
Subject: Re: Patch to make getlogin() examine env. var. USERNAME
In-Reply-To: <397C172C.12597.F9F8BD4@localhost>
Message-ID: <Pine.SUN.3.91.1000724142659.13519A-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, Piotr Eljasiak wrote:

> > Why not change the order of precedence in getlogin()?  If there are 
> > systems where USERNAME is defined, but USER is not, that would be the
> > logical solution, no?
> 
> Why not? What about the order of searching env. vars - is 
> USERNAME, USER, LOGNAME ok?

Yes, I think so.

> If so - I've attached the patch changing this (getlogin.c+getlogin.txh).

Thanks.  Applied.

Note that I made LOGNAME be in preference to USER, since otherwise those 
who define LOGNAME will have the same problem as with USERNAME.

- Raw text -


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