Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
267b639a
Kaydet (Commit)
267b639a
authored
Nis 25, 2016
tarafından
Stefan Krah
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20306: The pw_gecos and pw_passwd fields are not required by POSIX.
If they aren't present, set them to an empty string.
üst
8e1da582
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
0 deletions
+45
-0
pwdmodule.c
Modules/pwdmodule.c
+8
-0
configure
configure
+27
-0
configure.ac
configure.ac
+4
-0
pyconfig.h.in
pyconfig.h.in
+6
-0
No files found.
Modules/pwdmodule.c
Dosyayı görüntüle @
267b639a
...
...
@@ -75,10 +75,18 @@ mkpwent(struct passwd *p)
#define SETS(i,val) sets(v, i, val)
SETS
(
setIndex
++
,
p
->
pw_name
);
#if defined(HAVE_STRUCT_PASSWD_PW_PASSWD)
SETS
(
setIndex
++
,
p
->
pw_passwd
);
#else
SETS
(
setIndex
++
,
""
);
#endif
PyStructSequence_SET_ITEM
(
v
,
setIndex
++
,
_PyLong_FromUid
(
p
->
pw_uid
));
PyStructSequence_SET_ITEM
(
v
,
setIndex
++
,
_PyLong_FromGid
(
p
->
pw_gid
));
#if defined(HAVE_STRUCT_PASSWD_PW_GECOS)
SETS
(
setIndex
++
,
p
->
pw_gecos
);
#else
SETS
(
setIndex
++
,
""
);
#endif
SETS
(
setIndex
++
,
p
->
pw_dir
);
SETS
(
setIndex
++
,
p
->
pw_shell
);
...
...
configure
Dosyayı görüntüle @
267b639a
...
...
@@ -12916,6 +12916,33 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct passwd"
"pw_gecos"
"ac_cv_member_struct_passwd_pw_gecos"
"
#include <sys/types.h>
#include <pwd.h>
"
if
test
"x
$ac_cv_member_struct_passwd_pw_gecos
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_PASSWD_PW_GECOS 1
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct passwd"
"pw_passwd"
"ac_cv_member_struct_passwd_pw_passwd"
"
#include <sys/types.h>
#include <pwd.h>
"
if
test
"x
$ac_cv_member_struct_passwd_pw_passwd
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
_ACEOF
fi
...
...
configure.ac
Dosyayı görüntüle @
267b639a
...
...
@@ -3762,6 +3762,10 @@ AC_CHECK_MEMBERS([struct stat.st_flags])
AC_CHECK_MEMBERS([struct stat.st_gen])
AC_CHECK_MEMBERS([struct stat.st_birthtime])
AC_CHECK_MEMBERS([struct stat.st_blocks])
AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_passwd], [], [], [[
#include <sys/types.h>
#include <pwd.h>
]])
AC_MSG_CHECKING(for time.h that defines altzone)
AC_CACHE_VAL(ac_cv_header_time_altzone,[
...
...
pyconfig.h.in
Dosyayı görüntüle @
267b639a
...
...
@@ -916,6 +916,12 @@
/* Define to 1 if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H
/* Define to 1 if `pw_gecos' is a member of `struct passwd'. */
#undef HAVE_STRUCT_PASSWD_PW_GECOS
/* Define to 1 if `pw_passwd' is a member of `struct passwd'. */
#undef HAVE_STRUCT_PASSWD_PW_PASSWD
/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BIRTHTIME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment