summaryrefslogtreecommitdiffstats
path: root/Modules/pwdmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-08-04 22:53:56 (GMT)
committerGuido van Rossum <guido@python.org>1998-08-04 22:53:56 (GMT)
commitbcc207484a0f8f27a684e11194e7430c0710f66d (patch)
tree506ce2d793a619a92e78faa89032878ea4a43461 /Modules/pwdmodule.c
parent1a8791e0b875df8e9428c2d9969f64e5967ac0b4 (diff)
downloadcpython-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.c12
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);
}