diff options
author | Guido van Rossum <guido@python.org> | 1998-08-04 22:53:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-08-04 22:53:56 (GMT) |
commit | bcc207484a0f8f27a684e11194e7430c0710f66d (patch) | |
tree | 506ce2d793a619a92e78faa89032878ea4a43461 /Modules/pwdmodule.c | |
parent | 1a8791e0b875df8e9428c2d9969f64e5967ac0b4 (diff) | |
download | cpython-bcc207484a0f8f27a684e11194e7430c0710f66d.zip cpython-bcc207484a0f8f27a684e11194e7430c0710f66d.tar.gz cpython-bcc207484a0f8f27a684e11194e7430c0710f66d.tar.bz2 |
Changes for BeOS, QNX and long long, by Chris Herborth.
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r-- | Modules/pwdmodule.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index e37e5fd..732e4dc 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -51,6 +51,13 @@ static PyObject * mkpwent(p) struct passwd *p; { +#ifdef __BEOS__ + /* For faking the GECOS field. - [cjh] */ + char *be_user = NULL; + + be_user = getenv( "USER" ); +#endif + return Py_BuildValue( "(ssllsss)", p->pw_name, @@ -64,7 +71,12 @@ mkpwent(p) (long)p->pw_uid, (long)p->pw_gid, #endif +#ifdef __BEOS__ +/* BeOS doesn't have a GECOS field, oddly enough. - [cjh] */ + be_user ? be_user : "baron", +#else p->pw_gecos, +#endif p->pw_dir, p->pw_shell); } |