fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / python3 / i100492-freebsd.patch.1
blob7189a7e81956f5d9fd698484e2d9107402cc9d6e
1 FreeBSD porting fixes, patch by maho@openoffice.org
3 --- Python-3.3.0/configure      2012-11-28 09:00:41.094955090 +0000
4 +++ Python-3.3.0/configure      2012-11-28 09:01:13.033329526 +0000
5 @@ -5545,11 +5545,6 @@
6           LDLIBRARY='libpython$(LDVERSION).so'
7           BLDLIBRARY='-L. -lpython$(LDVERSION)'
8           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
9 -         case $ac_sys_system in
10 -             FreeBSD*)
11 -               SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
12 -               ;;
13 -         esac
14           INSTSONAME="$LDLIBRARY".$SOVERSION
15           if test "$with_pydebug" != yes
16            then
17 --- Python-3.3.0/Lib/test/test_threading.py     2012-11-28 09:00:41.292957412 +0000
18 +++ Python-3.3.0/Lib/test/test_threading.py     2012-11-28 09:01:13.017329339 +0000
19 @@ -451,7 +451,7 @@
20      # #12316 and #11870), and fork() from a worker thread is known to trigger
21      # problems with some operating systems (issue #3863): skip problematic tests
22      # on platforms known to behave badly.
23 -    platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
24 +    platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
25                           'os2emx', 'hp-ux11')
27      def _run_and_join(self, script):
28 --- Python-3.3.0/Python/thread_pthread.h        2012-11-28 09:00:41.097955124 +0000
29 +++ Python-3.3.0/Python/thread_pthread.h        2012-11-28 09:01:13.018329351 +0000
30 @@ -42,6 +42,10 @@
31  #endif
32  #endif
34 +#ifdef __FreeBSD__
35 +#include <osreldate.h>
36 +#endif
38  /* The POSIX spec says that implementations supporting the sem_*
39     family of functions must indicate this by defining
40     _POSIX_SEMAPHORES. */
41 @@ -60,7 +64,6 @@
42     in default setting.  So the process scope is preferred to get
43     enough number of threads to work. */
44  #ifdef __FreeBSD__
45 -#include <osreldate.h>
46  #if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
47  #undef PTHREAD_SYSTEM_SCHED_SUPPORTED
48  #endif
49 @@ -186,6 +189,9 @@
50  {
51      pthread_t th;
52      int status;
53 +#ifdef __FreeBSD__
54 +       sigset_t set, oset;
55 +#endif
56  #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
57      pthread_attr_t attrs;
58  #endif
59 @@ -214,7 +220,10 @@
60  #if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
61      pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
62  #endif
64 +#ifdef __FreeBSD__
65 +       sigfillset(&set);
66 +       SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
67 +#endif
68      status = pthread_create(&th,
69  #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
70                               &attrs,
71 @@ -225,6 +234,9 @@
72                               (void *)arg
73                               );
75 +#ifdef __FreeBSD__
76 +       SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
77 +#endif
78  #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
79      pthread_attr_destroy(&attrs);
80  #endif