FreeBSD 5.x has moved some library routines and typedefs outside the

scope of the _XOPEN_SOURCE and _POSIX_C_SOURCE symbols, including:
- getloadavg()
- typedefs for u_int, u_long, u_char, u_short, ushort & uint

These are now all defined under the control of a __BSD_VISIBLE symbol.

The lack of the typedefs causes several extension modules to build
incorrectly or not at all, and is the cause of failures reported for
test_socket and test_tempfile on this platform
(see python-dev: 29/6/03, pieterb@gewis.nl, "Running tests on freebsd5")

This change does not appear to be needed in the 2.2 branch.
This commit is contained in:
Andrew MacIntyre 2003-07-02 13:53:25 +00:00
parent 1ec0bdf899
commit abccf41a7d
3 changed files with 20 additions and 3 deletions

15
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.in Revision: 1.418 . # From configure.in Revision: 1.419 .
# 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.
# #
@ -908,7 +908,7 @@ esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute. # absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` 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_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
@ -1265,6 +1265,15 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF _ACEOF
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
# them.
cat >>confdefs.h <<\_ACEOF
#define __BSD_VISIBLE 1
_ACEOF
define_xopen_source=yes define_xopen_source=yes
# Arguments passed to configure. # Arguments passed to configure.
@ -18441,7 +18450,7 @@ esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute. # absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` 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_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`

View File

@ -45,6 +45,11 @@ AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
# them. # them.
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]) AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
# them.
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
define_xopen_source=yes define_xopen_source=yes
# Arguments passed to configure. # Arguments passed to configure.

View File

@ -829,6 +829,9 @@
/* Define on NetBSD to activate all library features */ /* Define on NetBSD to activate all library features */
#undef _NETBSD_SOURCE #undef _NETBSD_SOURCE
/* Define on FreeBSD to activate all library features */
#undef __BSD_VISIBLE
/* Define _OSF_SOURCE to get the makedev macro. */ /* Define _OSF_SOURCE to get the makedev macro. */
#undef _OSF_SOURCE #undef _OSF_SOURCE