summaryrefslogtreecommitdiff
path: root/Modules/pwdmodule.c
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-03-03 02:59:16 +0000
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-03-03 02:59:16 +0000
commit7bf6833e178696b9815fd4e4c6d1cecc8b46bdd2 (patch)
tree9da72d3e52c043d4fc5437967ddb9a0f0226b6e9 /Modules/pwdmodule.c
parent38b504e9e3ef3049815779e8c18b62f690ec4ed2 (diff)
downloadcpython-git-7bf6833e178696b9815fd4e4c6d1cecc8b46bdd2.tar.gz
OS/2 EMX port changes (Modules part of patch #450267):
Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r--Modules/pwdmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index 35afc4ef28..91989b710e 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -128,8 +128,12 @@ pwd_getpwall(PyObject *self, PyObject *args)
return NULL;
if ((d = PyList_New(0)) == NULL)
return NULL;
+#if defined(PYOS_OS2) && defined(PYCC_GCC)
+ if ((p = getpwuid(0)) != NULL) {
+#else
setpwent();
while ((p = getpwent()) != NULL) {
+#endif
PyObject *v = mkpwent(p);
if (v == NULL || PyList_Append(d, v) != 0) {
Py_XDECREF(v);