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
1577cf75
Commit
1577cf75
authored
Jan 21, 2012
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Plain Diff
Improve the test for dirfd(). Some systems #define it rather than
have it as a library function.
parents
d45382db
df300d50
Changes
3
Hide 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 @
1577cf75
...
...
@@ -2242,6 +2242,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
...
...
@@ -2298,52 +2344,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.
...
...
@@ -9396,7 +9396,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 faccessat fchmod fchmodat fchown fchownat
\
clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat
\
fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat
\
futimens futimes gai_strerror
\
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid
\
...
...
@@ -9429,6 +9429,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 @
1577cf75
...
...
@@ -2562,7 +2562,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 faccessat fchmod fchmodat fchown fchownat \
clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
futimens futimes gai_strerror \
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
...
...
@@ -2584,6 +2584,12 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
wcscoll wcsftime wcsxfrm writev _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 @
1577cf75
...
...
@@ -181,7 +181,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