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
e9416176
Commit
e9416176
authored
May 03, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #724588: Check whether the address of hstrerror and inet_pton can
be taken, and define NI_MAX{HOST|SERV} if necessary.
parent
e6bbb4d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
11 deletions
+209
-11
Modules/socketmodule.c
Modules/socketmodule.c
+10
-0
configure
configure
+161
-7
configure.in
configure.in
+35
-1
pyconfig.h.in
pyconfig.h.in
+3
-3
No files found.
Modules/socketmodule.c
View file @
e9416176
...
...
@@ -293,6 +293,16 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define SEGMENT_SIZE 65535
#endif
/*
* Constants for getnameinfo()
*/
#if !defined(NI_MAXHOST)
#define NI_MAXHOST 1025
#endif
#if !defined(NI_MAXSERV)
#define NI_MAXSERV 32
#endif
/* XXX There's a problem here: *static* functions are not supposed to have
a Py prefix (or use CapitalizedWords). Later... */
...
...
configure
View file @
e9416176
#! /bin/sh
# From configure.in Revision: 1.40
0
.
# From configure.in Revision: 1.40
1
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
...
...
@@ -908,7 +908,7 @@ esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir
=
`
cd
"
$ac_dir
"
&&
cd
$ac_builddir
&&
pwd
`
ac_abs_top_builddir
=
`
cd
"
$ac_dir
"
&&
cd
$
ac_top_builddir
&&
pwd
`
ac_abs_top_builddir
=
`
cd
"
$ac_dir
"
&&
cd
$
{
ac_top_builddir
}
.
&&
pwd
`
ac_abs_srcdir
=
`
cd
"
$ac_dir
"
&&
cd
$ac_srcdir
&&
pwd
`
ac_abs_top_srcdir
=
`
cd
"
$ac_dir
"
&&
cd
$ac_top_srcdir
&&
pwd
`
...
...
@@ -12105,9 +12105,6 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
...
...
@@ -12116,7 +12113,7 @@ for ac_func in alarm chown clock confstr ctermid execv \
fchdir fork fsync fdatasync fpathconf ftime ftruncate
\
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid
\
getpriority getpwent getwd
\
hstrerror inet_aton inet_pton
kill
killpg lchown lstat
mkfifo mknod
mktime
\
kill
killpg lchown lstat
mkfifo mknod
mktime
\
mremap
nice
pathconf pause plock poll pthread_init
\
putenv
readlink realpath
\
select
setegid seteuid setgid
\
...
...
@@ -12502,6 +12499,163 @@ echo "${ECHO_T}no" >&6
fi
rm
-f
conftest.
$ac_objext
conftest.
$ac_ext
echo
"
$as_me
:
$LINENO
: checking for hstrerror"
>
&5
echo
$ECHO_N
"checking for hstrerror...
$ECHO_C
"
>
&6
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <netdb.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
void* p = hstrerror
;
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_HSTRERROR 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 inet_aton"
>
&5
echo
$ECHO_N
"checking for inet_aton...
$ECHO_C
"
>
&6
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
void* p = inet_aton
;
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_INET_ATON 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 inet_pton"
>
&5
echo
$ECHO_N
"checking for inet_pton...
$ECHO_C
"
>
&6
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
void* p = inet_pton
;
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_INET_PTON 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
...
...
@@ -17828,7 +17982,7 @@ esac
# Don't blindly perform a `cd "
$ac_dir
"/
$ac_foo
&& pwd` since
$ac_foo
can be
# absolute.
ac_abs_builddir=`cd "
$ac_dir
" && cd
$ac_builddir
&& pwd`
ac_abs_top_builddir=`cd "
$ac_dir
" && cd
$
ac_top_builddir
&& pwd`
ac_abs_top_builddir=`cd "
$ac_dir
" && cd
$
{
ac_top_builddir
}
.
&& pwd`
ac_abs_srcdir=`cd "
$ac_dir
" && cd
$ac_srcdir
&& pwd`
ac_abs_top_srcdir=`cd "
$ac_dir
" && cd
$ac_top_srcdir
&& pwd`
...
...
configure.in
View file @
e9416176
...
...
@@ -1857,7 +1857,7 @@ AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \
fchdir fork fsync fdatasync fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getpwent getwd \
hstrerror inet_aton inet_pton
kill killpg lchown lstat mkfifo mknod mktime \
kill killpg lchown lstat mkfifo mknod mktime \
mremap nice pathconf pause plock poll pthread_init \
putenv readlink realpath \
select setegid seteuid setgid \
...
...
@@ -1923,6 +1923,40 @@ AC_TRY_COMPILE([
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for hstrerror)
AC_TRY_COMPILE([
#include "confdefs.h"
#include <netdb.h>
], void* p = hstrerror,
AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for inet_aton)
AC_TRY_COMPILE([
#include "confdefs.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
], void* p = inet_aton,
AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for inet_pton)
AC_TRY_COMPILE([
#include "confdefs.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
], void* p = inet_pton,
AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for setgroups)
AC_TRY_COMPILE([
#include "confdefs.h"
...
...
pyconfig.h.in
View file @
e9416176
...
...
@@ -207,16 +207,16 @@
/* Define to 1 if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* Define
to 1 if you have the `
hstrerror' function. */
/* Define
if you have the '
hstrerror' function. */
#undef HAVE_HSTRERROR
/* Define to 1 if you have the `hypot' function. */
#undef HAVE_HYPOT
/* Define
to 1 if you have the `
inet_aton' function. */
/* Define
if you have the '
inet_aton' function. */
#undef HAVE_INET_ATON
/* Define
to 1 if you have the `
inet_pton' function. */
/* Define
if you have the '
inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the <inttypes.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