components/python/python27/patches/16-ossaudiodev.patch
author John Beck <John.Beck@Oracle.COM>
Mon, 06 Oct 2014 13:15:36 -0700
branchs11u2-sru
changeset 3379 e99da14b537a
child 3565 2d729d36ded7
permissions -rw-r--r--
PSARC 2014/183 Python 2.7.6 18251953 update Python 2.7 line to version 2.7.6 19004605 update Python 2.7 line to version 2.7.7 19308541 update Python 2.7 line to version 2.7.8 19284990 python 2.7.7 segfaults while under memory stress 17431625 64-bit python should use long rather than int for os.sysconf() return value 19164544 Python 2.7 test_tcl fails 19030238 Python 2.7 test_sysconfig fails - no module named _osx_support 19030198 Python 2.7 tests fail - import name error 19032456 more Python 2.7 tests failing with import errors 19022543 Python 2.7 test_lib2to3 fails
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3379
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
This patch is needed to make Python understand it can build the OSS plugin.  
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
Some OSS ioctls are not supported on Solaris, so they are ifdef'f out.  As
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
the patch is Solaris-specific, it is not suitable for upstream.
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
--- Python-2.7.7/Modules/ossaudiodev.c.~1~	2014-05-31 11:58:40.000000000 -0700
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
+++ Python-2.7.7/Modules/ossaudiodev.c	2014-06-02 10:58:12.132478970 -0700
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
@@ -1037,6 +1037,7 @@
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
     _EXPORT_INT(m, SOUND_MIXER_MONITOR);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
 #endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
 
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
+#ifndef __sun
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
     /* Expose all the ioctl numbers for masochists who like to do this
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
        stuff directly. */
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
     _EXPORT_INT(m, SNDCTL_COPR_HALT);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
@@ -1049,6 +1050,7 @@
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
     _EXPORT_INT(m, SNDCTL_COPR_SENDMSG);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
     _EXPORT_INT(m, SNDCTL_COPR_WCODE);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
     _EXPORT_INT(m, SNDCTL_COPR_WDATA);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
+#endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
 #ifdef SNDCTL_DSP_BIND_CHANNEL
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
     _EXPORT_INT(m, SNDCTL_DSP_BIND_CHANNEL);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
 #endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
@@ -1070,8 +1072,12 @@
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
     _EXPORT_INT(m, SNDCTL_DSP_GETSPDIF);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
 #endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
     _EXPORT_INT(m, SNDCTL_DSP_GETTRIGGER);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
+#ifdef SNDCTL_DSP_MAPINBUF
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
     _EXPORT_INT(m, SNDCTL_DSP_MAPINBUF);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
+#endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
+#ifdef SNDCTL_DSP_MAPOUTBUF
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
     _EXPORT_INT(m, SNDCTL_DSP_MAPOUTBUF);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
+#endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    33
     _EXPORT_INT(m, SNDCTL_DSP_NONBLOCK);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    34
     _EXPORT_INT(m, SNDCTL_DSP_POST);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
 #ifdef SNDCTL_DSP_PROFILE
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
@@ -1091,6 +1097,7 @@
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
     _EXPORT_INT(m, SNDCTL_DSP_STEREO);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    38
     _EXPORT_INT(m, SNDCTL_DSP_SUBDIVIDE);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    39
     _EXPORT_INT(m, SNDCTL_DSP_SYNC);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    40
+#ifndef __sun
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    41
     _EXPORT_INT(m, SNDCTL_FM_4OP_ENABLE);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
     _EXPORT_INT(m, SNDCTL_FM_LOAD_INSTR);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
     _EXPORT_INT(m, SNDCTL_MIDI_INFO);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
@@ -1132,4 +1139,5 @@
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
     _EXPORT_INT(m, SNDCTL_TMR_STOP);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
     _EXPORT_INT(m, SNDCTL_TMR_TEMPO);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
     _EXPORT_INT(m, SNDCTL_TMR_TIMEBASE);
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
+#endif
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
 }
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
--- Python-2.7.8/setup.py.~5~	2014-07-17 20:47:50.251398063 -0700
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    51
+++ Python-2.7.8/setup.py	2014-07-17 20:47:50.359537973 -0700
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    52
@@ -1638,8 +1638,8 @@
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    53
         else:
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    54
             missing.append('linuxaudiodev')
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    55
 
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    56
-        if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    57
-                        'freebsd7', 'freebsd8')
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    58
+        if (host_platform in ('sunos5', 'linux2', 'freebsd4', 'freebsd5',
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
+                        'freebsd6', 'freebsd7', 'freebsd8')
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    60
             or host_platform.startswith("gnukfreebsd")):
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    61
             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
e99da14b537a PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
         else: