aboutsummaryrefslogtreecommitdiff
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
parentAdded support for SyncCGContextOriginWithPort(). (diff)
downloadcpython-7bf6833e178696b9815fd4e4c6d1cecc8b46bdd2.tar.gz
cpython-7bf6833e178696b9815fd4e4c6d1cecc8b46bdd2.tar.bz2
cpython-7bf6833e178696b9815fd4e4c6d1cecc8b46bdd2.zip
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 35afc4ef28a..91989b710ea 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);