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
d584368d
Commit
d584368d
authored
Nov 21, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #639371: Remove FreeBSD 5 specific test, test for ctermid_r, setgroups
prototypes explicitly.
parent
fec32626
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
17 deletions
+142
-17
configure
configure
+111
-9
configure.in
configure.in
+29
-6
pyconfig.h.in
pyconfig.h.in
+2
-2
No files found.
configure
View file @
d584368d
#! /bin/sh
#! /bin/sh
# From configure.in Revision: 1.3
69
.
# From configure.in Revision: 1.3
70
.
# Guess values for system-dependent variables and create Makefiles.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
#
...
@@ -1341,10 +1341,6 @@ case $ac_sys_system/$ac_sys_release in
...
@@ -1341,10 +1341,6 @@ case $ac_sys_system/$ac_sys_release in
# even though select is a POSIX function. Reported by J. Ribbens.
# even though select is a POSIX function. Reported by J. Ribbens.
OpenBSD/2.
*
|
OpenBSD/3.[012]
)
OpenBSD/2.
*
|
OpenBSD/3.[012]
)
define_xopen_source
=
no
;;
define_xopen_source
=
no
;;
# On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE
# is define. Reported by M. Recht.
FreeBSD/5.0
*
)
define_xopen_source
=
no
;;
esac
esac
if
test
$define_xopen_source
=
yes
if
test
$define_xopen_source
=
yes
...
@@ -11988,15 +11984,13 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
...
@@ -11988,15 +11984,13 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
for
ac_func
in
alarm
chown
clock confstr ctermid execv
\
for
ac_func
in
alarm
chown
clock confstr ctermid ctermid_r execv
\
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate
\
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd
\
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd
\
hstrerror inet_pton
kill
killpg lchown lstat
mkfifo mknod
mktime
\
hstrerror inet_pton
kill
killpg lchown lstat
mkfifo mknod
mktime
\
mremap
nice
pathconf pause plock poll pthread_init
\
mremap
nice
pathconf pause plock poll pthread_init
\
putenv
readlink
\
putenv
readlink
\
select
setegid seteuid setgid
setgroups
\
select
setegid seteuid setgid
\
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf
\
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf
\
sigaction siginterrupt sigrelse strftime strptime
\
sigaction siginterrupt sigrelse strftime strptime
\
sysconf tcgetpgrp tcsetpgrp tempnam timegm
times
tmpfile tmpnam tmpnam_r
\
sysconf tcgetpgrp tcsetpgrp tempnam timegm
times
tmpfile tmpnam tmpnam_r
\
...
@@ -12220,6 +12214,114 @@ echo "${ECHO_T}no" >&6
...
@@ -12220,6 +12214,114 @@ echo "${ECHO_T}no" >&6
fi
fi
rm
-f
conftest.
$ac_objext
conftest.
$ac_ext
rm
-f
conftest.
$ac_objext
conftest.
$ac_ext
# On some systems (eg. FreeBSD 5), we would find a definition of the
# functions ctermid_r, setgroups in the library, but no prototype
# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
# address to avoid compiler warnings and potential miscompilations
# because of the missing prototypes.
echo
"
$as_me
:
$LINENO
: checking for ctermid_r"
>
&5
echo
$ECHO_N
"checking for ctermid_r...
$ECHO_C
"
>
&6
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <stdio.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
void* p = ctermid_r
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_compile
\"
"
)
>
&5
(
eval
$ac_compile
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -s conftest.$ac_objext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_CTERMID_R 1
_ACEOF
echo
"
$as_me
:
$LINENO
: result: yes"
>
&5
echo
"
${
ECHO_T
}
yes"
>
&6
else
echo
"
$as_me
: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
echo
"
$as_me
:
$LINENO
: result: no"
>
&5
echo
"
${
ECHO_T
}
no"
>
&6
fi
rm
-f
conftest.
$ac_objext
conftest.
$ac_ext
echo
"
$as_me
:
$LINENO
: checking for setgroups"
>
&5
echo
$ECHO_N
"checking for setgroups...
$ECHO_C
"
>
&6
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <unistd.h.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
void* p = setgroups
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_compile
\"
"
)
>
&5
(
eval
$ac_compile
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -s conftest.$ac_objext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_SETGROUPS 1
_ACEOF
echo
"
$as_me
:
$LINENO
: result: yes"
>
&5
echo
"
${
ECHO_T
}
yes"
>
&6
else
echo
"
$as_me
: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
echo
"
$as_me
:
$LINENO
: result: no"
>
&5
echo
"
${
ECHO_T
}
no"
>
&6
fi
rm
-f
conftest.
$ac_objext
conftest.
$ac_ext
# check for openpty and forkpty
# check for openpty and forkpty
...
...
configure.in
View file @
d584368d
...
@@ -120,10 +120,6 @@ case $ac_sys_system/$ac_sys_release in
...
@@ -120,10 +120,6 @@ case $ac_sys_system/$ac_sys_release in
# even though select is a POSIX function. Reported by J. Ribbens.
# even though select is a POSIX function. Reported by J. Ribbens.
OpenBSD/2.* | OpenBSD/3.@<:@012@:>@)
OpenBSD/2.* | OpenBSD/3.@<:@012@:>@)
define_xopen_source=no;;
define_xopen_source=no;;
# On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE
# is define. Reported by M. Recht.
FreeBSD/5.0*)
define_xopen_source=no;;
esac
esac
if test $define_xopen_source = yes
if test $define_xopen_source = yes
...
@@ -1740,13 +1736,13 @@ fi
...
@@ -1740,13 +1736,13 @@ fi
AC_MSG_RESULT(MACHDEP_OBJS)
AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
# checks for library functions
AC_CHECK_FUNCS(alarm chown clock confstr ctermid
ctermid_r
execv \
AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
mremap nice pathconf pause plock poll pthread_init \
mremap nice pathconf pause plock poll pthread_init \
putenv readlink \
putenv readlink \
select setegid seteuid setgid
setgroups
\
select setegid seteuid setgid \
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
sigaction siginterrupt sigrelse strftime strptime \
sigaction siginterrupt sigrelse strftime strptime \
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
...
@@ -1773,6 +1769,33 @@ AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink,
...
@@ -1773,6 +1769,33 @@ AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink,
AC_MSG_RESULT(no)
AC_MSG_RESULT(no)
)
)
# On some systems (eg. FreeBSD 5), we would find a definition of the
# functions ctermid_r, setgroups in the library, but no prototype
# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
# address to avoid compiler warnings and potential miscompilations
# because of the missing prototypes.
AC_MSG_CHECKING(for ctermid_r)
AC_TRY_COMPILE([
#include "confdefs.h"
#include <stdio.h>
], void* p = ctermid_r,
AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for setgroups)
AC_TRY_COMPILE([
#include "confdefs.h"
#include <unistd.h.h>
],
void* p = setgroups,
AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
# check for openpty and forkpty
# check for openpty and forkpty
AC_CHECK_FUNCS(openpty,, AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"]))
AC_CHECK_FUNCS(openpty,, AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"]))
...
...
pyconfig.h.in
View file @
d584368d
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
/* Define to 1 if you have the `ctermid' function. */
/* Define to 1 if you have the `ctermid' function. */
#undef HAVE_CTERMID
#undef HAVE_CTERMID
/* Define
to 1 if you have the `
ctermid_r' function. */
/* Define
if you have the '
ctermid_r' function. */
#undef HAVE_CTERMID_R
#undef HAVE_CTERMID_R
/* Define to 1 if you have the device macros. */
/* Define to 1 if you have the device macros. */
...
@@ -348,7 +348,7 @@
...
@@ -348,7 +348,7 @@
/* Define to 1 if you have the `setgid' function. */
/* Define to 1 if you have the `setgid' function. */
#undef HAVE_SETGID
#undef HAVE_SETGID
/* Define
to 1 if you have the `
setgroups' function. */
/* Define
if you have the '
setgroups' function. */
#undef HAVE_SETGROUPS
#undef HAVE_SETGROUPS
/* Define to 1 if you have the `setlocale' function. */
/* Define to 1 if you have the `setlocale' function. */
...
...
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