Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d632050

Browse files
committed
Define _BSD_TYPES. Fixes #1005308. Backported to 2.3.
1 parent 0cb3c63 commit d632050

3 files changed

Lines changed: 73 additions & 6 deletions

File tree

configure

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.462 .
2+
# From configure.in Revision: 1.464 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.57 for python 2.4.
55
#
@@ -1347,6 +1347,14 @@ cat >>confdefs.h <<\_ACEOF
13471347
_ACEOF
13481348

13491349

1350+
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1351+
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1352+
1353+
cat >>confdefs.h <<\_ACEOF
1354+
#define _BSD_TYPES 1
1355+
_ACEOF
1356+
1357+
13501358
define_xopen_source=yes
13511359

13521360
# Arguments passed to configure.
@@ -12351,8 +12359,9 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6
1235112359

1235212360

1235312361

12354-
for ac_func in alarm chown clock confstr ctermid execv \
12355-
fork fpathconf ftime ftruncate \
12362+
12363+
for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
12364+
execv fork fpathconf ftime ftruncate \
1235612365
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
1235712366
getpriority getpwent getsid getwd \
1235812367
kill killpg lchown lstat mkfifo mknod mktime \
@@ -15592,6 +15601,57 @@ rm -f conftest.$ac_objext conftest.$ac_ext
1559215601
echo "$as_me:$LINENO: result: $works" >&5
1559315602
echo "${ECHO_T}$works" >&6
1559415603

15604+
# check for socketpair
15605+
echo "$as_me:$LINENO: checking for socketpair" >&5
15606+
echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
15607+
cat >conftest.$ac_ext <<_ACEOF
15608+
#line $LINENO "configure"
15609+
/* confdefs.h. */
15610+
_ACEOF
15611+
cat confdefs.h >>conftest.$ac_ext
15612+
cat >>conftest.$ac_ext <<_ACEOF
15613+
/* end confdefs.h. */
15614+
15615+
#include <sys/types.h>
15616+
#include <sys/socket.h>
15617+
15618+
int
15619+
main ()
15620+
{
15621+
void *x=socketpair
15622+
;
15623+
return 0;
15624+
}
15625+
_ACEOF
15626+
rm -f conftest.$ac_objext
15627+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15628+
(eval $ac_compile) 2>&5
15629+
ac_status=$?
15630+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631+
(exit $ac_status); } &&
15632+
{ ac_try='test -s conftest.$ac_objext'
15633+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15634+
(eval $ac_try) 2>&5
15635+
ac_status=$?
15636+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637+
(exit $ac_status); }; }; then
15638+
15639+
cat >>confdefs.h <<\_ACEOF
15640+
#define HAVE_SOCKETPAIR 1
15641+
_ACEOF
15642+
15643+
echo "$as_me:$LINENO: result: yes" >&5
15644+
echo "${ECHO_T}yes" >&6
15645+
else
15646+
echo "$as_me: failed program was:" >&5
15647+
sed 's/^/| /' conftest.$ac_ext >&5
15648+
15649+
echo "$as_me:$LINENO: result: no" >&5
15650+
echo "${ECHO_T}no" >&6
15651+
15652+
fi
15653+
rm -f conftest.$ac_objext conftest.$ac_ext
15654+
1559515655
# check if sockaddr has sa_len member
1559615656
echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
1559715657
echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6

configure.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]
5050
# them.
5151
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
5252

53+
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
54+
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
55+
AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
56+
5357
define_xopen_source=yes
5458

5559
# Arguments passed to configure.

pyconfig.h.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,15 @@
428428
/* Define to 1 if you have the `snprintf' function. */
429429
#undef HAVE_SNPRINTF
430430

431-
/* Define to 1 if you have the `socketpair' function. */
432-
#undef HAVE_SOCKETPAIR
433-
434431
/* Define if sockaddr has sa_len member */
435432
#undef HAVE_SOCKADDR_SA_LEN
436433

437434
/* struct sockaddr_storage (sys/socket.h) */
438435
#undef HAVE_SOCKADDR_STORAGE
439436

437+
/* Define if you have the 'socketpair' function. */
438+
#undef HAVE_SOCKETPAIR
439+
440440
/* Define to 1 if you have the `statvfs' function. */
441441
#undef HAVE_STATVFS
442442

@@ -806,6 +806,9 @@
806806
# undef _ALL_SOURCE
807807
#endif
808808

809+
/* Define on Irix to enable u_int */
810+
#undef _BSD_TYPES
811+
809812
/* This must be set to 64 on some systems to enable large file support. */
810813
#undef _FILE_OFFSET_BITS
811814

0 commit comments

Comments
 (0)