components/python/python27/patches/16-ossaudiodev.patch
author John Beck <John.Beck@Oracle.COM>
Wed, 17 Dec 2014 13:11:04 -0800
branchs11-update
changeset 3565 2d729d36ded7
parent 3367 ed5024e47b53
permissions -rw-r--r--
20230129 update Python 2.7 line to version 2.7.9 20207552 problem in UTILITY/PYTHON
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3367
ed5024e47b53 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.  
ed5024e47b53 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
ed5024e47b53 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.
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
ed5024e47b53 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
ed5024e47b53 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
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
@@ -1037,6 +1037,7 @@
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
     _EXPORT_INT(m, SOUND_MIXER_MONITOR);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
 #endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
 
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
+#ifndef __sun
ed5024e47b53 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
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
        stuff directly. */
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
     _EXPORT_INT(m, SNDCTL_COPR_HALT);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
@@ -1049,6 +1050,7 @@
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
     _EXPORT_INT(m, SNDCTL_COPR_SENDMSG);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
     _EXPORT_INT(m, SNDCTL_COPR_WCODE);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
     _EXPORT_INT(m, SNDCTL_COPR_WDATA);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
+#endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
 #ifdef SNDCTL_DSP_BIND_CHANNEL
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
     _EXPORT_INT(m, SNDCTL_DSP_BIND_CHANNEL);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
 #endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
@@ -1070,8 +1072,12 @@
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
     _EXPORT_INT(m, SNDCTL_DSP_GETSPDIF);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
 #endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
     _EXPORT_INT(m, SNDCTL_DSP_GETTRIGGER);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
+#ifdef SNDCTL_DSP_MAPINBUF
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
     _EXPORT_INT(m, SNDCTL_DSP_MAPINBUF);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
+#endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
+#ifdef SNDCTL_DSP_MAPOUTBUF
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
     _EXPORT_INT(m, SNDCTL_DSP_MAPOUTBUF);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
+#endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    33
     _EXPORT_INT(m, SNDCTL_DSP_NONBLOCK);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    34
     _EXPORT_INT(m, SNDCTL_DSP_POST);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
 #ifdef SNDCTL_DSP_PROFILE
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
@@ -1091,6 +1097,7 @@
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
     _EXPORT_INT(m, SNDCTL_DSP_STEREO);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    38
     _EXPORT_INT(m, SNDCTL_DSP_SUBDIVIDE);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    39
     _EXPORT_INT(m, SNDCTL_DSP_SYNC);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    40
+#ifndef __sun
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    41
     _EXPORT_INT(m, SNDCTL_FM_4OP_ENABLE);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
     _EXPORT_INT(m, SNDCTL_FM_LOAD_INSTR);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
     _EXPORT_INT(m, SNDCTL_MIDI_INFO);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
@@ -1132,4 +1139,5 @@
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
     _EXPORT_INT(m, SNDCTL_TMR_STOP);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
     _EXPORT_INT(m, SNDCTL_TMR_TEMPO);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
     _EXPORT_INT(m, SNDCTL_TMR_TIMEBASE);
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
+#endif
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
 }
3565
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    50
--- Python-2.7.9/setup.py.~5~	2014-12-17 11:46:54.630498697 -0800
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    51
+++ Python-2.7.9/setup.py	2014-12-17 11:46:54.739442146 -0800
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    52
@@ -1645,8 +1645,8 @@
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    53
         else:
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    54
             missing.append('linuxaudiodev')
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    55
 
ed5024e47b53 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',
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    57
-                        'freebsd7', 'freebsd8')
ed5024e47b53 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',
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
+                        'freebsd6', 'freebsd7', 'freebsd8')
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    60
             or host_platform.startswith("gnukfreebsd")):
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    61
             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
         else: