Commit bb86d831 authored by Martin v. Löwis's avatar Martin v. Löwis

Issue #4204: Fixed module build errors on FreeBSD 4.

parent 81e92e58
...@@ -63,6 +63,8 @@ Build ...@@ -63,6 +63,8 @@ Build
- Issue #3758: Add ``patchcheck`` build target to .PHONY. - Issue #3758: Add ``patchcheck`` build target to .PHONY.
- Issue #4204: Fixed module build errors on FreeBSD 4.
C-API C-API
----- -----
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
# define SEM_VALUE_MAX LONG_MAX # define SEM_VALUE_MAX LONG_MAX
#else #else
# include <fcntl.h> /* O_CREAT and O_EXCL */ # include <fcntl.h> /* O_CREAT and O_EXCL */
# include <netinet/in.h>
# include <sys/socket.h> # include <sys/socket.h>
# include <sys/uio.h>
# include <arpa/inet.h> /* htonl() and ntohl() */ # include <arpa/inet.h> /* htonl() and ntohl() */
# if HAVE_SEM_OPEN # if HAVE_SEM_OPEN
# include <semaphore.h> # include <semaphore.h>
......
...@@ -35,7 +35,11 @@ ...@@ -35,7 +35,11 @@
#define completion_matches(x, y) \ #define completion_matches(x, y) \
rl_completion_matches((x), ((rl_compentry_func_t *)(y))) rl_completion_matches((x), ((rl_compentry_func_t *)(y)))
#else #else
#if defined(_RL_FUNCTION_TYPEDEF)
extern char **completion_matches(char *, rl_compentry_func_t *); extern char **completion_matches(char *, rl_compentry_func_t *);
#else
extern char **completion_matches(char *, CPFunction *);
#endif
#endif #endif
static void static void
...@@ -213,7 +217,11 @@ set_completion_display_matches_hook(PyObject *self, PyObject *args) ...@@ -213,7 +217,11 @@ set_completion_display_matches_hook(PyObject *self, PyObject *args)
default completion display. */ default completion display. */
rl_completion_display_matches_hook = rl_completion_display_matches_hook =
completion_display_matches_hook ? completion_display_matches_hook ?
#if defined(_RL_FUNCTION_TYPEDEF)
(rl_compdisp_func_t *)on_completion_display_matches_hook : 0; (rl_compdisp_func_t *)on_completion_display_matches_hook : 0;
#else
(VFunction *)on_completion_display_matches_hook : 0;
#endif
#endif #endif
return result; return result;
......
#! /bin/sh #! /bin/sh
# From configure.in Revision: 66295 . # From configure.in Revision: 66764 .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7. # Generated by GNU Autoconf 2.61 for python 2.7.
# #
...@@ -2105,11 +2105,18 @@ _ACEOF ...@@ -2105,11 +2105,18 @@ _ACEOF
# but used in struct sockaddr.sa_family. Reported by Tim Rice. # but used in struct sockaddr.sa_family. Reported by Tim Rice.
SCO_SV/3.2) SCO_SV/3.2)
define_xopen_source=no;; define_xopen_source=no;;
# On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that # On FreeBSD 4, the math functions C89 does not cover are never defined
# it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently, # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
# this is fixed in 10.3, which identifies itself as Darwin/7.* FreeBSD/4.*)
# This should hopefully be fixed in FreeBSD 4.9 define_xopen_source=no;;
FreeBSD/4.8* | Darwin/6* ) # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
# identifies itself as Darwin/7.*
# On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# disables platform specific features beyond repair.
# On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# has no effect, don't bother defining them
Darwin/[6789].*)
define_xopen_source=no;; define_xopen_source=no;;
# On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
# used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
...@@ -2121,13 +2128,6 @@ _ACEOF ...@@ -2121,13 +2128,6 @@ _ACEOF
define_xopen_source=no define_xopen_source=no
fi fi
;; ;;
# On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# disables platform specific features beyond repair.
# On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# has no effect, don't bother defining them
Darwin/[789].*)
define_xopen_source=no
;;
# On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
# defining NI_NUMERICHOST. # defining NI_NUMERICHOST.
QNX/6.3.2) QNX/6.3.2)
......
...@@ -276,11 +276,18 @@ case $ac_sys_system/$ac_sys_release in ...@@ -276,11 +276,18 @@ case $ac_sys_system/$ac_sys_release in
# but used in struct sockaddr.sa_family. Reported by Tim Rice. # but used in struct sockaddr.sa_family. Reported by Tim Rice.
SCO_SV/3.2) SCO_SV/3.2)
define_xopen_source=no;; define_xopen_source=no;;
# On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that # On FreeBSD 4, the math functions C89 does not cover are never defined
# it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently, # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
# this is fixed in 10.3, which identifies itself as Darwin/7.* FreeBSD/4.*)
# This should hopefully be fixed in FreeBSD 4.9 define_xopen_source=no;;
FreeBSD/4.8* | Darwin/6* ) # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
# identifies itself as Darwin/7.*
# On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# disables platform specific features beyond repair.
# On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# has no effect, don't bother defining them
Darwin/@<:@6789@:>@.*)
define_xopen_source=no;; define_xopen_source=no;;
# On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
# used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
...@@ -292,13 +299,6 @@ case $ac_sys_system/$ac_sys_release in ...@@ -292,13 +299,6 @@ case $ac_sys_system/$ac_sys_release in
define_xopen_source=no define_xopen_source=no
fi fi
;; ;;
# On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# disables platform specific features beyond repair.
# On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# has no effect, don't bother defining them
Darwin/@<:@789@:>@.*)
define_xopen_source=no
;;
# On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
# defining NI_NUMERICHOST. # defining NI_NUMERICHOST.
QNX/6.3.2) QNX/6.3.2)
......
...@@ -1261,7 +1261,7 @@ class PyBuildExt(build_ext): ...@@ -1261,7 +1261,7 @@ class PyBuildExt(build_ext):
) )
libraries = [] libraries = []
elif platform in ('freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'): elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
# FreeBSD's P1003.1b semaphore support is very experimental # FreeBSD's P1003.1b semaphore support is very experimental
# and has many known problems. (as of June 2008) # and has many known problems. (as of June 2008)
macros = dict( # FreeBSD macros = dict( # FreeBSD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment