]> granicus.if.org Git - python/commitdiff
Merged revisions 67098 via svnmerge from
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 4 Nov 2008 20:45:29 +0000 (20:45 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 4 Nov 2008 20:45:29 +0000 (20:45 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67098 | martin.v.loewis | 2008-11-04 21:40:09 +0100 (Di, 04 Nov 2008) | 2 lines

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

Misc/NEWS
Modules/_multiprocessing/multiprocessing.h
Modules/readline.c
configure
configure.in
setup.py

index 6d61192fb545e9f8f5cc92bb1819650ee352733f..7de06851fc077ae2cf78a69043274f261eeb7dd1 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -96,6 +96,8 @@ Build
 
 - Issue #4018: Disable "for me" installations on Vista.
 
+- Issue #4204: Fixed module build errors on FreeBSD 4.
+
 Tools/Demos
 -----------
 
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 837194208ff546a1b623fe2a187f4659ef45b1a7..22f3dc049422cded85a0f338f4f1c103eaf19ba0 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 b65632ce37672225f0276259a7e25325331c6721..08b3c1ebe1b1d0732baff83a724717fcdb5c2377 100755 (executable)
--- a/configure
+++ b/configure
@@ -2098,11 +2098,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
@@ -2114,13 +2121,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 fe3c34422b6e34fd9e1d6e05e8788012a2abbdc5..f34ffd8420f1d31069b09e2c943d0ee9b3d3a5d1 100644 (file)
@@ -275,11 +275,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
@@ -291,13 +298,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 90afb75da82a188378f8f9e1759cdd9f699f9f67..d2931d16922135869f524716d3340ad1f37a7f30 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1011,7 +1011,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