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
d371ff17
Kaydet (Commit)
d371ff17
authored
Ock 25, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Only do ttyname() when HAVE_TTYNAME is defined.
Also define F_OK etc. when not already defined, when doing access().
üst
27e04206
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
posixmodule.c
Modules/posixmodule.c
+18
-0
No files found.
Modules/posixmodule.c
Dosyayı görüntüle @
d371ff17
...
@@ -127,6 +127,7 @@ corresponding Unix manual entries for more information on calls.";
...
@@ -127,6 +127,7 @@ corresponding Unix manual entries for more information on calls.";
#define HAVE_POPEN 1
#define HAVE_POPEN 1
#define HAVE_SYSTEM 1
#define HAVE_SYSTEM 1
#define HAVE_WAIT 1
#define HAVE_WAIT 1
#define HAVE_TTYNAME 1
#endif
/* _MSC_VER */
#endif
/* _MSC_VER */
#endif
/* __BORLANDC__ */
#endif
/* __BORLANDC__ */
#endif
/* ! __WATCOMC__ || __QNX__ */
#endif
/* ! __WATCOMC__ || __QNX__ */
...
@@ -561,6 +562,20 @@ posix_access(self, args)
...
@@ -561,6 +562,20 @@ posix_access(self, args)
return
(
PyInt_FromLong
(
res
==
0
?
1L
:
0L
));
return
(
PyInt_FromLong
(
res
==
0
?
1L
:
0L
));
}
}
#ifndef F_OK
#define F_OK 0
#endif
#ifndef R_OK
#define R_OK 4
#endif
#ifndef W_OK
#define W_OK 2
#endif
#ifndef X_OK
#define X_OK 1
#endif
#ifdef HAVE_TTYNAME
static
char
posix_ttyname__doc__
[]
=
static
char
posix_ttyname__doc__
[]
=
"ttyname(fd, mode) -> String
\n
\
"ttyname(fd, mode) -> String
\n
\
Return the name of the terminal device connected to 'fd'."
;
Return the name of the terminal device connected to 'fd'."
;
...
@@ -582,6 +597,7 @@ posix_ttyname(self, args)
...
@@ -582,6 +597,7 @@ posix_ttyname(self, args)
return
(
posix_error
());
return
(
posix_error
());
return
(
PyString_FromString
(
ret
));
return
(
PyString_FromString
(
ret
));
}
}
#endif
static
char
posix_chdir__doc__
[]
=
static
char
posix_chdir__doc__
[]
=
"chdir(path) -> None
\n
\
"chdir(path) -> None
\n
\
...
@@ -2859,7 +2875,9 @@ posix_statvfs(self, args)
...
@@ -2859,7 +2875,9 @@ posix_statvfs(self, args)
static
PyMethodDef
posix_methods
[]
=
{
static
PyMethodDef
posix_methods
[]
=
{
{
"access"
,
posix_access
,
0
,
posix_access__doc__
},
{
"access"
,
posix_access
,
0
,
posix_access__doc__
},
#ifdef HAVE_TTYNAME
{
"ttyname"
,
posix_ttyname
,
0
,
posix_ttyname__doc__
},
{
"ttyname"
,
posix_ttyname
,
0
,
posix_ttyname__doc__
},
#endif
{
"chdir"
,
posix_chdir
,
0
,
posix_chdir__doc__
},
{
"chdir"
,
posix_chdir
,
0
,
posix_chdir__doc__
},
{
"chmod"
,
posix_chmod
,
0
,
posix_chmod__doc__
},
{
"chmod"
,
posix_chmod
,
0
,
posix_chmod__doc__
},
#ifdef HAVE_CHOWN
#ifdef HAVE_CHOWN
...
...
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