]> granicus.if.org Git - python/commitdiff
Issue #4204: Fixed module build errors on FreeBSD 4.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 4 Nov 2008 20:40:09 +0000 (20:40 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 4 Nov 2008 20:40:09 +0000 (20:40 +0000)
Misc/NEWS
Modules/_multiprocessing/multiprocessing.h
Modules/readline.c
configure
configure.in
setup.py

index 1aa57c8e3acdde2f5ea51df85479da6c4c77e559..a430b83dfabc01837b99c5fb1eb3d6b385de9057 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -63,6 +63,8 @@ Build
 
 - Issue #3758: Add ``patchcheck`` build target to .PHONY.
 
+- Issue #4204: Fixed module build errors on FreeBSD 4.
+
 C-API
 -----
 
index 0b327905ea3a9b8f0737842a7ace9548bea42a09..2bfad87501784242287070e23fa815d2ac13f017 100644 (file)
@@ -20,7 +20,9 @@
 #  define SEM_VALUE_MAX LONG_MAX
 #else
 #  include <fcntl.h>                 /* O_CREAT and O_EXCL */
+#  include <netinet/in.h>
 #  include <sys/socket.h>
+#  include <sys/uio.h>
 #  include <arpa/inet.h>             /* htonl() and ntohl() */
 #  if HAVE_SEM_OPEN
 #    include <semaphore.h>
index 90904ab434faac37f7ade09030df7f285bb2d695..f5a54bc08f6964fe49c96e5328be5535dc2ddf51 100644 (file)
 #define completion_matches(x, y) \
        rl_completion_matches((x), ((rl_compentry_func_t *)(y)))
 #else
+#if defined(_RL_FUNCTION_TYPEDEF)
 extern char **completion_matches(char *, rl_compentry_func_t *);
+#else
+extern char **completion_matches(char *, CPFunction *);
+#endif
 #endif
 
 static void
@@ -213,7 +217,11 @@ set_completion_display_matches_hook(PyObject *self, PyObject *args)
           default completion display. */
        rl_completion_display_matches_hook =
                completion_display_matches_hook ?
+#if defined(_RL_FUNCTION_TYPEDEF)
                (rl_compdisp_func_t *)on_completion_display_matches_hook : 0;
+#else
+               (VFunction *)on_completion_display_matches_hook : 0;
+#endif
 #endif
        return result;
 
index f303e1a47309b02263f25e7e3e86acd63e322af7..63d5b1d0c967add55ee6e3226d20c62bfe4cadfc 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 66295 .
+# From configure.in Revision: 66764 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.7.
 #
@@ -2105,11 +2105,18 @@ _ACEOF
   # but used in struct sockaddr.sa_family. Reported by Tim Rice.
   SCO_SV/3.2)
     define_xopen_source=no;;
-  # On FreeBSD 4.8 and 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.*
-  # This should hopefully be fixed in FreeBSD 4.9
-  FreeBSD/4.8* | Darwin/6* )
+  # On FreeBSD 4, the math functions C89 does not cover are never defined
+  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
+  FreeBSD/4.*)
+    define_xopen_source=no;;
+  # 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;;
   # 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
@@ -2121,13 +2128,6 @@ _ACEOF
       define_xopen_source=no
     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
   # defining NI_NUMERICHOST.
   QNX/6.3.2)
index fd8417097c72aacd7f09fbfd47e5db6d228c46ba..8b9d3773ad73f0bfc17062d7f8f7f93552f96d96 100644 (file)
@@ -276,11 +276,18 @@ case $ac_sys_system/$ac_sys_release in
   # but used in struct sockaddr.sa_family. Reported by Tim Rice.
   SCO_SV/3.2)
     define_xopen_source=no;;
-  # On FreeBSD 4.8 and 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.*
-  # This should hopefully be fixed in FreeBSD 4.9
-  FreeBSD/4.8* | Darwin/6* )
+  # On FreeBSD 4, the math functions C89 does not cover are never defined
+  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
+  FreeBSD/4.*)
+    define_xopen_source=no;;
+  # 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;;
   # 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
@@ -292,13 +299,6 @@ case $ac_sys_system/$ac_sys_release in
       define_xopen_source=no
     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
   # defining NI_NUMERICHOST.
   QNX/6.3.2)
index 36a0d77a73f2501b7aecd3ca3415605751aa749c..5c37e4553f2a1c538e852c5fb020fd0cd45fcc48 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1261,7 +1261,7 @@ class PyBuildExt(build_ext):
                 )
             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
             # and has many known problems. (as of June 2008)
             macros = dict(                  # FreeBSD