Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
[Freeciv-Dev] Re: patch: getting username (PR#109)
Home

[Freeciv-Dev] Re: patch: getting username (PR#109)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: patch: getting username (PR#109)
From: sebauer@xxxxxxxxxxx (Sebastian Bauer)
Date: Tue, 17 Aug 1999 11:20:28 +0100

Hello David

> This patch moves the check for the user's username into 
> a function user_username() in shared.c.  It also removes
> the "please report this" note if getpwuid() fails, and
> also tries getenv $USER (actually, now before getpwuid()).

> (Also small reorder in gui-gtk to call user_username()
> only after log_init().)

> Questions:
> - would it be useful to check for getpwuid() in configure?  
>  (Eg, on Win/Mac?)

I think this would be better. On Amiga this function returns NULL,
but maybe it's not defined on other platforms.

> - should $USER be checked before or after getpwuid()?

I think it is Ok like it is now.

> - should getpwuid() also be used in user_home_dir(), 
>  and if so, before or after $HOME?
> - should we check eg $FREECIV_USER to allow user to set 

Not necessary, for me at least ;-)

bye,
Sebastian Bauer


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