Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
df300d50
Commit
df300d50
authored
Jan 21, 2012
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the test for dirfd(), some systems #define it rather than have
an actual function.
parent
e9b7cab1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
49 deletions
+65
-49
configure
configure
+57
-47
configure.in
configure.in
+7
-1
pyconfig.h.in
pyconfig.h.in
+1
-1
No files found.
configure
View file @
df300d50
...
...
@@ -2248,6 +2248,52 @@ $as_echo "$ac_res" >&6; }
}
# ac_fn_c_check_func
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_c_check_decl
()
{
as_lineno
=
${
as_lineno
-
"
$1
"
}
as_lineno_stack
=
as_lineno_stack
=
$as_lineno_stack
as_decl_name
=
`
echo
$2
|sed
's/ *(.*//'
`
as_decl_use
=
`
echo
$2
|sed
-e
's/(/((/'
-e
's/)/) 0&/'
-e
's/,/) 0& (/g'
`
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
$as_decl_name
is declared"
>
&5
$as_echo_n
"checking whether
$as_decl_name
is declared... "
>
&6
;
}
if
eval
\$
{
$3
+:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
#ifndef
$as_decl_name
#ifdef __cplusplus
(void)
$as_decl_use
;
#else
(void)
$as_decl_name
;
#endif
#endif
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
eval
"
$3
=yes"
else
eval
"
$3
=no"
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
eval
ac_res
=
\$
$3
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_res
"
>
&5
$as_echo
"
$ac_res
"
>
&6
;
}
eval
$as_lineno_stack
;
${
as_lineno_stack
:+:
}
unset
as_lineno
}
# ac_fn_c_check_decl
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including
...
...
@@ -2304,52 +2350,6 @@ $as_echo "$ac_res" >&6; }
eval
$as_lineno_stack
;
${
as_lineno_stack
:+:
}
unset
as_lineno
}
# ac_fn_c_check_member
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_c_check_decl
()
{
as_lineno
=
${
as_lineno
-
"
$1
"
}
as_lineno_stack
=
as_lineno_stack
=
$as_lineno_stack
as_decl_name
=
`
echo
$2
|sed
's/ *(.*//'
`
as_decl_use
=
`
echo
$2
|sed
-e
's/(/((/'
-e
's/)/) 0&/'
-e
's/,/) 0& (/g'
`
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
$as_decl_name
is declared"
>
&5
$as_echo_n
"checking whether
$as_decl_name
is declared... "
>
&6
;
}
if
eval
\$
{
$3
+:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
$4
int
main ()
{
#ifndef
$as_decl_name
#ifdef __cplusplus
(void)
$as_decl_use
;
#else
(void)
$as_decl_name
;
#endif
#endif
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
eval
"
$3
=yes"
else
eval
"
$3
=no"
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
eval
ac_res
=
\$
$3
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_res
"
>
&5
$as_echo
"
$ac_res
"
>
&6
;
}
eval
$as_lineno_stack
;
${
as_lineno_stack
:+:
}
unset
as_lineno
}
# ac_fn_c_check_decl
cat
>
config.log
<<
_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
...
...
@@ -9410,7 +9410,7 @@ $as_echo "MACHDEP_OBJS" >&6; }
# checks for library functions
for
ac_func
in
alarm accept4 setitimer getitimer bind_textdomain_codeset
chown
\
clock confstr ctermid
dirfd
execv fchmod fchown fork fpathconf ftime ftruncate
\
clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid
\
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd
\
initgroups
kill
killpg lchmod lchown lstat mbrtowc
mkfifo mknod
mktime
\
...
...
@@ -9435,6 +9435,16 @@ fi
done
ac_fn_c_check_decl
"
$LINENO
"
"dirfd"
"ac_cv_have_decl_dirfd"
"#include <sys/types.h>
#include <dirent.h>
"
if
test
"x
$ac_cv_have_decl_dirfd
"
=
xyes
;
then
:
$as_echo
"#define HAVE_DIRFD 1"
>>
confdefs.h
fi
# For some functions, having a definition is not sufficient, since
# we want to take their address.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for chroot"
>
&5
...
...
configure.in
View file @
df300d50
...
...
@@ -2587,7 +2587,7 @@ AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
clock confstr ctermid
dirfd
execv fchmod fchown fork fpathconf ftime ftruncate \
clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
...
...
@@ -2601,6 +2601,12 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
truncate uname unsetenv utimes waitpid wait3 wait4 \
wcscoll wcsftime wcsxfrm _getpty)
AC_CHECK_DECL(dirfd,
AC_DEFINE(HAVE_DIRFD, 1,
Define if you have the 'dirfd' function or macro.), ,
[#include <sys/types.h>
#include <dirent.h>])
# For some functions, having a definition is not sufficient, since
# we want to take their address.
AC_MSG_CHECKING(for chroot)
...
...
pyconfig.h.in
View file @
df300d50
...
...
@@ -178,7 +178,7 @@
*/
#undef HAVE_DIRENT_H
/* Define
to 1 if you have the `dirfd' function
. */
/* Define
if you have the 'dirfd' function or macro
. */
#undef HAVE_DIRFD
/* Define to 1 if you have the <dlfcn.h> header file. */
...
...
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