Date: Wed, 19 Jul 2000 07:52:18 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Piotr Eljasiak cc: djgpp AT delorie DOT com Subject: Re: Odp: User login name ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 18 Jul 2000, Piotr Eljasiak wrote: > char * > getlogin(void) > { > char *p; > > p = getenv("USER"); > if (!p) > p = getenv("LOGNAME"); > if (!p) > p = getenv("USERNAME"); > if (!p) > p = default_login; > return p; > } DJGPP's getlogin() already does two of these three; if you want the third, you could setenv("USERNAME", getenv("USER")) or something.