2 ===================================================================
3 --- configure.in (revision 67686)
4 +++ configure.in (working copy)
6 AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
8 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
9 -shadow.h signal.h stdint.h stropts.h termios.h thread.h \
10 +pwd.h shadow.h signal.h stdint.h stropts.h termios.h thread.h \
12 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
13 sys/lock.h sys/mkdev.h sys/modem.h \
15 AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \
16 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
17 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
18 - getpriority getpwent getspnam getspent getsid getwd \
19 + getpriority getpwent getpwuid getpwnam getspnam getspent getsid getwd \
20 kill killpg lchmod lchown lstat mkfifo mknod mktime \
21 mremap nice pathconf pause plock poll pthread_init \
22 putenv readlink realpath \
23 Index: Modules/pwdmodule.c
24 ===================================================================
25 --- Modules/pwdmodule.c (revision 67686)
26 +++ Modules/pwdmodule.c (working copy)
28 #include "structseq.h"
30 #include <sys/types.h>
37 static PyStructSequence_Field struct_pwd_type_fields[] = {
38 {"pw_name", "user name"},
39 {"pw_passwd", "password"},
41 struct_pwd_type_fields,
46 PyDoc_STRVAR(pwd__doc__,
47 "This module provides access to the Unix password database.\n\
51 static int initialized;
54 static PyTypeObject StructPwdType;
64 PyDoc_STRVAR(pwd_getpwnam__doc__,
65 "getpwnam(name) -> (pw_name,pw_passwd,pw_uid,\n\
66 pw_gid,pw_gecos,pw_dir,pw_shell)\n\
74 PyDoc_STRVAR(pwd_getpwall__doc__,
78 static PyMethodDef pwd_methods[] = {
80 {"getpwuid", pwd_getpwuid, METH_VARARGS, pwd_getpwuid__doc__},
83 {"getpwnam", pwd_getpwnam, METH_VARARGS, pwd_getpwnam__doc__},
86 {"getpwall", (PyCFunction)pwd_getpwall,
87 METH_NOARGS, pwd_getpwall__doc__},
94 PyStructSequence_InitType(&StructPwdType,
95 &struct_pwd_type_desc);
97 PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType);
98 /* And for b/w compatibility (this was defined by mistake): */
99 PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType);