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
984890fc
Kaydet (Commit)
984890fc
authored
Kas 24, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Close #13415: Test in configure if unsetenv() has a return value or not.
Patch written by Charles-François Natali.
üst
1518e871
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
1 deletion
+46
-1
posixmodule.c
Modules/posixmodule.c
+6
-1
configure
configure
+28
-0
configure.in
configure.in
+9
-0
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Modules/posixmodule.c
Dosyayı görüntüle @
984890fc
...
...
@@ -7841,19 +7841,24 @@ static PyObject *
posix_unsetenv
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
name
;
#ifndef HAVE_BROKEN_UNSETENV
int
err
;
#endif
if
(
!
PyArg_ParseTuple
(
args
,
"O&:unsetenv"
,
PyUnicode_FSConverter
,
&
name
))
return
NULL
;
#ifdef HAVE_BROKEN_UNSETENV
unsetenv
(
PyBytes_AS_STRING
(
name
));
#else
err
=
unsetenv
(
PyBytes_AS_STRING
(
name
));
if
(
err
)
{
Py_DECREF
(
name
);
return
posix_error
();
}
#endif
/* Remove the key from posix_putenv_garbage;
* this will cause it to be collected. This has to
...
...
configure
Dosyayı görüntüle @
984890fc
...
...
@@ -9812,6 +9812,34 @@ $as_echo "no" >&6; }
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for broken unsetenv"
>
&5
$as_echo_n
"checking for broken unsetenv... "
>
&6
;
}
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
int
main ()
{
int res = unsetenv("DUMMY")
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
else
$as_echo
"#define HAVE_BROKEN_UNSETENV 1"
>>
confdefs.h
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: yes"
>
&5
$as_echo
"yes"
>
&6
;
}
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
for
ac_prog
in
true
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
...
...
configure.in
Dosyayı görüntüle @
984890fc
...
...
@@ -2688,6 +2688,15 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
[AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for broken unsetenv)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
]], [[int res = unsetenv("DUMMY")]])],
[AC_MSG_RESULT(no)],
[AC_DEFINE(HAVE_BROKEN_UNSETENV, 1, Define if `unsetenv` does not return an int.)
AC_MSG_RESULT(yes)
])
dnl check for true
AC_CHECK_PROGS(TRUE, true, /bin/true)
...
...
pyconfig.h.in
Dosyayı görüntüle @
984890fc
...
...
@@ -95,6 +95,9 @@
/* define to 1 if your sem_getvalue is broken. */
#undef HAVE_BROKEN_SEM_GETVALUE
/* Define if `unsetenv` does not return an int. */
#undef HAVE_BROKEN_UNSETENV
/* Define this if you have the type _Bool. */
#undef HAVE_C99_BOOL
...
...
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