python-freebsd.patch (211a8543) python-freebsd.patch (09368832)
1diff -ruN misc/Python-2.7.13/Lib/plat-freebsd9/IN.py misc/build/Python-2.7.13/Lib/plat-freebsd9/IN.py
2--- misc/Python-2.7.13/Lib/plat-freebsd9/IN.py 1969-12-31 19:00:00.000000000 -0500
3+++ misc/build/Python-2.7.13/Lib/plat-freebsd9/IN.py 2016-01-01 17:38:35.922764464 -0500
1diff -ruN misc/Python-2.7.14/Lib/plat-freebsd9/IN.py misc/build/Python-2.7.14/Lib/plat-freebsd9/IN.py
2--- misc/Python-2.7.14/Lib/plat-freebsd9/IN.py 1969-12-31 19:00:00.000000000 -0500
3+++ misc/build/Python-2.7.14/Lib/plat-freebsd9/IN.py 2016-01-01 17:38:35.922764464 -0500
4@@ -0,0 +1,612 @@
5+# Generated by h2py from /usr/include/netinet/in.h
6+
7+# Included from sys/cdefs.h
8+__GNUCLIKE_ASM = 3
9+__GNUCLIKE_ASM = 2
10+__GNUCLIKE___TYPEOF = 1
11+__GNUCLIKE___OFFSETOF = 1

--- 597 unchanged lines hidden (view full) ---

609+IPV6CTL_ISATAPRTR = 43
610+IPV6CTL_MCAST_PMTU = 44
611+IPV6CTL_STEALTH = 45
612+ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47
613+IPV6CTL_NO_RADR = 48
614+IPV6CTL_NORBIT_RAIF = 49
615+IPV6CTL_RFC6204W3 = 50
616+IPV6CTL_MAXID = 51
4@@ -0,0 +1,612 @@
5+# Generated by h2py from /usr/include/netinet/in.h
6+
7+# Included from sys/cdefs.h
8+__GNUCLIKE_ASM = 3
9+__GNUCLIKE_ASM = 2
10+__GNUCLIKE___TYPEOF = 1
11+__GNUCLIKE___OFFSETOF = 1

--- 597 unchanged lines hidden (view full) ---

609+IPV6CTL_ISATAPRTR = 43
610+IPV6CTL_MCAST_PMTU = 44
611+IPV6CTL_STEALTH = 45
612+ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47
613+IPV6CTL_NO_RADR = 48
614+IPV6CTL_NORBIT_RAIF = 49
615+IPV6CTL_RFC6204W3 = 50
616+IPV6CTL_MAXID = 51
617diff -ruN misc/Python-2.7.13/Lib/plat-freebsd9/regen misc/build/Python-2.7.13/Lib/plat-freebsd9/regen
618--- misc/Python-2.7.13/Lib/plat-freebsd9/regen 1969-12-31 19:00:00.000000000 -0500
619+++ misc/build/Python-2.7.13/Lib/plat-freebsd9/regen 2016-01-01 17:38:35.922764464 -0500
617diff -ruN misc/Python-2.7.14/Lib/plat-freebsd9/regen misc/build/Python-2.7.14/Lib/plat-freebsd9/regen
618--- misc/Python-2.7.14/Lib/plat-freebsd9/regen 1969-12-31 19:00:00.000000000 -0500
619+++ misc/build/Python-2.7.14/Lib/plat-freebsd9/regen 2016-01-01 17:38:35.922764464 -0500
620@@ -0,0 +1,3 @@
621+#! /bin/sh
622+set -v
623+python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
620@@ -0,0 +1,3 @@
621+#! /bin/sh
622+set -v
623+python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
624diff -ruN misc/Python-2.7.13/Lib/test/test_threading.py misc/build/Python-2.7.13/Lib/test/test_threading.py
625--- misc/Python-2.7.13/Lib/test/test_threading.py 2014-06-29 21:05:37.000000000 -0500
626+++ misc/build/Python-2.7.13/Lib/test/test_threading.py 2016-01-01 17:38:35.923764731 -0500
624diff -ruN misc/Python-2.7.14/Lib/test/test_threading.py misc/build/Python-2.7.14/Lib/test/test_threading.py
625--- misc/Python-2.7.14/Lib/test/test_threading.py 2014-06-29 21:05:37.000000000 -0500
626+++ misc/build/Python-2.7.14/Lib/test/test_threading.py 2016-01-01 17:38:35.923764731 -0500
627@@ -486,7 +486,7 @@
628 # #12316 and #11870), and fork() from a worker thread is known to trigger
629 # problems with some operating systems (issue #3863): skip problematic tests
630 # on platforms known to behave badly.
631- platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
632+ platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'netbsd5',
633 'os2emx')
634
635 def _run_and_join(self, script):
627@@ -486,7 +486,7 @@
628 # #12316 and #11870), and fork() from a worker thread is known to trigger
629 # problems with some operating systems (issue #3863): skip problematic tests
630 # on platforms known to behave badly.
631- platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
632+ platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'netbsd5',
633 'os2emx')
634
635 def _run_and_join(self, script):
636diff -ruN misc/Python-2.7.13/Modules/fcntlmodule.c misc/build/Python-2.7.13/Modules/fcntlmodule.c
637--- misc/Python-2.7.13/Modules/fcntlmodule.c 2014-06-29 21:05:43.000000000 -0500
638+++ misc/build/Python-2.7.13/Modules/fcntlmodule.c 2016-01-01 17:42:35.865747022 -0500
636diff -ruN misc/Python-2.7.14/Modules/fcntlmodule.c misc/build/Python-2.7.14/Modules/fcntlmodule.c
637--- misc/Python-2.7.14/Modules/fcntlmodule.c 2014-06-29 21:05:43.000000000 -0500
638+++ misc/build/Python-2.7.14/Modules/fcntlmodule.c 2016-01-01 17:42:35.865747022 -0500
639@@ -98,20 +98,15 @@
640 {
641 #define IOCTL_BUFSZ 1024
642 int fd;
643- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
644+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
645 format for the 'code' parameter because Python turns 0x8000000
646 into either a large positive number (PyLong or PyInt on 64-bit

--- 35 unchanged lines hidden (view full) ---

682 PyErr_Clear();
683 arg = 0;
684 if (!PyArg_ParseTuple(args,
685- "O&I|i;ioctl requires a file or file descriptor,"
686+ "O&k|i;ioctl requires a file or file descriptor,"
687 " an integer and optionally an integer or buffer argument",
688 conv_descriptor, &fd, &code, &arg)) {
689 return NULL;
639@@ -98,20 +98,15 @@
640 {
641 #define IOCTL_BUFSZ 1024
642 int fd;
643- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
644+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
645 format for the 'code' parameter because Python turns 0x8000000
646 into either a large positive number (PyLong or PyInt on 64-bit

--- 35 unchanged lines hidden (view full) ---

682 PyErr_Clear();
683 arg = 0;
684 if (!PyArg_ParseTuple(args,
685- "O&I|i;ioctl requires a file or file descriptor,"
686+ "O&k|i;ioctl requires a file or file descriptor,"
687 " an integer and optionally an integer or buffer argument",
688 conv_descriptor, &fd, &code, &arg)) {
689 return NULL;
690diff -ruN misc/Python-2.7.13/Python/thread_pthread.h misc/build/Python-2.7.13/Python/thread_pthread.h
691--- misc/Python-2.7.13/Python/thread_pthread.h 2014-06-29 21:05:47.000000000 -0500
692+++ misc/build/Python-2.7.13/Python/thread_pthread.h 2016-01-01 17:38:35.933764047 -0500
690diff -ruN misc/Python-2.7.14/Python/thread_pthread.h misc/build/Python-2.7.14/Python/thread_pthread.h
691--- misc/Python-2.7.14/Python/thread_pthread.h 2014-06-29 21:05:47.000000000 -0500
692+++ misc/build/Python-2.7.14/Python/thread_pthread.h 2016-01-01 17:38:35.933764047 -0500
693@@ -38,13 +38,18 @@
694 #endif
695 #endif
696
697+#ifdef __FreeBSD__
698+#include <osreldate.h>
699+#endif
700+

--- 37 unchanged lines hidden (view full) ---

738@@ -201,6 +208,7 @@
739 (void *)arg
740 );
741
742+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
743 #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
744 pthread_attr_destroy(&attrs);
745 #endif
693@@ -38,13 +38,18 @@
694 #endif
695 #endif
696
697+#ifdef __FreeBSD__
698+#include <osreldate.h>
699+#endif
700+

--- 37 unchanged lines hidden (view full) ---

738@@ -201,6 +208,7 @@
739 (void *)arg
740 );
741
742+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
743 #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
744 pthread_attr_destroy(&attrs);
745 #endif
746diff -ruN misc/Python-2.7.13/configure misc/build/Python-2.7.13/configure
747--- misc/Python-2.7.13/configure 2014-06-29 21:05:48.000000000 -0500
748+++ misc/build/Python-2.7.13/configure 2016-01-01 17:41:32.541753889 -0500
746diff -ruN misc/Python-2.7.14/configure misc/build/Python-2.7.14/configure
747--- misc/Python-2.7.14/configure 2014-06-29 21:05:48.000000000 -0500
748+++ misc/build/Python-2.7.14/configure 2016-01-01 17:41:32.541753889 -0500
749@@ -5435,7 +5435,7 @@
750 ;;
751 SunOS*)
752 LDLIBRARY='libpython$(VERSION).so'
753- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
754+ BLDLIBRARY=-R\'\$\$ORIGIN\'' -L. -lpython$(VERSION)'
755 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
756 INSTSONAME="$LDLIBRARY".$SOVERSION

--- 5 unchanged lines hidden (view full) ---

762- case $ac_sys_system in
763- FreeBSD*)
764- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
765- ;;
766- esac
767 INSTSONAME="$LDLIBRARY".$SOVERSION
768 ;;
769 hp*|HP*)
749@@ -5435,7 +5435,7 @@
750 ;;
751 SunOS*)
752 LDLIBRARY='libpython$(VERSION).so'
753- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
754+ BLDLIBRARY=-R\'\$\$ORIGIN\'' -L. -lpython$(VERSION)'
755 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
756 INSTSONAME="$LDLIBRARY".$SOVERSION

--- 5 unchanged lines hidden (view full) ---

762- case $ac_sys_system in
763- FreeBSD*)
764- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
765- ;;
766- esac
767 INSTSONAME="$LDLIBRARY".$SOVERSION
768 ;;
769 hp*|HP*)
770diff -ruN misc/Python-2.7.13/setup.py misc/build/Python-2.7.13/setup.py
771--- misc/Python-2.7.13/setup.py 2014-06-29 21:05:48.000000000 -0500
772+++ misc/build/Python-2.7.13/setup.py 2016-01-01 17:38:35.945765223 -0500
773@@ -1573,7 +1573,7 @@
770diff -ruN misc/Python-2.7.14/setup.py misc/build/Python-2.7.14/setup.py
771--- misc/Python-2.7.14/setup.py 2014-06-29 21:05:48.000000000 -0500
772+++ misc/build/Python-2.7.14/setup.py 2016-01-01 17:38:35.945765223 -0500
773@@ -1576,7 +1576,7 @@
774 macros = dict()
775 libraries = []
776
777- elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
778+ elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9'):
779 # FreeBSD's P1003.1b semaphore support is very experimental
780 # and has many known problems. (as of June 2008)
781 macros = dict()
774 macros = dict()
775 libraries = []
776
777- elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
778+ elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9'):
779 # FreeBSD's P1003.1b semaphore support is very experimental
780 # and has many known problems. (as of June 2008)
781 macros = dict()
782@@ -1625,7 +1625,7 @@
782@@ -1628,7 +1628,7 @@
783 missing.append('linuxaudiodev')
784
785 if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
786- 'freebsd7', 'freebsd8')
787+ 'freebsd7', 'freebsd8', 'freebsd9')
788 or host_platform.startswith("gnukfreebsd")):
789 exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
790 else:
783 missing.append('linuxaudiodev')
784
785 if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
786- 'freebsd7', 'freebsd8')
787+ 'freebsd7', 'freebsd8', 'freebsd9')
788 or host_platform.startswith("gnukfreebsd")):
789 exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
790 else: