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
f95dd0a2
Commit
f95dd0a2
authored
Aug 15, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix portability problems with glibc 2.0, as reported in #449157.
parent
834a85a2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
4 deletions
+23
-4
Modules/_localemodule.c
Modules/_localemodule.c
+3
-0
Modules/addrinfo.h
Modules/addrinfo.h
+6
-1
Modules/getnameinfo.c
Modules/getnameinfo.c
+4
-0
Modules/socketmodule.c
Modules/socketmodule.c
+4
-0
configure
configure
+2
-2
configure.in
configure.in
+1
-1
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Modules/_localemodule.c
View file @
f95dd0a2
...
...
@@ -527,6 +527,8 @@ init_locale(void)
ADDINT
(
ABMON_11
);
ADDINT
(
ABMON_12
);
#ifdef RADIXCHAR
/* The following are not available with glibc 2.0 */
ADDINT
(
RADIXCHAR
);
ADDINT
(
THOUSEP
);
/* YESSTR and NOSTR are deprecated in glibc, since they are
...
...
@@ -537,6 +539,7 @@ init_locale(void)
ADDINT(NOSTR);
*/
ADDINT
(
CRNCYSTR
);
#endif
ADDINT
(
D_T_FMT
);
ADDINT
(
D_FMT
);
...
...
Modules/addrinfo.h
View file @
f95dd0a2
...
...
@@ -67,6 +67,10 @@
#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
#endif
#endif
/* HAVE_GETADDRINFO */
#ifndef HAVE_GETNAMEINFO
/*
* Constants for getnameinfo()
*/
...
...
@@ -86,6 +90,8 @@
#define NI_DGRAM 0x00000010
#endif
#endif
/* HAVE_GETNAMEINFO */
#ifndef HAVE_ADDRINFO
struct
addrinfo
{
int
ai_flags
;
/* AI_PASSIVE, AI_CANONNAME */
...
...
@@ -137,4 +143,3 @@ extern void freehostent Py_PROTO((struct hostent *));
#ifdef __cplusplus
}
#endif
#endif
Modules/getnameinfo.c
View file @
f95dd0a2
...
...
@@ -81,6 +81,10 @@ struct gni_sockinet {
#define ENI_FAMILY 5
#define ENI_SALEN 6
/* forward declaration to make gcc happy */
int
getnameinfo
Py_PROTO
((
const
struct
sockaddr
*
,
size_t
,
char
*
,
size_t
,
char
*
,
size_t
,
int
));
int
getnameinfo
(
sa
,
salen
,
host
,
hostlen
,
serv
,
servlen
,
flags
)
const
struct
sockaddr
*
sa
;
...
...
Modules/socketmodule.c
View file @
f95dd0a2
...
...
@@ -447,7 +447,11 @@ PyGAI_Err(int error)
if
(
error
==
EAI_SYSTEM
)
return
PySocket_Err
();
#ifdef HAVE_GAI_STRERROR
v
=
Py_BuildValue
(
"(is)"
,
error
,
gai_strerror
(
error
));
#else
v
=
Py_BuildValue
(
"(is)"
,
error
,
"getaddrinfo failed"
);
#endif
if
(
v
!=
NULL
)
{
PyErr_SetObject
(
PyGAI_Error
,
v
);
Py_DECREF
(
v
);
...
...
configure
View file @
f95dd0a2
#! /bin/sh
# From configure.in Revision: 1.24
5
# From configure.in Revision: 1.24
6
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
...
...
@@ -4570,7 +4570,7 @@ echo "$ac_t""MACHDEP_OBJS" 1>&6
# checks for library functions
for
ac_func
in
alarm
chown
clock confstr ctermid ctermid_r execv
\
flock fork fsync fdatasync fpathconf ftime ftruncate
\
getgroups getlogin getpeername getpid getpwent getwd
\
g
ai_strerror g
etgroups getlogin getpeername getpid getpwent getwd
\
hstrerror inet_pton
kill link
lstat
mkfifo
mktime mremap
\
nice
pathconf pause plock poll pthread_init
\
putenv
readlink
\
...
...
configure.in
View file @
f95dd0a2
...
...
@@ -1236,7 +1236,7 @@ AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
AC_CHECK_FUNCS(alarm chown clock confstr ctermid ctermid_r execv \
flock fork fsync fdatasync fpathconf ftime ftruncate \
getgroups getlogin getpeername getpid getpwent getwd \
g
ai_strerror g
etgroups getlogin getpeername getpid getpwent getwd \
hstrerror inet_pton kill link lstat mkfifo mktime mremap \
nice pathconf pause plock poll pthread_init \
putenv readlink \
...
...
pyconfig.h.in
View file @
f95dd0a2
...
...
@@ -371,6 +371,9 @@
/* Define if you have the ftruncate function. */
#undef HAVE_FTRUNCATE
/* Define if you have the gai_strerror function. */
#undef HAVE_GAI_STRERROR
/* Define if you have the getaddrinfo function. */
#undef HAVE_GETADDRINFO
...
...
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